Oct 19, 2023 7 min read

How to Start a Multicast Traffic in Iperf

Start multicast traffic in Iperf with our step-by-step tutorial. It is widely used network testing tool that allows to track bandwidth.

Start a Multicast Traffic in Iperf
Table of Contents

Introduction

Before we start talking about how to start a multicast traffic in Iperf, let's briefly understand - What is Iperf ?

Iperf is a widely used network testing tool that allows you to measure the bandwidth and performance of a network. It supports various network protocols, including multicast. Multicast traffic simulates the broadcasting of data to multiple recipients simultaneously.

Three different kinds of traffic exist:

Unicast: A packet has a specific destination address when it is sent. The source can retry the frame if the packet does not reach a destination address.

Broadcast: A packet is sent, but not to a specific address. This frame can be processed by whoever can see it. For this kind of frame, there is no source retry.

Multicast: A group is the target audience for a packet. This is a broadcast of sorts, although it is only necessary for the group.

This tutorial will provide an overview of how to start multicast traffic using Iperf. We will also address a few FAQs on how to start multicast traffic using Iperf.

Iperf Server Command

To launch any multicast server under Linux, use the command line:

iperf -s -u -B 239.1.1.10 -i 1

Here:

This is a server, denoted by the -s.

This server accepts UDP traffic if it has the -u flag.

Showing the iperf output intervals every second is indicated by the "-i 1" flag.

Bind to multicast address "239.1.1.10" is what the command "-B 239.1.1.10" says.

There are set class D IP addresses for multicast servers, and they fall between 224.0.0.0 and 239.255.255.255.

Consequently, 239.1.1.10 is a valid multicast receiver address.

Output:

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

The command is:

iperf -c 239.1.1.10 -u -T 3 -t 20 -i 1 -b 200M

Sending traffic to the multicast server's IP 239.1.1.10 server is indicated by the "-c 239.1.1.10" option.

This is what the previous server command told us.

To send a UDP data transmission, use the -u switch.

To transmit a traffic lasting 20 seconds, use the "-t 20" option.

Showing the iperf output interval for each second is indicated by the "-i 1" flag.

The 200Mbps UDP data pumping rate is indicated by the "-b 200M" flag.

The time to live (TTL) for a multicast frame is indicated by "-T 3". TTL in this instance is 3.

Output:

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

As soon as the client launches, see the following output in Iperf server side:

Output
------------------------------------------------------------

[  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

This packet can be seen in Wireshark. The multicast address of the recipient is 239.1.1.10, and the sender's address is 192.168.1.4 [client].

FAQs: Starting Multicast Traffic in Iperf

Why would I need to start multicast traffic using Iperf? 

Starting multicast traffic using Iperf allows you to assess the performance and behavior of multicast transmissions in your network. It helps identify potential issues or bottlenecks and allows you to optimize multicast configuration for reliable data distribution.

What prerequisites are needed to start multicast traffic with Iperf? 

To start multicast traffic with Iperf, you need at least two networked devices capable of joining a multicast group. You should also have Iperf installed on both devices.

How do I install Iperf on my system? 

Iperf is available for various operating systems. You can typically install it using package managers like apt-get for Debian-based systems or Homebrew for macOS.

How do I start multicast traffic using Iperf? 

To start multicast traffic, you need to configure an Iperf server on one device and an Iperf client on another. The server sends multicast traffic, and the client receives it.

Can I specify the bandwidth or data rate for multicast traffic in Iperf? 

Yes, Iperf allows you to limit the bandwidth or data rate for multicast traffic using the -b option. This is useful for testing the network's capacity to handle multicast streams at specific rates.

How can I interpret the results from multicast traffic tests in Iperf? 

Iperf provides detailed test outputs, including throughput, packet loss, jitter, and other statistics. These measurements help evaluate the performance of the multicast traffic and detect any anomalies or network issues.

Can I use Iperf to test multicast traffic within different networks? 

Yes, as long as there is a route or sufficient multicast infrastructure in place, Iperf can be used to test multicast traffic across different networks.

Conclusion

In this tutorial, you learnt how to use the iperf commands to broadcast and receive multicast frames, as well as how to use Wireshark to examine multicast frames. The multicast frame can also be sent using the open source free iperf utility.

If you have any queries or doubts, please leave them in the comment below. We'll be happy to address them.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.