Packet capturing using Trex

1,453 views
Skip to first unread message

Anu radha

unread,
Jan 20, 2016, 4:27:24 AM1/20/16
to TRex Traffic Generator
Hi,

I have installed Trex in local linux machine and trying to send l2 traffic with loopback connection

Is there any way to capture packets at receiving end and to view the packets received (tcpdump like)

Thanks,
Anuradha

hanoh haim

unread,
Jan 20, 2016, 8:21:52 AM1/20/16
to Anu radha, TRex Traffic Generator

TRex is using DPDK for port management. There is no way to capture the traffic.

What you can do it connect the TRex ports to a Switch and duplicate the traffic to another port.

With TRexVM image we are doing something similar the TRex ports are connected to a vSwitch and there is another port sniffing the traffic. This way you can learn how TRex works.


thanks

Hanoh



--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/7f07db31-cd82-4c23-8ac6-fe5eda567b2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Hanoh
Sent from my iPhone

Anu radha

unread,
Jan 21, 2016, 4:14:30 AM1/21/16
to TRex Traffic Generator, anu...@gmail.com
Could you please suggest how to duplicate the traffic on dpdk ports (trex ports) to normal ports

Please suggest anything to refer for

Thanks,
Anuradha

Dan Klein

unread,
Jan 21, 2016, 4:53:52 AM1/21/16
to TRex Traffic Generator, anu...@gmail.com
Hi,

You can refer to the trex vm manual :
http://trex-tgn.cisco.com/trex/doc/trex_vm_manual.html

This guide both describes how the capturing works and also provides some usage examples.

Anu radha

unread,
Jan 22, 2016, 1:23:47 AM1/22/16
to TRex Traffic Generator, anu...@gmail.com
Hi, 

Thanks for the reply. i have already refered the specified link, Here in VM after installing trex, you are trying to send packets from port 1 to port 2  and verifying tcpdump for port2 

In linux machine, we have installed TRex and sending traffic between dpdk ports. DPDK ports are not displayed in ifconfig and we are unable to verify the tcpdump 

Do we have any way to duplicate dpdk ports to physical ports. please suggest if my understanding is wrong

Thanks. 

hanoh haim

unread,
Jan 22, 2016, 4:27:19 AM1/22/16
to Anu radha, TRex Traffic Generator
Hi,
If you are using our VM from this link using Virtualbox, it has another port (port3) that is connected to the same vSwitch.
This port is configured as promiscuous.
tcpdump on this port will show all the traffic on both port 1 and port 2.
This is working under VirtualBox it might not work on ESXi.

Thanks
Hanoh 
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dharmendra Setty

unread,
Jan 23, 2020, 11:41:19 PM1/23/20
to TRex Traffic Generator
Hi Hanoh,

Any latest updates on the capture of packets from DPDK Ports. 
Usually on a back-to-back connected DPDK Ports we need to capture the received packet on a particular DPDK Port.
How to go about on this?
Any latest explore inputs can you share here.
In our Line Rate traffic pumping scenario, the received packets traffic capture & opening the captured packets is important.
Need your help here. 


Thanks & Regards,
Dharmendra
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/9230dc97-5be5-4b66-8596-1a54960f41b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hanoh haim

unread,
Jan 24, 2020, 2:09:38 AM1/24/20
to Dharmendra Setty, TRex Traffic Generator

This thread is a bit old. tcpdump can’t be used on DPDK ports. However TRex has a capability to captures using BPF filter in service mode.
It is more for debug and support rates in the order of 5MPPS (before filter)

See the manual for more information 

Thanks
Hanoh

To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/9230dc97-5be5-4b66-8596-1a54960f41b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Hanoh
Sent from my iPhone

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/be2f2a95-b21e-4aa2-92e3-0f4aac6f1b6d%40googlegroups.com.

dharmend...@gmail.com

unread,
Jan 24, 2020, 8:22:28 AM1/24/20
to TRex Traffic Generator
Hi Hanoh,

Fine I had a look to the codes in the below paths,
Need your help:

As i understand, before enabling the capture on the DPDK Ports, we need to do a PortProfileID for the port. For doing the same, Iam looking to the below code path

Now bit clarity I needed to use which of the below:

1. In trex-core/scripts/automation/trex_control_plane/interactive/trex/common$ vim trex_psv.py
Under  class PortStateValidator(object):
def validate (self, cmd_name, ports, states = None, allow_empty = False):

or

2.   In trex-core/scripts/automation/trex_control_plane/interactive/trex/stl/trex_stl_client.py:
def validate_port_input(port_arg):

Thanks & Regards,
Dharmendra
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/9230dc97-5be5-4b66-8596-1a54960f41b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Hanoh
Sent from my iPhone

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages