How to Start a Multicast Traffic in Iperf
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 datagramsLet us see the following output in Iperf server side once the client starts:
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.
Source: linuxhint.com