trex-core
trex-core copied to clipboard
IPv6 Flow Label Corruption
Hi,
I'm using Cisco Trex
to generate IPv6 traffic
for a different set of flow labels to test my lab setup. There are no issues if I send normal IPv6 packets, i.e. without setting any flow label value on the script. The problem comes when I set a value for this flow label field in the IPv6 header which, after a long research and debugging, we discover that Cisco Trex induces a corruption in the flow label value [take a look at the packet with Wireshark
].
At this point, it can be mentioned that the lab setup is working properly because by using iperf3
we manage to test this flow label feature but we would like to generate traffic with Cisco Trex
and DPDK
.
This is the script that I'm currently using for generating the IPv6 packets for a defined flow label
value. The weird thing here is that, if I use a low range number for the flow label, for example, flow label = 10
or flow label = 20
everything works but once I set a high range number like flow label = 88000
it is corrupted somehow.
from trex_stl_lib.api import *
import argparse
class STLS1(object):
def create_stream (self):
pkt_size = 1500
base_pkt = Ether()/Dot1Q(vlan=50)/IPv6(src="fc01:16::1",dst="fc01:48::1",fl=88000)/UDP(dport=12,sport=1025)
payload_size = pkt_size-len(base_pkt)
my_pkt = base_pkt/('5'*(payload_size))
return STLStream(packet = STLPktBuilder(pkt = my_pkt), mode = STLTXCont())
def get_streams (self, tunables, **kwargs):
parser = argparse.ArgumentParser(description='Argparser for {}'.format(os.path.basename(__file__)), formatter_class=argparse.ArgumentDefaultsHelpFormatter)
args = parser.parse_args(tunables)
return [ self.create_stream() ]
def register():
return STLS1()
This is the Cisco Trex IPv4 address
port configuration:
root@srv:/opt/trex/v2.92# cat /etc/trex_cfg.yaml
### Config file generated by dpdk_setup_ports.py ###
- port_limit: 2
version: 2
interfaces: ['02:00.0', '05:00.1']
stack: linux\_based
port_info:
- ip: 4.4.4.1
default_gw: 4.4.4.2
vlan: 50
- ip: 3.3.3.1
default_gw: 3.3.3.2
vlan: 60
platform:
master_thread_id: 0
latency_thread_id: 8
dual_if:
- socket: 0
threads: [1,2,3,4,5,6,7,16,17,18,19,20,21,22,23]
Now, I launch Cisco Trex server
:
root@srv:/opt/trex/v2.92\# ./t-rex-64 -i --stl
And Cisco Trex client
:
root@srv:/opt/trex/v2.92\# ./trex-console
After that, I need to configure the IPv6 address
of Cisco Trex ports under service mode
on the client
side:
trex> start -f stl/my_ipv6_test.py -m 1mbps -p 0
trex> service
trex(service)> ipv6 -p 0 -s fc01:50::5
trex(service)> ipv6 -p 1 -s fc01:60::5
trex(service)> vlan -p 0 --vlan 50
trex(service)> vlan -p 1 --vlan 60
And, at this point, I ping
to the switch in order to verify that I have connection and the destination is reachable:
trex(service)> ping -d fc01:50::3 -p 0
Pinging fc01:50::3 from port 0 over VLAN '50' with 64 bytes of data:
Reply from fc01:50::3: bytes=68, time=0.87ms, hlim=255
Reply from fc01:50::3: bytes=68, time=0.87ms, hlim=255
Reply from fc01:50::3: bytes=68, time=0.87ms, hlim=255
trex(service)> ping -d fc01:60::3 -p 1
Pinging fc01:60::3 from port 1 over VLAN '60' with 64 bytes of data:
Reply from fc01:60::3: bytes=68, time=1.26ms, hlim=255
Reply from fc01:60::3: bytes=68, time=1.26ms, hlim=255
Reply from fc01:60::3: bytes=68, time=1.26ms, hlim=255
trex(service)> service --off
Does anyone have any idea about what is going on?
Thanks for your time, Best regards, Carmen Misa