STL scapy IGMP issue

317 views
Skip to first unread message

andyb...@googlemail.com

unread,
Jan 10, 2019, 2:08:41 PM1/10/19
to TRex Traffic Generator

Hi,

 

...I have a problem constructing proper IGMP report messages with scapy. This used to work (don't know when exactly this broke), but my code has been untouched for a pretty long time ?!? Still not sure where the problem lies – any hint on how to troubleshoot that highly appreciated!

 

 

the code in question is fairly straight forward:

 

a=Ether(src=s.dst_mac)/Dot1Q(vlan=s.dst_outer_vlan)/Dot1Q(vlan=s.dst_vlan)

b=IP(src=s.dst_ip)

igmp=scapy.contrib.igmp.IGMP(type=0x16, gaddr=s.dst_mc)

igmp.igmpize(b, a)

pkt = a/b/igmp

 

s.dst_mac :

 

 

The generate scapy packet looks perfect:

 

 

###[ Ethernet ]###

  dst       = 01:00:5e:7f:20:3d

  src       = 00:33:33:33:00:2a

  type      = 0x8100

###[ 802.1Q ]###

     prio      = 0

     id        = 0

     vlan      = 601

     type      = 0x8100

###[ 802.1Q ]###

        prio      = 0

        id        = 0

        vlan      = 32

        type      = 0x800

###[ IP ]###

           version   = 4

           ihl       = None

           tos       = 0x0

           len       = None

           id        = 1

           flags     =

           frag      = 0

           ttl       = 1

           proto     = igmp

           chksum    = None

           src       = 172.17.32.61

           dst       = 239.255.32.61

           \options   \

            |###[ IP Option Router Alert ]###

            |  copy_flag = 1

            |  optclass  = control

            |  option    = router_alert

            |  length    = 4

            |  alert     = router_shall_examine_packet

###[ IGMP ]###

              type      = Version 2 - Membership Report

              mrtime    = 0

              chksum    = None

              gaddr     = 239.255.32.61 ß this is expected

 

 

But when capturing at the switch connected to the TRex-Ports I get:

 

Internet Protocol Version 4, Src: 172.17.32.61 (172.17.32.61), Dst: 239.255.32.61 (239.255.32.61)

    Version: 4

    Header Length: 24 bytes

    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))

        0000 00.. = Differentiated Services Codepoint: Default (0x00)

        .... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)

    Total Length: 36

    Identification: 0x0001 (1)

    Flags: 0x00

        0... .... = Reserved bit: Not set

        .0.. .... = Don't fragment: Not set

        ..0. .... = More fragments: Not set

    Fragment offset: 0

    Time to live: 1

    Protocol: IGMP (2)

    Header checksum: 0x4848 [validation disabled]

        [Good: False]

        [Bad: False]

    Source: 172.17.32.61 (172.17.32.61)

    Destination: 239.255.32.61 (239.255.32.61)

    [Source GeoIP: Unknown]

    [Destination GeoIP: Unknown]

    Options: (4 bytes), Router Alert

        Router Alert (4 bytes): Router shall examine packet (0)

            Type: 148

                1... .... = Copy on fragmentation: Yes

                .00. .... = Class: Control (0)

                ...1 0100 = Number: Router Alert (20)

            Length: 4

            Router Alert: Router shall examine packet (0)

Internet Group Management Protocol

    [IGMP Version: 2]

    Type: Membership Report (0x16)

    Max Resp Time: 0.0 sec (0x00)

    Header checksum: 0x3231 [incorrect, should be 0x799a]

    Multicast Address: 55.49.57.52 (55.49.57.52) ß this is wrong

VSS-Monitoring ethernet trailer, Source Port: 0

    Src Port: 0

 

I’m currently a bit lost on what to try next ?! MC *did* work in the past, but is not very important, so nobody took a look at this (MC streams are currently not running in production – only in the lab). Might be broken for a longer time already?! Is the wrong igmp header checksum related to this?!

 

Thanks,

 

Andreas

 

 

 

 

Yaroslav Brustinov

unread,
Jan 10, 2019, 2:23:34 PM1/10/19
to Andreas Bourges, TRex Traffic Generator
Hi,

Please check before this commit (v2.49):

image.png

--
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/00a201d4a917%24e5759fa0%24b060dee0%24%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Yaroslav Brustinov

unread,
Jan 10, 2019, 3:56:18 PM1/10/19
to Andreas Bourges, TRex Traffic Generator
Will be fixed in next version :)

Andreas Bourges

unread,
Jan 10, 2019, 4:46:29 PM1/10/19
to Yaroslav Brustinov, TRex Traffic Generator
Great!

Thanks,

Andreas
-- sent from mobile

andyb...@googlemail.com

unread,
Jan 11, 2019, 6:13:33 AM1/11/19
to Yaroslav Brustinov, hanoh haim, TRex Traffic Generator

…just pulled master containing the reverted igmp commit and the merged PR for services fmt option.

 

MC run’s fine – looks good!

 

Thanks for reacting so fast!

 

Andreas

hanoh haim

unread,
Jan 11, 2019, 6:16:19 AM1/11/19
to Andreas Bourges, Yaroslav Brustinov, TRex Traffic Generator
Hi,
master includes your PR now. 
let's us know if there are more issues

Hanoh
--
Hanoh
Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages