[Query] How to run Trex server with Geneve Tunnel Endpoint ?

288 views
Skip to first unread message

Pradipta Sahoo

unread,
Apr 29, 2021, 6:12:53 AM4/29/21
to TRex Traffic Generator
Hi,

I would like an expert suggestion to run the Trex server with Geneve TEP over the vlan network. In v2.89, it seems scapy-2.4.3 under external_lib scripts support Geneve protocol, but so far I could not find way to run the Trex server with external_lib support to use Geneve TEP.  So, could you please suggest the process to configure the Trex server with Geneve tunnel endpoint over the VLAN network and please share if there is any available reference document on it.


Regards,
Pradipta Sahoo

Besart Dollma

unread,
Apr 30, 2021, 2:35:52 AM4/30/21
to TRex Traffic Generator
Hi Pradipta, 
Good question, I am not so sure about the answer however I will try to provide my insight. Maybe Hanoch will know better. 

- If you intend to use it in stateless, it shouldn't be a problem. Build the packets with Scapy as you can build any other packet and run it.
- Regarding ASTF, I don't think it is supported.
Thanks,

Pradipta Sahoo

unread,
May 3, 2021, 12:31:38 AM5/3/21
to Besart Dollma, TRex Traffic Generator, hh...@cisco.com, Jaison Raju, Venkata Kommaddi
++Adding "Hanoch Haim" 

Hi Besart,

Thank you for the information.

On Fri, Apr 30, 2021 at 12:06 PM Besart Dollma <besi7...@gmail.com> wrote:
Hi Pradipta, 
Good question, I am not so sure about the answer however I will try to provide my insight. Maybe Hanoch will know better. 

- If you intend to use it in stateless, it shouldn't be a problem. Build the packets with Scapy as you can build any other packet and run it.
Yes, we plan to use the STL framework. I think we can use a similar packet builder [1] to build the Geneve header. But looking at the underlying VLAN network I think the STL stream need to add with an extra VLAN id [2]. Could please guide us if there are additional configuration changes required?

[1] https://github.com/cisco-system-traffic-generator/trex-core/blob/master/scripts/stl/udp_1pkt_vxlan.py
- Regarding ASTF, I don't think it is supported.
We explore it later. 
Thanks,

On Thursday, April 29, 2021 at 1:12:53 PM UTC+3 psa...@redhat.com wrote:
Hi,

I would like an expert suggestion to run the Trex server with Geneve TEP over the vlan network. In v2.89, it seems scapy-2.4.3 under external_lib scripts support Geneve protocol, but so far I could not find way to run the Trex server with external_lib support to use Geneve TEP.  So, could you please suggest the process to configure the Trex server with Geneve tunnel endpoint over the VLAN network and please share if there is any available reference document on it.


Regards,
Pradipta Sahoo

--
You received this message because you are subscribed to a topic in the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trex-tgn/IM_Abt1zFvk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/e42ff4a4-4106-4839-b435-6d36cedf25bbn%40googlegroups.com.


--
Regards,
Pradipta Sahoo
Performance & Scale Engineering

Jaison Raju

unread,
May 3, 2021, 3:01:42 AM5/3/21
to Pradipta Sahoo, Besart Dollma, TRex Traffic Generator, hh...@cisco.com, Venkata Kommaddi
Hi Pradipta,

I haven't tried this before, but I think something like this should work:
base_pkt = Ether(src=trex_mac,dst=tunnel_ep_mac) / Dot1Q(vlan=tenant_vlan) / IP(src=trex_ip,dst=tunnel_ep_ip) / GENEVE(vni=tenant_vni,options=?,proto=?) / Ether() / IP() / UDP(dport=12,sport=1008)'

Make sure to import geneve as by default ./automation/trex_control_plane/interactive/trex/stl/api.py only imports the following:
from scapy.all import Ether, IP, TCP, UDP

Regards,

JAISON RAJU

Associate Manager, Software Engineering

Performance & SCale Engineering

