Hosting iPerf in Docker Containers to Measure Network Performance using Application Manager
Measuring the network performance is important to test the efficiency of the network. Network throughput, bandwidth, latency, and packet loss are some of the parameters used to measure the network performance. iPerf is a commonly used application for measuring network performance. The iPerf application is hosted on systems at both ends of the connection that is measured. One system is used as the server, and the other system is used as the client. At least one system must be a Cisco IOS XR router, the other system can be any other external entity like a controller or another router.
This use case illustrates the procedure for hosting the iPerf application in docker containers on two Cisco IOS XR routers, Router A and Router B to measure network performance. Router A hosts the iPerf server and Router B hosts the iPerf client.
Verify Connection between Router A and Router B
The ping command verifies the connection between the IOS XR software on the routers, while the bash ping command verifies the connection between the linux kernel that hosts the IOS XR software on the routers.
Procedure
Check the connection between Router A and Router B using the ping and bash ping commands.
|
Install the iPerf Server Application
Procedure
Step 1 |
Install the iPerf application RPM on Router A. Only the RPM file format is supported.
|
Step 2 |
Configure the application to run as iPerf server.
|
Step 3 |
Verify the basic details (application name and state) about the activated iPerf server application.
|
Step 4 |
Verify if the iPerf server is listening on the default port (5201) by using the netstat command inside the container. The appmgr application exec name app_name docker-exec-cmd command can be used to execute any commands inside the container.
|
Install the iPerf Client Application
Procedure
Step 1 |
Install the iPerf application RPM on Router B.
|
||
Step 2 |
Configure the application to run as iPerf client with a timeout (600s in this case).
|
||
Step 3 |
Verify the basic details (application name and state) about the activated iPerf client application.
|
Verify Connection between the iPerf Server and iPerf Client Applications
Procedure
Verify whether the connection is established between iPerf server and iPerf clients by executing the bash netstat -anput command on Router A. When the iPerf client is up and running, the entry in the State field displays "ESTABLISHED”.
|
Measure Network Performance
Procedure
Step 1 |
Verify the traffic route from Router B to Router A using the show ip route command, on Router B.
|
||
Step 2 |
Check the network performance between iPerf client and iPerf server (on Router B and Router A). You can view the network monitoring parameters by executing the show appmgr application name iperf-client-app logs command, on Router B that hosts the iPerf client.
|
||
Step 3 |
Bring down the interface on Router D using the shut command to trigger a route update.
|
||
Step 4 |
During the route update, check the network performance by executing the show appmgr application name app_name logs command. You will notice that the entries in the Bandwidth field is Zero for a short duration, when the new route is installed.
|
Stop iPerf Applications
Procedure
Stop the iPerf applications on Router A and Router B using the appmgr application stop name app_name command. The application stop command can only be used for applications that are registered, activated, and are currently running. The application stop command stops only the application and does not clean up the resources used by the application. You can verify the status of the application using the show appmgr application-table command. The Status is displayed as Exited if the application has been stopped successfully.
|
Start iPerf Applications
Procedure
Start or restart an application that has been stopped (and not deactivated) using the appmgr application start name app_name command.
|
Deactivate iPerf Applications
Procedure
Step 1 |
Deactivate the iPerf applications using the no appmgr application app_name command. You deactivate the installed application when you want to release all resources used by the application.
|
||
Step 2 |
Verify the status of the application by using the show appmgr application-table app_name stats command.
|
Uninstall iPerf Applications
Procedure
Uninstall the applications using the appmgr package uninstall package package_name command. After the application is successfully uninstalled, executing the show appmgr source-table command displays no result.
|