There are three types of traffics:
- Unicast: A packet is sent with a particular destination address. If the packet is not reached to a destination address, the source can retry the frame.
- Broadcast: A packet is sent but not to a particular address. Whoever can see this frame can also process this frame. There is no retry from the source for this type of frame.
- Multicast: A packet is sent to a particular group. This is a kind of broadcast but is only required for the group.
As we already know, iperf can send a TCP or UDP packet to a destination using the server and client method. Let us see how we can send the multicast traffic using the iperf tool.
Iperf Server Command
We can use the following command to start any multicast server in Linux:
Here:
The -s means this is a server.
The -u means this server accepts UDP traffic.
The “-i 1” means showing the iperf output intervals for each second.
The “-B 239.1.1.10” means bind to multicast address “239.1.1.10”.
For multicast server, there are fixed class D IP addresses which range from 224.0.0.0 to 239.255.255.255.
So, 239.1.1.10 can be used as multicast receiver address.
Output:
Server listening on UDP port 5001
Binding to local address 239.1.1.10
Joining multicast group 239.1.1.10
Receiving 1470 byte datagrams
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
Iperf Client Command
Here is the command:
The “-c 239.1.1.10” means to send traffic to the IP 239.1.1.10 server where the multicast server is running.
We know this from the previous server command.
The -u means to send a UDP data traffic.
The “-t 20” means to send a traffic for 20second.
The “-i 1” means showing the iperf output interval for each second.
The “-b 200M” means that the UDP data pumping rate is 200Mbps.
The “-T 3” means the time to live (TTL) for multicast frame. Here, TTL is 3.
Output:
Client connecting to 239.1.1.10, UDP port 5001
Sending 1470 byte datagrams
Setting multicast TTL to 3
UDP buffer size: 64.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.4 port 63633 connected with 239.1.1.10 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 1.54 MBytes 12.9 Mbits/sec
[ 3] 1.0- 2.0 sec 1.39 MBytes 11.7 Mbits/sec
[ 3] 2.0- 3.0 sec 1.35 MBytes 11.3 Mbits/sec
[ 3] 3.0- 4.0 sec 1.55 MBytes 13.0 Mbits/sec
[ 3] 4.0- 5.0 sec 1.37 MBytes 11.5 Mbits/sec
[ 3] 5.0- 6.0 sec 1.54 MBytes 12.9 Mbits/sec
[ 3] 6.0- 7.0 sec 1.34 MBytes 11.2 Mbits/sec
[ 3] 7.0- 8.0 sec 1.37 MBytes 11.5 Mbits/sec
[ 3] 8.0- 9.0 sec 778 KBytes 6.37 Mbits/sec
[ 3] 9.0-10.0 sec 1.08 MBytes 9.02 Mbits/sec
[ 3] 10.0-11.0 sec 531 KBytes 4.35 Mbits/sec
[ 3] 11.0-12.0 sec 1.21 MBytes 10.2 Mbits/sec
[ 3] 12.0-13.0 sec 1.39 MBytes 11.6 Mbits/sec
[ 3] 13.0-14.0 sec 1.41 MBytes 11.8 Mbits/sec
[ 3] 14.0-15.0 sec 1.53 MBytes 12.8 Mbits/sec
[ 3] 15.0-16.0 sec 1.39 MBytes 11.6 Mbits/sec
[ 3] 16.0-17.0 sec 1005 KBytes 8.23 Mbits/sec
[ 3] 17.0-18.0 sec 711 KBytes 5.82 Mbits/sec
[ 3] 18.0-19.0 sec 715 KBytes 5.86 Mbits/sec
[ 3] 19.0-20.0 sec 1.21 MBytes 10.1 Mbits/sec
[ 3] 0.0-20.0 sec 24.3 MBytes 10.2 Mbits/sec
[ 3] Sent 17338 datagrams
Let us see the following output in Iperf server side once the client starts:
[ 3] local 239.1.1.10 port 5001 connected with 192.168.1.4 port 63633
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 1.0 sec 48.8 KBytes 400 Kbits/sec 22.355 ms 3/ 37 (8.1%)
[ 3] 1.0- 2.0 sec 45.9 KBytes 376 Kbits/sec 26.301 ms 94/ 126 (75%)
[ 3] 2.0- 3.0 sec 58.9 KBytes 482 Kbits/sec 23.585 ms 2/ 43 (4.7%)
[ 3] 3.0- 4.0 sec 44.5 KBytes 365 Kbits/sec 23.099 ms 127/ 158 (80%)
[ 3] 4.0- 5.0 sec 38.8 KBytes 318 Kbits/sec 29.384 ms 129/ 156 (83%)
[ 3] 5.0- 6.0 sec 40.2 KBytes 329 Kbits/sec 27.560 ms 110/ 138 (80%)
[ 3] 6.0- 7.0 sec 37.3 KBytes 306 Kbits/sec 28.645 ms 128/ 154 (83%)
[ 3] 7.0- 8.0 sec 57.4 KBytes 470 Kbits/sec 23.172 ms 0/ 40 (0%)
[ 3] 8.0- 9.0 sec 44.5 KBytes 365 Kbits/sec 31.233 ms 128/ 159 (81%)
[ 3] 9.0-10.0 sec 70.3 KBytes 576 Kbits/sec 20.961 ms 0/ 49 (0%)
[ 3] 10.0-11.0 sec 63.2 KBytes 517 Kbits/sec 17.203 ms 231/ 275 (84%)
[ 3] 11.0-12.0 sec 48.8 KBytes 400 Kbits/sec 114.719 ms 1972/ 2006 (98%)
[ 3] 12.0-13.0 sec 45.9 KBytes 376 Kbits/sec 37.111 ms 2/ 34 (5.9%)
[ 3] 13.0-14.0 sec 51.7 KBytes 423 Kbits/sec 30.123 ms 1200/ 1236 (97%)
[ 3] 14.0-15.0 sec 50.2 KBytes 412 Kbits/sec 29.018 ms 1058/ 1093 (97%)
[ 3] 15.0-16.0 sec 44.5 KBytes 365 Kbits/sec 30.480 ms 1098/ 1129 (97%)
[ 3] 16.0-17.0 sec 47.4 KBytes 388 Kbits/sec 33.832 ms 1687/ 1720 (98%)
[ 3] 17.0-18.0 sec 74.6 KBytes 612 Kbits/sec 21.411 ms 1/ 53 (1.9%)
[ 3] 18.0-19.0 sec 73.2 KBytes 600 Kbits/sec 23.323 ms 171/ 222 (77%)
[ 3] 19.0-20.0 sec 35.9 KBytes 294 Kbits/sec 33.545 ms 986/ 1011 (98%)
[ 3] 20.0-21.0 sec 70.3 KBytes 576 Kbits/sec 14.751 ms 10/ 59 (17%)
[ 3] 21.0-22.0 sec 86.1 KBytes 706 Kbits/sec 19.265 ms 745/ 805 (93%)
[ 3] 22.0-23.0 sec 87.6 KBytes 717 Kbits/sec 13.829 ms 0/ 61 (0%)
[ 3] 23.0-24.0 sec 102 KBytes 835 Kbits/sec 17.444 ms 897/ 968 (93%)
[ 3] 24.0-25.0 sec 37.3 KBytes 306 Kbits/sec 19.787 ms 52/ 78 (67%)
[ 3] 25.0-26.0 sec 80.4 KBytes 659 Kbits/sec 19.339 ms 587/ 643 (91%)
[ 3] 26.0-27.0 sec 99.1 KBytes 811 Kbits/sec 16.696 ms 327/ 396 (83%)
[ 3] 27.0-28.0 sec 76.1 KBytes 623 Kbits/sec 15.594 ms 0/ 53 (0%)
[ 3] 28.0-29.0 sec 89.0 KBytes 729 Kbits/sec 16.635 ms 1061/ 1123 (94%)
[ 3] 29.0-30.0 sec 99.1 KBytes 811 Kbits/sec 14.228 ms 0/ 69 (0%)
[ 3] 30.0-31.0 sec 81.8 KBytes 670 Kbits/sec 22.782 ms 501/ 558 (90%)
[ 3] 31.0-32.0 sec 109 KBytes 894 Kbits/sec 17.737 ms 409/ 485 (84%)
[ 3] 32.0-33.0 sec 105 KBytes 858 Kbits/sec 17.845 ms 191/ 264 (72%)
[ 3] 33.0-34.0 sec 109 KBytes 894 Kbits/sec 27.198 ms 558/ 634 (88%)
[ 3] 34.0-35.0 sec 79.0 KBytes 647 Kbits/sec 19.252 ms 818/ 873 (94%)
[ 3] 35.0-36.0 sec 105 KBytes 858 Kbits/sec 13.071 ms 0/ 73 (0%)
Multicast Frame in Wireshark
Here is the packet in Wireshark. The sender is 192.168.1.4 [client] and the receiver’s multicast address is 239.1.1.10.
Conclusion
In this article, we learned the iperf commands to send and receive the multicast frame and also check the multicast frame in Wireshark. The open source free iperf tool can also be used to send the multicast frame.