TRex - Introduction
TRex is an open source, low cost, stateful and stateless traffic generator tool. It is designed to benchmark platforms using realistic traffic. In this sample example, we will deploy TRex as Docker application on Catalyst 9000 and generate multi stream traffic on container ports. The configuration in example below is to demonstrate the looping traffic in container.
Refer to https://trex-tgn.cisco.com for application details and download.
Following sections explains how to configure, deploy and test TRex traffic generator on Catalyst 9000.
Configuration
The interface AppGigabitEthernet is configured in trunk mode, with allowed vlan 500. 700.
Inside the application container, eth0 is configured on vlan 700 and eth1 is configured vlan 500. On Catalyst 9000 connect GigabitEthernet 23 and GigabitEthernet 24 with loopback cable, and configure those interfaces in vlan 500 and vlan 700 respectively, as shown below:
IP address for App container is configured as static IP address. The runtime parameter required for docker container is configured under app-resource in run-opts.
TRex application needs the configuration in yaml format. This file is to be copied to usbflash in Catalyst 9000:
Deployment
a. Copy the downloaded docker tar to usbflash1
b. Install app from USBFlash1
c. Activate the application with pre-configured resources
d. Upload the TRex Configuration yaml file to container
e. Start the app
Testing
a. Connect to container and start TRex server
b. Connect to container again from different terminal and generate traffic