User Manual

TRex 13 / 113
3.2.1 Interactive mode
The script provides a list of available interfaces with interface-related information. Follow the instructions to create a basic config
file.
[bash]>sudo ./dpdk_setup_ports.py -i
3.2.2 Command line mode
Run the following command to display a list of all interfaces and interface-related information:
[bash]>sudo ./dpdk_setup_ports.py -t
In case of Loopback and/or only L1-L2 Switches on the way, IPs and destination MACs are not required. The script assumes
the following interface connections: 01, 23 etc.
Run the following:
[bash]>sudo ./dpdk_setup_ports.py -c <TRex interface 0> <TRex interface 1> ...
In case of a Router (or other next hop device, such as L3 Switch), specify the TRex IPs and default gateways, or MACs of the
router, as described below.
Table 3.1: Command line options for the configuration file creation script
(dpdk_setup_ports.py -c)
Argument Description Example
-c Create a configuration file by specified interfaces (PCI
address or Linux names: eth1 etc.)
-c 03:00.1 eth1 eth4 84:00.0
--dump Dump created configuration to screen.
-o Output the configuration to a file. -o /etc/trex_cfg.yaml
--dest-macs Destination MACs to be used per each interface. Use this
option for MAC-based configuration instead of IP-based.
Do not use this option together with --ip and --def_gw
--dest-macs 11:11:11:11:11:11
22:22:22:22:22:22
--ip List of IPs to use for each interface. If --ip and
--dest-macs are not specified, the script assumes loopback
connections (01, 23 etc.).
--ip 1.2.3.4 5.6.7.8
--def-gw List of default gateways to use for each interface. When
using the --ip option, also use the --def_gw option.
--def-gw 3.4.5.6 7.8.9.10
--ci Cores include: White list of cores to use. Include enough
cores for each NUMA.
--ci 0 2 4 5 6
--ce Cores exclude: Black list of cores to exclude. When
excluding cores, ensure that enough remain for each
NUMA.
--ci 10 11 12
--no-ht No HyperThreading: Use only one thread of each core
specified in the configuration file.
--prefix (Advanced option) Prefix to be used in TRex
configuration in case of parallel instances.
--prefix first_instance
--zmq-pub-port (Advanced option) ZMQ Publisher port to be used in
TRex configuration in case of parallel instances.
--zmq-pub-port 4000
--zmq-rpc-port (Advanced option) ZMQ RPC port to be used in the TRex
configuration in case of parallel instances.
--zmq-rpc-port
--ignore-numa (Advanced option) Ignore NUMAs for configuration
creation. This option may reduce performance. Use only
if necessary - for example, in case of a pair of interfaces
at different NUMAs.