jr...@redhat.com   



Pradipta Sahoo

unread,
May 19, 2021, 8:21:41 AM5/19/21
to hh...@cisco.com, TRex Traffic Generator, Besart Dollma, Venkata Kommaddi, Jaison Raju, Haresh Khandelwal
Hi,

To build Geneve packet through scapy, could you please guide how to maintain the variable options fields as OVN use the options field for tunnel network?

Geneve Header:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|  Opt Len  |O|C|    Rsvd.  |          Protocol Type        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Virtual Network Identifier (VNI)       |    Reserved   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Variable Length Options                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Geneve tunnel Tcpdump between two vms
# tcpdump -vvv -nei mlx-bond1
dropped privs to tcpdump
tcpdump: listening on mlx-bond1, link-type EN10MB (Ethernet), capture size 262144 bytes
13:28:41.343233 0c:42:a1:d1:da:98 > 0c:42:a1:d1:d5:80, ethertype 802.1Q (0x8100), length 160: vlan 304, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 26194, offset 0, flags [none], proto UDP (17), length 142)
    172.17.2.32.57025 > 172.17.2.126.geneve: [no cksum] Geneve, Flags [none], vni 0x4, proto TEB (0x6558), options [class Open Virtual Networking (OVN) (0x102) type 0x80(C) len 8 data 00020003]
        fa:16:3e:81:fa:0f > fa:16:3e:95:87:2d, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 59822, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.2.92 > 192.168.2.161: ICMP echo request, id 5026, seq 301, length 64

We tried below scapy packet build, but as soon as start traffic with 1pps rate, all the network of DUT get broken and the node gets crashed.

from scapy.contrib.geneve import GENEVE
<..trim..>
pkt = Ether(dst='0c:42:a1:d1:da:98',src='40:a6:b7:0b:e9:b1')/Dot1Q(vlan=304,type='IPv4')/IP(proto=17,src='172.17.2.161',dst='172.17.2.32')/UDP(sport=1337,dport=6081)/GENEVE(proto=0x6558,vni=0x004,options="'0x102','0x80','8','004002'")/Ether(dst='fa:16:3e:81:fa:0f',src='fa:16:3e:e7:a9:8a',type=0x0800)/IP(proto=1,dst='192.168.2.181',src='192.168.2.92')/ICMP(type=8)/('x'*20)


We tried to collect the dump information, which indicates bad length. Could you please suggest the applicable options to use the options ^^ field in scapy packet builder?
  1. # tcpdump -vv -nei mlx-bond1                                                                                                                                                      
  2. dropped privs to tcpdump
  3. tcpdump: listening on mlx-bond1, link-type EN10MB (Ethernet), capture size 262144 bytes
  4. 08:48:23.676643 40:a6:b7:0b:e9:b1 > 0c:42:a1:d1:da:98, ethertype 802.1Q (0x8100), length 143: vlan 304, p 0, ethertype IPv4, (tos 0x0, ttl 64id 1, offset 0, flags [none], proto UDP (17), length 125)          
  5.     172.17.2.161.menandmice-dns > 172.17.2.32.geneve: [udp sum ok] Geneve, Flags [none], vni 0x4, proto TEB (0x6558), options [class Unknown (0x2730) type 0x78 len 72 [bad length]]                              
  6.         16:3e:e7:a9:8a:08 > 16:3e:81:fa:0f:fa, 802.3, length 69: LLC, dsap Null (0x00) Individual, ssap Null (0x00) Command, ctrl 0x0030: Information, send seq 24, rcv seq 0, Flags [Command], length 47        
  7.         0x0000:  0000 3000 0100 0040 01f4 6ac0 a802 5cc0  ..0....@..j...\.
  8.         0x0010:  a802 b508 0043 4b00 0000 0078 7878 7878  .....CK....xxxxx
  9.         0x0020:  7878 7878 7878 7878 7878 7878 7878 78    xxxxxxxxxxxxxxx
Reply all
Reply to author
Forward
0 new messages