Amarisoft

Iperf

The purpose of this tutorial is to show you how to do throughput test with iperf2. iperf would be the tool that have been used the most widely for IP throughput test in various situation. For some specific application, iperf may not be good enough and you may need some dedicated packet generator, but for a lot of ordinary IP throughput test as we do in wireless communication iperf would still be the most widely used tool. There are two types of iperf we can easily get : iperf2 and iperf3.In LTE days, as far as I recall, iperf2 was used dominatly and I see more and more users are using iperf3 more recently and in 5G. But which tool is better is still in debates and seems to be up to personal preferences.

In this tutorial, I used iperf2 but you can use iperf3 as well. Just a small adjustment for comman and options. For relatively low throughput I don't think it would not take much effort to achieve the rate you expected, but for very high throughput (like 1Gbps or higher), it would take some time and effort to figure out proper option values for iperf. Unfortunately it would not be possible to provide the best options and option values that fits for every situation. A set of iperf options that worked well with my setup would not work well with your setup. Therefore, you should anticipate that you should spend a considerable amount of time and effort to figure out the set of iperf options that works with your own setup.

At the earily stage of the test setup, it would be helpful for you to visit the Offical sites for iperf and check out some documents published there.

It is assumed that you are familiar with the basic operations of the callbox and I would not explain about the very basic operations of callbox. If you are not familiar with the basic operation of the callbox, refer to other tutorials like LTE Attach, SA setup, NSA setup etc.

NOTE : The purpose of this tutorial is mainly for setting up the data pipe for iperf testing and I have not tried to maximize the throughput.

Table of Contents

Introduction

In modern networking environments, evaluating and optimizing IP throughput is crucial for ensuring robust, high-performance communication across wired and wireless systems. iperf2 stands as one of the most widely adopted open-source tools for conducting reliable IP throughput testing, providing detailed insights into network bandwidth, latency, and overall performance. Originally developed for academic and enterprise environments, iperf2 enables users to generate TCP and UDP traffic between a client and server, allowing for granular control over test parameters such as data rate, protocol, buffer sizes, and parallel streams. Its architecture adopts a client-server model, where the client initiates connections to one or more servers, facilitating both unidirectional and bidirectional testing scenarios. In wireless communication domains such as LTE and 5G, iperf2 remains indispensable for validating end-to-end data transmission capabilities, diagnosing network bottlenecks, and tuning system parameters for optimal throughput. While iperf2 and its successor, iperf3, share similar core functionalities, subtle differences in command syntax, feature sets, and performance characteristics have led to ongoing debates regarding their relative merits. This tutorial focuses on iperf2, guiding users through practical throughput testing workflows, highlighting key configuration options, and addressing common challenges encountered in real-world deployments. By leveraging iperf2, network engineers and testers can systematically assess and enhance the efficiency of their data paths, ensuring systems meet the demanding requirements of contemporary IP-based communication.

Summary of the Tutorial

This tutorial covers multiple test procedures for verifying IP traffic (using iperf) over different Radio Access Technologies (RATs) and IP versions, utilizing both UE simulators and commercial mobile devices as Devices Under Test (DUT). The focus is on correct configuration matching, stepwise setup, and verification processes to ensure successful connectivity and throughput measurement.

The tutorial emphasizes the importance of configuration matching between UE and test network, systematic verification of connectivity and IP address allocation, and the use of iperf for throughput validation under various RAT and IP version scenarios.

Test 1 : UE Sim - NR SA, IPv4

This is the most basic test for iperf based on IPv4 and using UEsim as DUT. In this test, I used NR SA as RAT (Radio Access Technology), but type of RAT is not important. You can use any RAT (e.g, LTE, NR NSA) in the same way as explained here.

Test Setup

TestSetup Callbox UEsim 1sdr 01

Configuration

An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration

If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side.

On UEsim, I used ue-nr-sa-50M-iperf.cfg which is copied and modified from ue-nr-sa.cfg

Iperf Test 1 Config 01

On Callbox enb, I used gnb-sa-50Mhz.cfg which is copied and modified from gnb-sa.cfg.

Iperf Test 1 Config 02

On Callbox mme, I used mme-ims.cfg as it is.

Iperf Test 1 Config 05

Following is the configuration on Callbox (gnb-sa-50Mhz.cfg). You can specify TDD/FDD(NR_TDD), MIMO(N_ANTENNA_DL) and bandwidth(NR_BANDWIDTH) etc but these details is not so imporant in this test.

Iperf Test 1 Config 09

You would see following in /root/mme/config/mme-ims.cfg file on Callbox

Iperf Test 1 Config 06

In this tutorial, following SIM information will be used. Make it sure to configure the same parameters on UE side as well. (NOTE : this is the contents of ue_db-ims.cfg)

Iperf Test 1 Config 07

Following is the configuration on UEsim(ue-nr-sa-50M-iperf.cfg )

Iperf Test 1 Config 10

