ASTF server missing VLAN tags

180 views
Skip to first unread message

Natarajan M

unread,
May 24, 2019, 2:01:33 PM5/24/19
to TRex Traffic Generator
Hi,

I'm running ASTF in split mode (astf-client on server-A & astf-sever on server-B) with Mellanox connectx-5 NIC & linux.

Client starts traffic with VLAN tag as per trex_cfg.yaml, but server doesnt include any VLAN tag while sending back (Thought in ASTF mode, server learns VLAN from incoming packet although I also had vlan in /etc/trex_cfg.yaml. Any help to work-around to make sure that server can also respond with VLAN tag will be of great help. Appreciate any pointers.

SYN

###[ Ethernet ]### 
  dst= 00:00:00:40:08:02
  src= 00:00:00:40:08:01
  type= 0x8100
###[ 802.1Q ]### 
     prio= 0L
     id= 0L
     vlan= 1L
     type= 0x800
###[ IP ]### 
        version= 4L
        ihl= 5L
        tos= 0x0
        len= 60
        id= 0
        flags= DF
        frag= 0L
        ttl= 127
        proto= tcp
        chksum= 0xf79a
        src= 2.0.0.1
        dst= 2.0.0.33
        \options\
###[ TCP ]### 
           sport= 41668
           dport= http
           seq= 846930886
           ack= 0
           dataofs= 10L
           reserved= 0L
           flags= S
           window= 32768
           chksum= 0x0
           urgptr= 0
           options= [('MSS', 1460), ('NOP', None), ('WScale', 0), ('NOP', None), ('NOP', None), ('Timestamp', (1804289383, 0))]

SYN/ACK response from server

###[ Ethernet ]### 
  dst= 00:00:00:40:08:01
  src= 00:00:00:40:08:02
  type= 0x800
###[ IP ]### 
     version= 4L
     ihl= 5L
     tos= 0x0
     len= 60
     id= 0
     flags= DF
     frag= 0L
     ttl= 127
     proto= tcp
     chksum= 0xf79a
     src= 2.0.0.33
     dst= 2.0.0.1
     \options\
###[ TCP ]### 
        sport= http
        dport= 41668
        seq= 1804116595
        ack= 846930887
        dataofs= 10L
        reserved= 0L
        flags= SA
        window= 32768
        chksum= 0x0
        urgptr= 0
        options= [('MSS', 1460), ('NOP', None), ('WScale', 0), ('NOP', None), ('NOP', None), ('Timestamp', (1681693964, 1804289383))]



Thanks
Natarajan

hanoh haim

unread,
May 25, 2019, 1:46:55 PM5/25/19
to Natarajan M, TRex Traffic Generator
The code shows that the server will respond with the same vlan of the SYN.

Did you capture both on the server side using TRex?

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/77ec637f-e399-4011-9eaa-22c3f89774b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Hanoh
Sent from my iPhone

hanoh haim

unread,
May 26, 2019, 3:24:38 AM5/26/19
to Natarajan M, TRex Traffic Generator
testing it with our setup 

$more /etc/trex_cfg_vlan.yaml
### Config file generated by dpdk_setup_ports.py ###

- port_limit: 2
  version: 2
  interfaces: ['04:00.0', '04:00.1']
  port_info:
      - ip: 1.1.1.1
        default_gw: 2.2.2.2
        vlan: 1
      - ip: 2.2.2.2
        default_gw: 1.1.1.1
        vlan: 1

  platform:
      master_thread_id: 0
      latency_thread_id: 14
      dual_if:
        - socket: 0
          threads: [1,2,3,4,5,6,7,8,9,10,11,12,13]

trex>capture record start --tx 1 --rx 1 -l 1000
trex>capture record stop --id 1 -o /tmp/out.pcap

shows that the pcap is with VLAN (the server does not require  the valn configuration) 


image.png
out.pcap

Natarajan M

unread,
May 26, 2019, 11:04:12 AM5/26/19
to hanoh haim, TRex Traffic Generator
Thanks. Yes, when I move to dpdk mode, it worked fine but if I use linux interface mode instead of DPDK, it doesnt work.

Thanks
Natarajan

opiekelly

unread,
May 28, 2019, 1:24:58 PM5/28/19
to trex...@googlegroups.com
Hello, I am running a SDWAN test and need to bring down the MTU.  However when I look at the capture on the wire from the trex port I see full 1460 mss.

Below are the configurations.



root@ansible-/home/bkelly/trex/v2.56#cat astf/vip1.py
from trex.astf.api import *

class Prof1():
    def __init__(self):
        pass

    def get_profile(self, **kwargs):
        ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.1", "16.0.0.255"], distribution="seq")
        ip_gen_s = ASTFIPGenDist(ip_range=["48.0.0.1", "48.0.0.255"], distribution="seq")
        ip_gen = ASTFIPGen(dist_client=ip_gen_c, dist_server=ip_gen_s)

        c_glob_info = ASTFGlobalInfo()
        c_glob_info.tcp.mss = 1300
        c_glob_info.tcp.initwnd = 1

        s_glob_info = ASTFGlobalInfo()
        s_glob_info.tcp.mss = 1300
        s_glob_info.tcp.initwnd = 1

        return ASTFProfile(default_ip_gen=ip_gen, cap_list=[
          ASTFCapInfo(file="../avl/delay_10_http_browsing_0.pcap", cps=1)
        ])


def register():
    return Prof1()


[root@trex astf]# cat /etc/trex_cfg.yaml
- port_limit      : 2
  version         : 2
  prefix          : trex-1
  limit_memory    : 2048
#List of interfaces. Change to suit your setup. Use ./dpdk_setup_ports.py -s to see available options
  interfaces    : ["81:00.2","81:00.3"]
  stack: linux_based
  port_info       :  # Port IPs. Change to suit your needs. In case of loopback, you can leave as is.
          - ip         : 4.4.0.2
            default_gw : 4.4.0.254
            #dest_mac : 3c:fd:fe:a4:ca:2b
            vlan       : 104
          - ip         : 12.12.0.2
            default_gw : 12.12.0.254
            #dest_mac  : 3c:fd:fe:a4:ca:2a
            vlan       : 112



opiekelly

unread,
May 28, 2019, 3:32:38 PM5/28/19
to trex...@googlegroups.com
Disregard, noticed my “return” section was incorrect.
> <Screen Shot 2019-05-28 at 11.18.00 AM.png>
>
>

Reply all
Reply to author
Forward
0 new messages