Understanding Trex basic usage

1,457 views
Skip to first unread message

baluk

unread,
Sep 2, 2015, 3:34:55 AM9/2/15
to TRex Traffic Generator
Hi,

I am trying to configure the Trex for the first time. While configuring I see that the configuration file needs minimum of two ports exist as src_mac and dst_mac. I am wondering why it needs two ports to send and receive pkts?. And I am also curious to know, how does Trex send the pkts to DUT if I specify "dst_mac" as one of the ports on the Trex ?. How do I specify the dst_mac of DUT in Trex?. Would be great if anyone could explain?. I am reading the document but I couldn't get the full understanding. I am trying to create the fallowing scenario,

http://trex-tgn.cisco.com/trex/doc/images/trex_model.png.

/baluk

Dan Klein

unread,
Sep 2, 2015, 3:54:49 AM9/2/15
to TRex Traffic Generator, balu...@gmail.com
Hi Baluk,

thank you for you interest in TRex.

I'll try to answer your question:
  1. TRex requires at least two ports (or any number of even ports) since he simulates stateful traffic, and as such it simulates to the router both client requests (coming from the first port) and server response (coming from the second port). In real life, routers are place in the middle of this request-response process, hence the router itself will handle the data on two different interfaces.
  2. When you configure TRex you define in your .yaml file mac addresses for both source and destination. This is required since TRex adds tagging to its packets and only packets with specified data are passed, and rest of them dropped. 
    You should configure your router (or any DUT) to route the packets from the client interface to the server interface and vice versa (this is the most common use-case configuration), as you saw in the image you referred to.
    Now, when your router will reroute the packet he should add destination MAC in its L2 header, and this is what TRex is looking for when inspecting any incoming packet.
I hope this answers your questions.

Feel free to contact us with any other issues you might have.

Thanks and good luck,
Dan.

hanoh haim

unread,
Sep 2, 2015, 3:57:49 PM9/2/15
to TRex Traffic Generator, balu...@gmail.com


On Wednesday, September 2, 2015 at 10:34:55 AM UTC+3, baluk wrote:
Hi Baluk, 

1. Yes the minimum number of ports are two, port 1 is client side and port 2 is server side

2. Trex does support ARP emulation ( It is L7) so you need to configure both DUT and TRex see here  http://trex-tgn.cisco.com/trex/doc/trex_config_guide.html 

3. Have you tried TRex on your laptop tutorial ? see here http://trex-tgn.cisco.com/trex/doc/trex_vm_manual.html

let me know if you have any other question


thanks
Hanoh 
Reply all
Reply to author
Forward
0 new messages