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

 

 

Test 1 :  UE Sim - NR SA, IPv4

 

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)

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

 

Test Setup

 

Test setup for this tutorial is as shown below.

TestSetup Callbox UE 1sdr 01

 

Configuration

 

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

Iperf Test2 Config 01

In gnb-sa-50M-sdr0.cfg ,  I configured as follows

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

 

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

 

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 from mme-ims.cfg /

Iperf Test 3 Config 05

 

Following is the configuration enb configuration on Callbox (enb.default.cfg )

Iperf Test 3 Config 09

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

 

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 )

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 interface identifier part of the UE ip address would be assigned differently depending on UE implementation. Some UE would use the interface identifier 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

 

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 from mme-ims.cfg /

Iperf Test 4 Config 05

 

Following is the configuration enb configuration on Callbox (enb.default.cfg )

Iperf Test 3 Config 09

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

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 )

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 interface identifier part of the UE ip address would be assigned differently depending on UE implementation. Some UE would use the interface identifier 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