# iperf in FreebSD?



## linuxunix (Dec 15, 2010)

I am trying to run iperf for two machines - freebsd_1 and Ubuntu.

On FreeBSD, I installed netserver and ran the service:


```
#netserver
Starting netserver at port 12865
set_up_server could not establish a listen endpoint for  port 12865 with family AF_UNSPEC
```


```
[root@freebsd ~]# ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:0c:29:9b:71:ea
        inet6 fe80::20c:29ff:fe9b:71ea%em0 prefixlen 64 scopeid 0x1
        inet6 fc00:10:112:173:20c:29ff:fe9b:71ea prefixlen 64 autoconf
        inet 10.112.173.130 netmask 0xfffffe00 broadcast 10.112.173.255
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
```


Now when I am trying to run this command from Ubuntu(iperf command is available)

Ubuntu IP:


```
root@gosv-admin:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1e:4f:e5:b6:de
          inet addr:10.112.185.171  Bcast:10.112.187.255  Mask:255.255.252.0
          inet6 addr: fe80::21e:4fff:fee5:b6de/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22808843 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1865883 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5984898751 (5.9 GB)  TX bytes:156696233 (156.6 MB)
          Interrupt:16
```

Command:

```
root@admin:~# iperf -V -c fe80::20c:29ff:fe9b:71ea%em0 -i 1
error: Address family for hostname not supported
#
```

Whats the right command?


----------



## aragon (Dec 15, 2010)

linuxunix said:
			
		

> I am trying to run iperf for two machines - freebsd_1 and Ubuntu.
> 
> On FreeBSD, I installed netserver and ran the service:


Why netserver?  iperf is in benchmarks/iperf.



			
				linuxunix said:
			
		

> ```
> root@admin:~# iperf -V -c fe80::20c:29ff:fe9b:71ea%em0 -i 1
> error: Address family for hostname not supported
> ```


I believe that error means IPv6 is not supported.  Use IPv4 addresses.


----------



## SirDice (Dec 15, 2010)

Remove the *%em0* it's not part of a IPv6 address.

And please format your posts correctly, [thread=8816]Sticky: Posting and Editing in the FreeBSD Forums I: proper formatting[/thread].


----------



## djack (Dec 15, 2010)

Just to let you know installing IPerf from source is fairly trivial as well.  This is what I did.  Then install from source on your Ubuntu box.  It should basically just work out of the box.


----------

