User Manual
TRex 64 / 113
6.2.1 Basic Configuration
- port_limit : 2 #mandatory
v
1
version : 2 #mandatory
v
2
interfaces : ["03:00.0", "03:00.1"] #mandatory
v
3
#enable_zmq_pub : true #optional
v
4
#zmq_pub_port : 4500 #optional
v
5
#zmq_rpc_port : 4501 #optional
v
6
#prefix : setup1 #optional
v
7
#limit_memory : 1024 #optional
v
8
c : 4 #optional
v
9
port_bandwidth_gb : 10 #optional
v
10
port_info : # set eh mac addr mandatory
- default_gw : 1.1.1.1 # port 0
v
11
dest_mac : ’00:00:00:01:00:00’ # Either default_gw or dest_mac is mandatory ←-
v
12
src_mac : ’00:00:00:02:00:00’ # optional
v
13
ip : 2.2.2.2 # optional
v
14
vlan : 15 # optional
v
15
- dest_mac : ’00:00:00:03:00:00’ # port 1
src_mac : ’00:00:00:04:00:00’
- dest_mac : ’00:00:00:05:00:00’ # port 2
src_mac : ’00:00:00:06:00:00’
- dest_mac : [0x0,0x0,0x0,0x7,0x0,0x01] # port 3
v
16
src_mac : [0x0,0x0,0x0,0x8,0x0,0x02] #
v
17
v
1
Number of ports. Should be equal to the number of interfaces listed in 3. - mandatory
v
2
Must be set to 2. - mandatory
v
3
List of interfaces to use. Run sudo ./dpdk_setup_ports.py --show to see the list you can choose from. -
mandatory. there are cases that one PCI can have more than one port (MLX4 driver for example), for this you can use the
format dd:dd.d/d for example 03:00.0/1, it means the second port of this device. The order of the list is important the first
will the virtual port 0.
v
4
Enable the ZMQ publisher for stats data, default is true.
v
5
ZMQ port number. Default value is good. If running two TRex instances on the same machine, each should be given
distinct number. Otherwise, can remove this line.
v
7
If running two TRex instances on the same machine, each should be given distinct name. Otherwise, can remove this line.
( Passed to DPDK as --file-prefix arg)
v
8
Limit the amount of packet memory used. (Passed to dpdk as -m arg)
v
9
Number of threads (cores) TRex will use per interface pair ( Can be overridden by -c command line option )
v
10
The bandwidth of each interface in Gbs. In this example we have 10Gbs interfaces. For VM, put 1. Used to tune the
amount of memory allocated by TRex.
v
11
,
v
12
TRex need to know the destination MAC address to use on each port. You can specify this in one of two ways:
Specify dest_mac directly.
Specify default_gw (since version 2.10). In this case (only if no dest_mac given), TRex will issue ARP request to this IP,
and will use the result as dest MAC. If no dest_mac given, and no ARP response received, TRex will exit.
v
13
Source MAC to use when sending packets from this interface. If not given (since version 2.10), MAC address of the port
will be used.
v
14
If given (since version 2.10), TRex will issue gratitues ARP for the ip + src MAC pair on appropriate port. In stateful
mode, gratitues ARP for each ip will be sent every 120 seconds (Can be changed using --arp-refresh-period argument).
v
15
If given (since version 2.18), all traffic on the port will be sent with this VLAN tag.










