Test Multicast Join (iperf)

Jun 2017

We can test if our device can join a multicast using a tool called iperf. iperf is not installed by default, so you will have to add it by us9ing:

yum install iperf

If you see the following error when trying to install iperf:

Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/4): base/7/x86_64/group_gz | 156 kB 00:00:00
(2/4): extras/7/x86_64/primary_db | 110 kB 00:00:00
(3/4): updates/7/x86_64/primary_db | 2.7 MB 00:00:00
(4/4): base/7/x86_64/primary_db | 5.7 MB 00:00:01
Determining fastest mirrors
* base: anorien.csc.warwick.ac.uk
* extras: mirrors.clouvider.net
* updates: mirrors.coreix.net
No package iperf available.
Error: Nothing to do

The last line that states Error: Nothing to do means that CentOS doesn't know where to get iperf from (not in the repositories that CentOS is aware of) then you can run the following.

yum install epel-release

This will install the relevant repositories for CentOS to find iperf. Once again you can run:

yum install iperf

Once installed, you can use iperf to connect to a multicast stream by using the following syntax.

iperf -s -u -B 239.0.200.1 -p 10001 -i 1

Example output

------------------------------------------------------------
Server listening on UDP port 10001
Binding to local address 239.0.200.1
Joining multicast group 239.0.200.1
Receiving 1470 byte datagrams
UDP buffer size: 16.0 MByte (default)
------------------------------------------------------------
[ 3] local 239.0.200.1 port 10001 connected with 10.27.250.1 port 10000
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 1.0 sec 775 KBytes 6.35 Mbits/sec 1472463338220.286 ms 1195888311/1195888914 (1e+02%)
[ 3] 0.0- 1.0 sec 595 datagrams received out-of-order
[ 3] 1.0- 2.0 sec 775 KBytes 6.35 Mbits/sec 1590510364122.785 ms 0/ 0 (-nan%)
[ 3] 1.0- 2.0 sec 603 datagrams received out-of-order
[ 3] 2.0- 3.0 sec 775 KBytes 6.35 Mbits/sec 1477144115030.008 ms 0/ 0 (-nan%)
[ 3] 2.0- 3.0 sec 603 datagrams received out-of-order
[ 3] 3.0- 4.0 sec 775 KBytes 6.35 Mbits/sec 1472946740641.257 ms 0/ 0 (-nan%)
[ 3] 3.0- 4.0 sec 603 datagrams received out-of-order
[ 3] 4.0- 5.0 sec 775 KBytes 6.35 Mbits/sec 1264384362197.854 ms 6/ 7 (86%)