Iperf Test 1 Config 11

Peform the Test

Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented

Iperf Test 1 Run 01

Power on UE and Get UE attached to the cell.

Iperf Test 1 Run 02

Figure out IP address that is allocated to UE

Iperf Test 1 Run 03

Check if the network name space for each UE instances on UE is established.

Iperf Test 1 Run 08

Run the following command on UE sim (IP traffic reciever)

Iperf Test 1 Run 04

Run the following command on Callbox(IP traffic sender)

Iperf Test 1 Run 05

Followings are tx_gain, rx_gain on UE Sim and Callbox to achieve the throughput shown in next slide. But this specific value is only for the specific setup used in my test environment. The optimal value will vary depending on each specific test setup.

Iperf Test 1 Run 06

Iperf Test 1 Run 07

Verify the throughput

Verify the throughput with 't' command and tweak radio link condition to achieve the throughput as much as possible.

Iperf Test 1 TpCheck 01

Test 2: Commercial Mobile Phone - NR SA, IPv4

This test is to show a case of iperf based on IPv4 and using a Commercial UE as DUT. In this test, I used NR SA as RAT (Radio Access Technology), but type of RAT is not important. You can use any RAT (e.g, LTE, NR NSA) in the same way as explained here.

Test Setup

Test setup for this tutorial is as shown below.

TestSetup Callbox UE 1sdr 01

Configuration

In this test, I used theconfiguration file gnb-sa-50M-sdr0.cfgthat are modified from gnb-sa.cfg as shown below.

Iperf Test2 Config 01

In gnb-sa-50M-sdr0.cfg , I configured as follows. You can specify TDD/FDD(NR_TDD), MIMO(N_ANTENNA_DL) and bandwidth(NR_BANDWIDTH) etc but these details is not so imporant in this test.

Iperf Test2 Config 02

Iperf Test2 Config 03

On the test UE following app was installed by default. You can install any Iperf app on your UE.

Iperf Test2 Config 04

Peform the Test

Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented

Iperf Test 2 Run 01

Power on UE and Get UE attached to the cell and check the IP assigned to UE

Iperf Test 2 Run 02

Check the output of 'ue' command in (mme) and make it sure that the UE get at least one IP (IPv4 in this test) allocated.

Iperf Test 2 Run 03

Run iperf app on UE and run the iperf server command as shown on the left and hit [iPerf] button and you would see the status "Started" and "Server listening ..." as shown on the right.

Iperf Test 2 Run 04

Open up another terminal on callbox and start ping and make it sure it is going through. I recommend to keep this ping during the whole test period to prevent the Callbox to release RRC when there is no IP data. Once Callbox release RRC and gets into idle mode, iperf data may not trigger reconnection and you don’t get any iperf throughput

Iperf Test 2 Run 05

Run the following command on Callbox to transmit the udp traffic to UE

Iperf Test 2 Run 06

Verify the throughput

Verify the throughput with 't' command and tweak radio link condition to achieve the throughput as much as possible.

Iperf Test 2 TpCheck 01

You would see the throughput logs printed on Iperf app on UE as shown below.

Iperf Test 2 TpCheck 02

Test 3: UE Sim - LTE, IPv4v6

This test is to show a case of iperf based on IPv4 and using a Commercial UE as DUT. In this test, I used LTEas RAT (Radio Access Technology), but type of RAT is not important. You can use any RAT (e.g, NR NSA, NR SA) in the same way as explained here.

Test Setup

TestSetup Callbox UEsim 1sdr 01

Configuration

An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration

If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side.

On UEsim, I used ue-lte-ipV4V6.cfg which is copied and modified from ue.default.cfg

Iperf Test 3 Config 01

On Callbox enb, I used enb.default.cfg as it is.

Iperf Test 3 Config 02

On Callbox mme, I used mme-ims-internet-ipv4v6.cfg which is copied and modified frommme-ims.cfg /

Iperf Test 3 Config 05

Following is the configuration enb configuration on Callbox (enb.default.cfg ). You can specify TDD/FDD(TDD), MIMO(N_ANTENNA_DL) and bandwidth(N_RB_DL) etc but these details is not so imporant in this test.

Iperf Test 3 Config 09

You would see following in /root/mme/config/mme-ims-internet-ipv4v6.cfg file on Callbox. Here you see both ipv4 configuration(first_ip_addr, last_ip_addr) andipv6 configuration(first_ipv6_prefix, last_ipv6_prefix) are set to support both IPv4 and IPv6.

Iperf Test 3 Config 06

In this tutorial, following SIM information will be used. Make it sure to configure the same parameters on UE side as well. (NOTE : this is the contents of ue_db-ims.cfg)

Iperf Test 1 Config 07

Following is the configuration on UEsim(ue-lte-ipV4V6.cfg ). You can specify TDD/FDD(TDD), MIMO(N_ANTENNA_DL) and bandwidth(CELL_BANDWIDTH) etc but these details is not so imporant in this test.

