Trex start problem

803 views
Skip to first unread message

Sorken

unread,
Feb 23, 2021, 5:41:48 AM2/23/21
to TRex Traffic Generator
Hi
I have followed the Trex setup introduction. When I try to run
 sudo ./t-rex-64 -f cap2/dns.yaml -c 4 -m 1 -d 10 

I get this error message:
Failed resolving dest MAC for default gateway:2.2.2.2 on port 0

I have tried both Trex version v2.87 and v2.88 with the same result.

Operating system Ubuntu 20.04.2 LTS, kernel: 5.8.0-43-generic #49~20.04.1-Ubuntu SMP

ethernet card is a four port Intel I350
/etc/trex_cfg.yaml

### Config file generated by dpdk_setup_ports.py ###

- version: 2
  interfaces: ['03:00.0', '03:00.1', '03:00.2', '03:00.3']
  port_info:
      - ip: 1.1.1.1
        default_gw: 2.2.2.2
      - ip: 2.2.2.2
        default_gw: 1.1.1.1

      - ip: 3.3.3.3
        default_gw: 4.4.4.4
      - ip: 4.4.4.4
        default_gw: 3.3.3.3

  platform:
      master_thread_id: 0
      latency_thread_id: 1
      dual_if:
        - socket: 0
          threads: [2,3,4,5,6,7,8]

        - socket: 0
          threads: [9,10,11,12,13,14,15]

I have also tried to run sudo ./run_functional_tests
which gives 10 errors (136 tests passed) "This cat is sad, test failed."

It seems like most errors are:
ImportError: cannot import name 'CAPWAP_PKTS' from 'scapy.contrib.capwap' (/opt/trex/v2.88/external_libs/scapy-2.4.3/scapy/contrib/capwap.py)

Probably something I forgotten to setup
Hope some one can help me out

Best regards

hanoh haim

unread,
Feb 24, 2021, 2:39:17 AM2/24/21
to Sorken, TRex Traffic Generator
Hi Sorken, 
Make sure the ports are loopback. 
There is no ARP response. I would try to add '--software' to the CLI 

Thanks
Hanoh

Sorken

unread,
Feb 24, 2021, 2:50:32 AM2/24/21
to TRex Traffic Generator
Hi Hanoh

Thanks for the answer.
I tried to start with  sudo ./t-rex-64 -i --software
from trex-console running portattr I get
..
ARP Resolution  |      unresolved      |      unresolved
.. 

The interfaces is in loopback through a switch. 
I will now try to unlink the NIC driver from dpdk and setup a loopback using iptables and ip route/arp to be sure that the kernel will actually use the loopback just to be sure that it is not anything wrong with that

//

Sorken

unread,
Feb 24, 2021, 3:37:47 AM2/24/21
to TRex Traffic Generator
I have now setup the ports under linux with  routing and  nat and I can communicate through the loopback.
At the moment I don't know what more I could try, except re-install the operating system as this machine have been running more than a year including a upgrade of Ubuntu from 18 to 20 so the problem can be deep down in the system

Best regards 

hanoh haim

unread,
Feb 24, 2021, 4:08:19 AM2/24/21
to Sorken, TRex Traffic Generator
Try to capture the traffic using TRex and work with ``'--software``` mode. work with STL interactive mode 

Thanks
Hanoh

Sorken

unread,
Feb 24, 2021, 4:16:16 AM2/24/21
to TRex Traffic Generator
Hi Hanoh
I started t-rex-64 -i --software
Than I started trex(service)>capture monitor start --rx 0 --tx 0 -v
and trex(service)>arp -p 0
output is
arp - Could not resolve following ports: [0]

#1 Port: 0 ──▶ TX


trex(service)>

    Type: ARP, Size: 42 B, TS: 7.21 [sec]


trex(service)>    ###[ Ethernet ]###
      dst       = ff:ff:ff:ff:ff:ff
      src       = b4:96:91:95:31:fc
      type      = ARP
    ###[ ARP ]###
         hwtype    = 0x1
         ptype     = IPv4
         hwlen     = 6
         plen      = 4
         op        = who-has
         hwsrc     = b4:96:91:95:31:fc
         psrc      = 1.1.1.1
         hwdst     = 00:00:00:00:00:00
         pdst      = 2.2.2.2

is hwdst  00:00:00:00:00:00 correct?

Best regards

hanoh haim

unread,
Feb 24, 2021, 4:20:33 AM2/24/21
to Sorken, TRex Traffic Generator
You should see the request in the other port (in rx side) . There is no answer because there is no packet in port 2.2.2.2  
What is the type of the interface? if it is ESXi make sure to enable to get all the packets (broadcast and multicast) 

Thanks
Hanoh

Sorken

unread,
Feb 24, 2021, 4:29:15 AM2/24/21
to TRex Traffic Generator
Thanks Hanoh for your prompt replies
I am running on bare metal
How do I setup the console so I can see the request on the RX port?
best regards

Sorken

unread,
Feb 24, 2021, 5:13:31 AM2/24/21
to TRex Traffic Generator
It is good to check dmesg also 
in the log this was found

igb_uio 0000:03:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0014 address=0x77da94880 flags=0x0000]

I should also say that I have a AMD Ryzen 7 3700X 8-Core Processor

So I added quiet iommu=soft to the grub cmd line and rebooted and now Trex works 

Now it is time to learn more about the software.

Thanks to you all who have written and maintain Trex 
Reply all
Reply to author
Forward
0 new messages