Objectives
By the end of this guide, you will be able to
- download and install TRex
- configure TRex
What is TRex?
It is an open source traffic generator that works on DPDK-based processors and that supports both stateless and stateful modes.
Step 1: Download the latest stable version from the following link
Step 2: Extract downloaded folder to /opt/trex and navigate to it
mkdir -p /opt/trex
sudo tar -xvf latest.tar --directory=/opt/trex/
cd /opt/trex/v2.98
Replace 2.98 with the corresponding version you downloaded.
Step 3: Creating the configuration file trex_cfg.yaml
The configuration file can be created in two ways:
i) Manually
Firstly run the following script to see the available network devices.
sudo ./dpdk_setup_ports.py -s
The package comes with a basic configuration file template.
Copy it the /etc/ folder and rename it to trex_cfg.yaml
sudo cp cfg/simple_cfg.yaml /etc/trex_cfg.yaml
Edit the configuration file to add the relevant information about the interface and IP address.
sudo nano /etc/trex_cfg.yaml
ii) Through script
Simply run the following script and follow the instructions.
sudo ./dpdk_setup_ports.py -i
Comments
Post a Comment