Using TRex with Docker containers. Having issue sending traffic over tun interface

161 views
Skip to first unread message

anu...@gmail.com

unread,
Sep 13, 2019, 4:29:56 PM9/13/19
to TRex Traffic Generator
I am trying to test TRex using Docker with ASTF support. My current setup consists of 3 Docker containers. A client container with TRex built-in, WAN emulator container and a server container with TRex built-in.

I am trying to send data over the tun between client and server via the WAN emulator.

I am able to run iperf tests between the client and server containers through the tun interface but am having issues when I run TRex.

So I'm starting out with getting TRex to run using the eth0 interface.

Client side YAML file 
- port_limit    : 2
  version       : 2
  low_end       : true
  interfaces    : ["eth0", "dummy"]   # list of the interfaces to bind run ./dpdk_nic_bind.py --status
  port_info     :  # set eh mac addr

                 - ip         : 10.253.1.3
                   default_gw : 10.253.1.2 
                 - ip         : 10.9.9.9 #Dummy
                   default_gw : 10.9.9.99 #Dummy

Server side YAML file 
- port_limit    : 2
  version       : 2
  stack         : linux_based
  low_end       : true
  interfaces    : ["dummy", "eth0"]   # list of the interfaces to bind run ./dpdk_nic_bind.py --status
  port_info     :  # set eh mac addr

                 - ip         : 10.9.9.9 #Dummy
                   default_gw : 10.9.9.99 #Dummy
                 - ip         : 10.0.0.4
                   default_gw : 10.253.1.2

I'd like to run a simple test between the client and server to learn how this works, so I am trying "astf/http_simple.py". I've added the routes as explained in the slide deck.

Right now I'm able to start TRex with this setup without using the tun interface. This is my setup

Untitled Diagram (1).jpg



On the client side container I run : ./t-rex-64 -i --astf
Then I start the client side /trex-console
Run : 
> start -f astf/http_simple.py -m 1000 -d 1000 -l 1000
> tui

I do the same thing on the server side.


Client side ifconfig:
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.202.0.2  P-t-P:10.202.0.2  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:14800  Metric:1
          RX packets:273429 errors:0 dropped:0 overruns:0 frame:0
          TX packets:335852 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10000 
          RX bytes:2302135338 (2.3 GB)  TX bytes:3895269843 (3.8 GB)

eth0      Link encap:Ethernet  HWaddr 02:42:0a:fd:01:03  
          inet addr:10.253.1.3  Bcast:10.253.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:296722 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3536747 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2332621099 (2.3 GB)  TX bytes:4171254463 (4.1 GB)


Server side ifconfig:
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.202.0.1  P-t-P:10.202.0.1  Mask:255.255.255.0
          inet6 addr: fe80::91df:9db4:7e4b:e0d9/64 Scope:Link
          inet6 addr: fd0c:e2b6:32b:eda4:1234:abcd:6789:1/126 Scope:Global
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:14800  Metric:1
          RX packets:335776 errors:0 dropped:77 overruns:0 frame:0
          TX packets:273430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10000 
          RX bytes:3895265275 (3.8 GB)  TX bytes:2302150138 (2.3 GB)

eth0      Link encap:Ethernet  HWaddr 02:42:0a:00:00:04  
          inet addr:10.0.0.4  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::42:aff:fe00:4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:423277 errors:0 dropped:0 overruns:0 frame:0
          TX packets:323455 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3980629944 (3.9 GB)  TX bytes:2334993997 (2.3 GB)

WAN Emulator side ifconfig:
eth0      Link encap:Ethernet  HWaddr 02:42:0a:00:00:0b  
          inet addr:10.0.0.11  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:387710 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2299066 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2339004186 (2.3 GB)  TX bytes:4080658955 (4.0 GB)

eth1      Link encap:Ethernet  HWaddr 02:42:0a:fd:01:02  
          inet addr:10.253.1.2  Bcast:10.253.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2208515 errors:0 dropped:0 overruns:0 frame:0
          TX packets:295694 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4074327526 (4.0 GB)  TX bytes:2332470706 (2.3 GB)

I would ultimately like to send TRex traffic over the tun0 interface but as a first step is my setup correct assuming I am sending traffic via eth0 and am I doing the ASTF implementation correctly?

Reply all
Reply to author
Forward
0 new messages