cisco-system-traffic-generator / trex-core

trex-core site
https://trex-tgn.cisco.com/
Other
1.29k stars 461 forks source link

arp resolution is not possible with multiple duts on one port #733

Open phschoen opened 3 years ago

phschoen commented 3 years ago

I would like to do a test for 3 different duts with the following setup with :

                    |---> DUT 2 ---|
Port 0 ---> DUT 1---|              |---> Port 1
                    |---> DUT 3 ---|

The traffic is working for a few seconds until the arp is aged on one of DUT 2 or DUT 3. What I did discovered is that the following python api code i use is not adding but overwriting the L3 setup.

c = STLClient(server = '192.178.168.110')                                                                                                                                                                                            
c.connect()                                                                                                                                                                                                                        
c.set_verbose('info')                                                                                                                                                                                                              
c.reset(ports = [0,1])                                                                                                                                                                                                             
c.set_service_mode(ports = [0,1])     
c.set_l3_mode(port = 0, src_ipv4 = '10.1.1.10', dst_ipv4 = '10.1.1.1', vlan=100)
c.set_l3_mode(port = 1, src_ipv4 = '10.1.2.10', dst_ipv4 = '10.1.2.1', vlan=100)
c.set_l3_mode(port = 1, src_ipv4 = '10.1.3.10', dst_ipv4 = '10.1.3.1', vlan=100)

The same problem I have in a simpler setup with 2 different vlans on one port.

Port 0 ---> DUT 1 ---vlan 100---> DUT 2 ---vlan 100(10.1.2.0/24) and vlan 200(10.2.2.0/24)---> Port 1

Changing for each test the /etc/trex_cfg.yaml would not be an option since this would not scale for each test and would also interfere the other running test in case the core would have to be restarted.

If its currently not implemented are there plans to do so?

hhaim commented 3 years ago

@phschoen the API is designed set one default GW and resolve the destination MAC (as a default to all the stream). You can have one default but you can resolve multiple and set it explicitly in the stream. Are you suggesting that TRex does not answer an ARP request from DUT 2/3? Can you provide a pcap