I was preparing lab environment to test configuration of Source-Specific Multicast on Juniper SRX Equipment and needed a tool to generate and measure Source-Specific Multicast streams.
I was aware that Iperf is a good enough tool to generate and measure multicast and unicast traffic but support for SSM was missing from current version. Fortunately there are always some developers which are interested in networking so one of them developed a special Iperf version 2.0.5 with SSM support.
The idea here is to show how to make this version of Iperf work on your Cent OS or similar Linux machine.
Here are few steps that should work from your Cent OS 6.8 Linux Server and hopefully from other similar distributions to:
Install tools needed to download files from the internet and unzip them
[root@CentOS ~]#yum install unzip [root@CentOS ~]#yum install wget
Place yourself inside root directory where we will build our new Iperf version
[root@CentOS ~]#cd /root
Download special SSM enabled Iperf version into /root directory
[root@CentOS ~]#wget https://github.com/noushi/iperf-ssm/archive/master.zip
Remove currently existing Iperf installation if you have one. If you don’t have one, server will tell that to you when you hit enter.
[root@CentOS ~]#sudo yum remove iperf
Extract downloaded file
[root@CentOS ~]#unzip master.zip Archive: master.zip cad55aec69a9e39618b37818453155160252c2d6 creating: iperf-ssm-master/ inflating: iperf-ssm-master/AUTHORS inflating: iperf-ssm-master/COPYING .... .... inflating: iperf-ssm-master/src/stdio.c inflating: iperf-ssm-master/src/tcp_window_size.c
Check if you now have new “iperf-ssm-master” folder inside /root
[root@CentOS ~]# ls master.zip iperf-ssm-master
Enter “iperf-ssm-master” directory
[root@CentOS ~]# cd iperf-ssm-master/
Start building Iperf app with configure, make, make install commands:
[root@CentOS iperf-ssm-master]# ./configure
[root@CentOS iperf-ssm-master]# make
[root@CentOS iperf-ssm-master]# sudo make install
Now you should be able to use new Iperf app. You can check if it is working by trying to see the output of Iperf help. Inside that help output you should now see new SSM specific attributes -X and -0 used for selecting out interface and source IP for multicast group.
[root@CentOS iperf-ssm-master]# iperf -help Usage: iperf [-s|-c host] [options] iperf [-h|--help] [-v|--version] Client/Server: -f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes -i, --interval # seconds between periodic bandwidth reports -l, --len #[KM] length of buffer to read or write (default 8 KB) -m, --print_mss print TCP maximum segment size (MTU - TCP/IP header) -o, --output <filename> output the report or error message to this specified file -p, --port # server port to listen on/connect to -u, --udp use UDP rather than TCP -w, --window #[KM] TCP window size (socket buffer size) -B, --bind <host> bind to <host>, an interface or multicast address -C, --compatibility for use with older versions does not sent extra msgs -M, --mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP no delay, disabling Nagle's Algorithm -V, --IPv6Version Set the domain to IPv6 Server specific: -s, --server run in server mode -U, --single_udp run in single threaded UDP mode -D, --daemon run the server as a daemon -O, --source <address> specify source for Source Specific Multicast -X, --interface <interface> specify interface for Source Specific Multicast Client specific: -b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec (default 1 Mbit/sec, implies -u) -c, --client <host> run in client mode, connecting to <host> -d, --dualtest Do a bidirectional test simultaneously -n, --num #[KM] number of bytes to transmit (instead of -t) -r, --tradeoff Do a bidirectional test individually -t, --time # time in seconds to transmit for (default 10 secs) -F, --fileinput <name> input the data to be transmitted from a file -I, --stdin input the data to be transmitted from stdin -L, --listenport # port to receive bidirectional tests back on -P, --parallel # number of parallel client threads to run -T, --ttl # time-to-live, for multicast (default 1) -Z, --linux-congestion <algo> set TCP congestion control algorithm (Linux only) Miscellaneous: -x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports -y, --reportstyle C report as a Comma-Separated Values -h, --help print this message and quit -v, --version print version information and quit [KM] Indicates options that support a K or M suffix for kilo- or mega- The TCP window size option can be set by the environment variable TCP_WINDOW_SIZE. Most other options can be set by an environment variable IPERF_<long option name>, such as IPERF_BANDWIDTH. Report bugs to <[email protected]> [root@CentOS iperf-ssm-master]#
Example of Iperf Source-Specific Multicast testing
-X will conflict with iperf 2.0.10 as well as Apple’s version of iperf release on the Macs and Iphones. I’m interested in supporting SSM in iperf 2. I think a igmp and mld querier would be good to. https://sourceforge.net/projects/iperf2/
Bob
Hello. A good news update. The version of iperf (v2.0.13) that gets installed on Ubuntu via ‘sudo apt install iperf’ does, in fact, support SSM. The option is -H or –ssm-host. I hope this helps others down the road because all other searches point to the very old Git special version that would not even compile on my Ubuntu 20 LTS machine.
Yep, I was also using it last month in the last test that I did for a customer.
Was not able to update the article until now but I plan to do it shortly..