Ports for Traffic Generation

143 views
Skip to first unread message

Vasantha Kumar

unread,
Feb 15, 2016, 5:41:47 AM2/15/16
to TRex Traffic Generator
Hello,

I made a setup to send the traffic from TRex (running on Server 1) to DUT (Server 2).
Both the servers are connected back to back. Port 0 of Server 1 connected to Port 0 of Server 2 and Port 1 of Server 1 connected to Port 1 of Server 2.

I am using "imix.yaml" file to generate the traffic with following configuration:
cap_info :
- name: cap2/udp_64B.pcap
cps : 1000.0
then TRex is sending the packets from only Port 0 for the command "./t-rex-64 -f cap2/imix.yaml -d 20 -m 5 -c 1"

But if i use "dns.yaml" file to generate the traffic with following configuration:
cap_info :
- name: cap2/dns.pcap
cps : 1000.0
then I can see TRex is sending packets from both the ports(Port 0 and Port 1) for the same command "./t-rex-64 -f cap2/imix.yaml -d 20 -m 5 -c 1".

Could you please help me by explaining how TRex chooses/decided on the Port(s) to send the traffic? Also please let me know what needs to be done if I want to send packets from Port 0 only irrespective of the yaml/pcap used.

Thanks in advance!

Ido

unread,
Feb 16, 2016, 5:55:12 AM2/16/16
to TRex Traffic Generator
Hi Kumar,
Will try to answer both of your emails below.
Reason you see traffic in both directions with the dns pcap is because the pcap is recorded like that. It meant for testing DUTs seeing both sides of the traffic. The udp_64B pcap is just one sided UDP stream.
You can use -p to send everything from 1 side if this is really what you need.
Regarding the extra packets you saw when using rx-check. Because of a limitation we have today, you need to add -l (latency check) when doing rx-check. You specified -l 100, which causes an addition of 100 latency packets per second. You can't eliminate this, but can specify -l 1 (instead of 100) to minimize them.

Hope it helped.
Ido

בתאריך יום שני, 15 בפברואר 2016 בשעה 12:41:47 UTC+2, מאת Vasantha Kumar:

Vasantha Kumar

unread,
Feb 16, 2016, 12:45:39 PM2/16/16
to TRex Traffic Generator
Hello Ido,

Thanks for the detailed information.

For the query on traffic in both directions:
I tried with -p option for dns.yaml and I can see the packets are sent only from Port 0 in this case. This is really useful for my scenario.
But I see a different problem now. As per my setup/configuration TRex has to send 4K pkts to Server 2. In server 2, all the packets received from only Port 0 of TRex will be NAT-Translated and sent back to TRex on Port1.

When I sent traffic with out -p option then TRex is sending 2K packets from Port 0 and 2K packets from Port 1. Then in server 2, all the 2K packets received from Port 0 of TRex are getting NAT-Translated and sent back to TRex. This is fine and works as expected.
But when I sent traffic with -p option, this time TRex sent all the 4K pkts from Port 0 of TRex, Server 2 has received all the 4K packets but again only 2K are getting NAT-Translated. This is not clear for me because here I expect all the 4K packets to be NAT-Translated. 

So I am not sure whether the 2K pkts sent from Port 0 in first scenario and the 4K pkts sent from Port 0 in second scenario follows the same method/pattern for packet generation??? 
is the packet generation is independent of the ports that will be used for sending? OR it will generate the pkts for port 0 and port 1 differently(I mean by using some parameters for generating for Port 0 and some other parameters for generating for Port1)
if it generates the pkts differently for Port 0 and Port 1, then with -p option also it generates the pkts differently for port 0 and port 1 and at the end it send all those packets from port 0??

For the query on --rx-check:
Yes, with -l 1 option I can see only minimum additional packets being sent. 
But in my test I am seeing any values (other 0) in the Rx Check stats....

 summary stats
 --------------
 Total-tx-pkt         : 4042 pkts
 Total-rx-pkt         : 1986 pkts
 Total-sw-tx-pkt      : 44 pkts

-Rx Check stats enabled
------------------------------------------------------------------------------------------------------------
rx check:  avg/max/jitter latency,        0  ,       0,        0      |  0  0  0  0  0  0  0  0  0  0  0  0  0
---
 active flows:        0, fif:        0,  drop:        0, errors:        0
------------------------------------------------------------------------------------------------------------
Am I missing something here? could you please update what's the expected details if we enable rx-check.

Thanks 
Vasanth
Reply all
Reply to author
Forward
0 new messages