Reg: MPLS and GRE support in TREX

526 views
Skip to first unread message

Manimaran J

unread,
Aug 18, 2016, 10:17:34 AM8/18/16
to TRex Traffic Generator
Hi Team,
           When i was trying to send MPLS traffic from TREX i got the below error. I am using TREX version v2.02
           It will be helpful if i got MPLS and GRE support related information in detail.

Error:

Python Traceback follows:

  File "stl/traffic_bng_eth.py", line 63, in get_streams
    return [ self.create_stream() ]
  File "stl/traffic_bng_eth.py", line 12, in create_stream
    base_pkt = Ether(type=0x8847)/MPLS(label=255,s=0,ttl=64)/IP(proto="GRE")/UDP()
NameError: global name 'MPLS' is not defined


Regards,
Manimaran

Itay Marom

unread,
Aug 18, 2016, 10:28:28 AM8/18/16
to Manimaran J, TRex Traffic Generator
Hi Manimaran,

TRex is using Scapy to provide packet building support.

Going a bit through Scapy, it seems that MPLS packet building is supported on the contrib directory but not as part of the layers.
so adding:
from scapy.contrib.mpls import MPLS

I suggest you first research Scapy on how to build the packet you like, and when this succeeds, advance to TRex to check it out.

running your line on a clean Scapy gives the same error - so you might try to make this specific line work on scapy and then advance.

Thanks,
Itay

--
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+unsubscribe@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/18fd14a4-2858-44d8-8782-271a221339e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Itay Marom

hanoh haim

unread,
Aug 18, 2016, 4:49:39 PM8/18/16
to Itay Marom, Manimaran J, TRex Traffic Generator

Manimaran J

unread,
Aug 19, 2016, 6:42:41 AM8/19/16
to hanoh haim, Itay Marom, TRex Traffic Generator
Thank you.Now i can able to create MPLS packets.


Regards,
Manimaran
Reply all
Reply to author
Forward
0 new messages