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.
Test Procedure Summary
This test applies to any of enb, mme, ims configuration as long as those configurations are valid and does not cause any error during the execution.
Step 1 : Run lte service (i.e, run 'service lte restart')
Step 2 : Run linux screen (i.e, run 'screen -r')
Step 3 : Power on UE and wait until the connection is established
Step 4 : Ensure that UE has been assigned with at least one IP (you can check this with 'ue' command in (mme) screen on callbox)
Step 5 : Run iperf to generate the traffic (The way to run iperf varies depending on where you want to run it. If you want to run the iperf on Callbox or UEsim, open up a new terminal window and run the iperf. If you want to run it on commercial UE(e.g, mobile phone), install an iperf app and generate the traffic from the app).
Table of Contents
- Iperf
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
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
On Callbox enb, I used gnb-sa-50Mhz.cfg which is copied and modified from gnb-sa.cfg.
On Callbox mme, I used mme-ims.cfg as it is.
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.
You would see following in /root/mme/config/mme-ims.cfg file on Callbox
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)
Following is the configuration on UEsim (ue-nr-sa-50M-iperf.cfg )
Peform the Test
Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented
Power on UE and Get UE attached to the cell.
Figure out IP address that is allocated to UE
Check if the network name space for each UE instances on UE is established.
Run the following command on UE sim (IP traffic reciever)
Run the following command on Callbox (IP traffic sender)
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.
Verify the throughput
Verify the throughput with 't' command and tweak radio link condition to achieve the throughput as much as possible.
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.
Configuration
In this test, I used the configuration file gnb-sa-50M-sdr0.cfg that are modified from gnb-sa.cfg as shown below.
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.
On the test UE following app was installed by default. You can install any Iperf app on your UE.
Peform the Test
Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented
Power on UE and Get UE attached to the cell and check the IP assigned to UE
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.
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.
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
Run the following command on Callbox to transmit the udp traffic to UE
Verify the throughput
Verify the throughput with 't' command and tweak radio link condition to achieve the throughput as much as possible.
You would see the throughput logs printed on Iperf app on UE as shown below.
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 LTE as 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
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
On Callbox enb, I used enb.default.cfg as it is.
On Callbox mme, I used mme-ims-internet-ipv4v6.cfg which is copied and modified from mme-ims.cfg /
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.
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) and ipv6 configuration(first_ipv6_prefix, last_ipv6_prefix) are set to support both IPv4 and IPv6.
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)
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.
Peform the Test
Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented
On Callbox, Do ipconfig and confirm that the IPv6 address is assigned as you configured in mme configuration.
Power on UE.
Make it sure that UE completes the attach
In Callbox mme, confirm that the UE is attached and got the IPv4 and IPv6 address allocated. (
On UEsim, confirm the ue completed the attach and get IP address allocated. (
On UEsim, confirm that you got the ue listed in the network name space.
On UEsim, check ifconfig for ue1 and make it sure that it got the network interface with proper ipv6 address.
Try ping from the callbox (network) to UE.
On UEsim, run the iperf in udp server mode. -V option is to allow IPv6 address.
On Callbox, run the iperf in udp client mode and confirm that the ip iptraffic is going out.
On UEsim, confirm that IP traffic is coming in.
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 LTE as 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
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
On Callbox enb, I used enb.default.cfg as it is.
On Callbox mme, I used mme-ims-internet-ipv6.cfg which is copied and modified from mme-ims.cfg /
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.
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.
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)
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.
Peform the Test
Check cell configuration and confirm that they (frequency, band, bandwidth, mimo etc) are configured as you intented
On Callbox, Do ipconfig and confirm that the IPv6 address is assigned as you configured in mme configuration.
Power on UE.
Make it sure that UE completes the attach
In Callbox mme, confirm that the UE is attached and got the IPv4 and IPv6 address allocated. (
On UEsim, confirm the ue completed the attach and get IP address allocated. (
On UEsim, confirm that you got the ue listed in the network name space.
On UEsim, check ifconfig for ue1 and make it sure that it got the network interface with proper ipv6 address.
Try ping from the callbox (network) to UE.
On UEsim, run the iperf in udp server mode. -V option is to allow IPv6 address.
On Callbox, run the iperf in udp client mode and confirm that the ip iptraffic is going out.
On UEsim, confirm that IP traffic is coming in.