Iperf Test 3 Config 10

Peform the Test

Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented

Iperf Test 3 Run 01

On Callbox, Do ipconfig and confirm that the IPv6 address is assigned as you configured in mme configuration.

Iperf Test 3 Run 02

Power on UE.

Iperf Test 3 Run 03

Make it sure that UE completes the attach

Iperf Test 3 Run 04

In Callbox mme, confirm that the UE is attached and got the IPv4 and IPv6 address allocated. (NOTE : notice that mme shows just network prefix part of the UE IPv6 address (not the full address). This would be because interfaceidentifier part of the UE ip address would be assigned differently depending on UE implementation. Some UE would use the interfaceidentifier specified NAS message and some UE use generate a random interface identifier).

Iperf Test 3 Run 05

On UEsim, confirm the ue completed the attach and get IP address allocated. (NOTE : Only interface indentifier of ipv6 is displayed, not the full ipv6 address).

Iperf Test 3 Run 06

On UEsim, confirm that you got the ue listed in the network name space.

Iperf Test 3 Run 07

On UEsim, check ifconfig for ue1 and make it sure that it got the network interface with proper ipv6 address.

Iperf Test 3 Run 08

Try ping from the callbox (network) to UE.

Iperf Test 3 Run 09

On UEsim, run the iperf in udp server mode. -V option is to allow IPv6 address.

Iperf Test 3 Run 10

On Callbox, run the iperf in udp client mode and confirm that the ip iptraffic is going out.

Iperf Test 3 Run 11

On UEsim, confirm that IP traffic is coming in.

Iperf Test 3 Run 12

Test 4: UE Sim - LTE, IPv6 Only

This test is to show a case of iperf based on IPv6 and using a Commercial UE as DUT. In this test, I used LTEas RAT (Radio Access Technology), but type of RAT is not important. You can use any RAT (e.g, NR NSA, NR SA) in the same way as explained here.

Test Setup

TestSetup Callbox UEsim 1sdr 01

Configuration

An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration

If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side.

On UEsim, I used ue-lte-ipV6.cfg which is copied and modified from ue.default.cfg

Iperf Test 4 Config 01

On Callbox enb, I used enb.default.cfg as it is.

Iperf Test 3 Config 02

On Callbox mme, I used mme-ims-internet-ipv6.cfg which is copied and modified frommme-ims.cfg /

Iperf Test 4 Config 05

Following is the configuration enb configuration on Callbox (enb.default.cfg ). You can specify TDD/FDD(TDD), MIMO(N_ANTENNA_DL) and bandwidth(N_RB_DL) etc but these details is not so imporant in this test.

Iperf Test 3 Config 09

You would see following in /root/mme/config/mme-ims-internet-ipv6.cfg file on Callbox. Here you see only ipv6 configuration(first_ipv6_prefix, last_ipv6_prefix) are set and no IPv4 configuration.

Iperf Test 4 Config 06

In this tutorial, following SIM information will be used. Make it sure to configure the same parameters on UE side as well. (NOTE : this is the contents of ue_db-ims.cfg)

Iperf Test 1 Config 07

Following is the configuration on UEsim(ue-lte-ipV6.cfg ). You can specify TDD/FDD(TDD), MIMO(N_ANTENNA_DL) and bandwidth(CELL_BANDWIDTH) etc but these details is not so imporant in this test.

Iperf Test 4 Config 10

Peform the Test

Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented

Iperf Test 3 Run 01

On Callbox, Do ipconfig and confirm that the IPv6 address is assigned as you configured in mme configuration.

Iperf Test 4 Run 02

Power on UE.

Iperf Test 3 Run 03

Make it sure that UE completes the attach

Iperf Test 3 Run 04

In Callbox mme, confirm that the UE is attached and got the IPv4 and IPv6 address allocated. (NOTE : notice that mme shows just network prefix part of the UE IPv6 address (not the full address). This would be because interfaceidentifier part of the UE ip address would be assigned differently depending on UE implementation. Some UE would use the interfaceidentifier specified NAS message and some UE use generate a random interface identifier).

Iperf Test 4 Run 05

On UEsim, confirm the ue completed the attach and get IP address allocated. (NOTE : Only interface indentifier of ipv6 is displayed, not the full ipv6 address).

Iperf Test 4 Run 06

On UEsim, confirm that you got the ue listed in the network name space.

Iperf Test 3 Run 07

On UEsim, check ifconfig for ue1 and make it sure that it got the network interface with proper ipv6 address.

Iperf Test 4 Run 08

Try ping from the callbox (network) to UE.

Iperf Test 4 Run 09

On UEsim, run the iperf in udp server mode. -V option is to allow IPv6 address.

Iperf Test 3 Run 10

On Callbox, run the iperf in udp client mode and confirm that the ip iptraffic is going out.

Iperf Test 4 Run 11

On UEsim, confirm that IP traffic is coming in.

Iperf Test 4 Run 12