Measuring Network Bandwidth With VxWorks-7 and Ubuntu Linux
Table of Contents
- 1. Introduction
- 2. Prerequisites
- 3. Related Documentation
- 4. Download the VxWorks 7 iperf3 Layer to the Windows Workstation
- 5. Prepare the iperf3 Enabled VxWorks Projects
- 6. Build and Configure the Wind River UEFI Boot Loader USB Flash Drive
- 7. Setup the Intel Target With VxWorks
- 8. Test iperf3 in Loopback Mode on VxWorks
- 9. Setup the Ubuntu Linux workstation With iperf3
- 10. Check Network Connectivity Between VxWorks and Ubuntu
- 11. Run iperf3 To Make a Network Bandwidth Measurement
Iperf3 is a tool that performs active measurements to discover the maximum achievable bandwidth on IP networks. It was initially
developed on Linux, FreeBSD and macOS operating systems. However, a VxWorks port is available. Iperf3 is made available under a
three clause BSD license.
VxWorks is a Real Time Operating System built by Wind River.
This blog describes how to configure and use the iperf3 VxWorks port in combination with iperf3 on Ubuntu Linux to measure the
maximum network bandwidth on a wired network.
These instructions assume that you are using:
A Windows workstation with the following installed on it:
Wind River VxWorks 7, SR0620
the git client
An Ubuntu Linux 16.04/18.04/20.04 workstation
An Intel target board booting from UEFI BIOS, e.g. Dell Latitude E6540 laptop
One USB flash drive
One wired network switch
3 Related Documentation
For more information on these topics, refer to:
Wind River documentation:
VxWorks Support for Third-Party Software
Non-Wind River documentation:
git –fast-version-control, https://git-scm.com/
4 Download the VxWorks 7 iperf3 Layer to the Windows Workstation
Open a DOS shell, configure the build environment and then download the iperf3 layer git repo:
cd <WIND_HOME> // your installation directory wrenv -p vxworks-7 cd vxworks-7\pkgs_v2\net // the root of the VxWorks 7 networking software directory // clone the iperf3 git repo to download the iperf3 layer git clone https://github.com/Wind-River/vxworks7-layer-for-iperf
Your workstation should now have a new directory called <WIND_HOME>\vxworks-7\pkgs_v2\net\vxworks7-layer-for-iperf.
5 Prepare the iperf3 Enabled VxWorks Projects
5.1 Create and Build the iperf3 VxWorks Source Build (VSB) Project
From the same DOS shell, create and then build a new VxWorks source build (VSB) project:
cd <YOUR_WORKSPACE> // your workspace vxprj vsb create iperf3_vsb -bsp itl_generic -smp -force cd iperf3_vsb // your VSB directory vxprj vsb add IPERF3 // add the new IPERF3 layer to the VSB make -j 32 // build the VSB
5.2 Create and Build the iperf3 VxWorks Image Project (VIP)
Create the VxWorks image project (VIP) as follows:
cd .. vxprj create -smp itl_generic iperf3_vip -profile PROFILE_INTEL_GENERIC -vsb iperf3_vsb cd iperf3_vip vxprj vip component add INCLUDE_MULTI_STAGE_WARM_REBOOT vxprj vip bundle add BUNDLE_STANDALONE_SHELL vxprj component add INCLUDE_IPERF3 vxprj component add INCLUDE_IPERF3_CMD vxprj build
6 Build and Configure the Wind River UEFI Boot Loader USB Flash Drive
6.1 Build the UEFI Boot Loader
Build the boot loader as follows:
// navigate to the UEFI boot loader directory cd <WIND_HOME>\vxworks-7\pkgs_v2\boot\uefi-18.104.22.168 make clean make
6.2 Configure the USB Flash Drive With the UEFI Boot Loader
Navigate to <WIND_HOME>\vxworks-7\workspace\uefi_x86_64
Copy the file BOOTX64.EFI to the USB flash drive as \EFI\BOOT\BOOTX64.EFI
Navigate to <YOUR_WORKSPACE>\iperf3_vip\default\
Copy and rename the file vxWorks as \EFI\BOOT\bootapp.sys
After following these instructions you will find the following directories and files on the USB flash drive:
7 Setup the Intel Target With VxWorks
7.1 Connect the Intel Target to the Network Switch
Connect the Intel target board to the wired switch with a network cable.
7.2 Boot VxWorks on the Intel Target Board
Insert the USB flash drive and power up the Intel target board.
Select the USB flash drive as the target boot drive.
Once the target has booted, you will see the VxWorks banner and kernel shell prompt appear.
7.3 Set the VxWorks Intel Target IP Address
From the kernel shell, assign a free IP address to the target as follows:
-> ifconfig "gei0 down" -> ifconfig "gei0 inet add 192.168.1.2" // assumes this IP address is free on your network -> ifconfig
If you can see more than one IP address is assigned to your network device, remove the others until only 192.168.1.1 remains.
-> ifconfig "gei0 inet delete 22.214.171.124"
Enable the network connection as follows:
-> ifconfig "gei0 up"
8 Test iperf3 in Loopback Mode on VxWorks
Run the iperf3 server as follows:
-> sp iperf3, "-s -B 0.0.0.0"
Run the iperf3 client to test the bandwidth of the target’s loopback connection:
-> cmd [vxWorks *]# iperf3 -c192.168.1.2 -t3
The client will report the calculated network bandwidth details for the loopback connection.
Reboot the Intel target board.
At the VxWorks kernel shell, reset the IP address of gei0 to 192.168.1.2.
9 Setup the Ubuntu Linux workstation With iperf3
9.1 Connect the Ubuntu Linux Workstation to the Network Switch
Connect the Ubuntu Linux workstation to the wired switch with a network cable.
Power up the Ubuntu workstation. Set the IP address of the Ubuntu wired network connection to 192.168.1.1.
9.2 Install iperf3 on the Ubuntu Linux Workstation
On the Ubuntu workstation, open a Linux command shell and type the following:
:~$ sudo apt update :~$ sudo apt install iperf3
9.3 Disable Wireless Networking on the Ubuntu Workstation
Before performing the wired network bandwidth measurement, we must turn off the Ubuntu workstation wireless connection.
10 Check Network Connectivity Between VxWorks and Ubuntu
On the Ubuntu workstation, on the command shell type the following:
:~$ ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.576 ms 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.316 ms
Type CTRL+X to stop the ping operation.
On the Intel target board running VxWorks, at the kernel shell type the following:
-> ping "192.168.1.1" Pinging 192.168.1.1 (192.168.1.1) with 64 bytes of data: Reply from 192.168.1.1 bytes=64 ttl=64 seq=0 time<1ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0 ms rtt min/avg/max = 0/0/0 ms value = 0 = 0x0
If either ping command fails, check and verify the network connections and the IP address settings on
the Intel target and Ubuntu workstation.
11 Run iperf3 To Make a Network Bandwidth Measurement
11.1 Run the iperf3 Server on the Ubuntu Linux Workstation
On the Ubuntu workstation command shell type the following to run the iperf3 server in the background:
:~$ iperf3 -s -B 0.0.0.0&
11.2 Run the iperf3 Client on the VxWorks Intel Target
At the VxWorks kernel shell type the following to initiate the iperf3 client, and start the bandwidth measurement:
-> cmd [vxWorks *]# iperf3 -c192.168.1.1 -t3
11.3 Observe the iperf3 Measured Network Bandwidth Output on the VxWorks Intel Target Console
On the kernel shell, you should see something like this:
Connecting to host 192.168.1.1, port 5201 [ 9] local 192.168.1.2 port 57747 connected to 192.168.1.1 port 5201 [ ID] Interval Transfer Bitrate [ 9] 0.00-1.00 sec 11.1 MBytes 93.0 Mbits/sec [ 9] 1.00-2.00 sec 11.2 MBytes 93.8 Mbits/sec [ 9] 2.00-3.00 sec 11.2 MBytes 93.8 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 9] 2.00-3.00 sec 33.5 MBytes 93.6 Mbits/sec sender [ 9] 2.00-3.01 sec 33.5 MBytes 93.3 Mbits/sec receiver iperf Done.
It appears that the maximum bandwidth achieved on this network connection is around 93 Mbits/sec.
11.4 Observe the iperf3 Measured Network Bandwidth Output on the Ubuntu Workstation
On the Ubuntu workstation command shell, you should see something like this:
Accepted connection from 192.168.1.2, port 57929 [ 5] local 192.168.1.1 port 5201 connected to 192.168.1.2 port 57747 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 11.0 MBytes 92.3 Mbits/sec [ 5] 1.00-2.00 sec 11.2 MBytes 93.8 Mbits/sec [ 5] 2.00-3.00 sec 11.2 MBytes 93.8 Mbits/sec [ 5] 2.00-3.01 sec 81.8 KBytes 94.8 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 5] 0.00-3.01 sec 33.5 MBytes 93.3 Mbits/sec receiver ----------------------------------------------------------- Server listening on 5201 -----------------------------------------------------------
This confirms that the maximum bandwidth achieved on this network connection is around 93 Mbits/sec.