4
votes

I can sent a basic packet using scapy and inspect it on the receiving PC using wireshark. When I add a VLAN tag I cannot receive the packet or capture it in wireshark on the origination side

sendp( Ether()/IP(dst="172.16.64.49")/Raw(load="some data"))

sendp( Ether()/Dot1Q(vlan=42)/IP(dst="172.16.64.49")/Raw(load="some data"))

[Ethernet]

dst= 00:15:17:e4:55:52 src= b0:83:fe:e2:df:b7 type= n_802_1Q

[802.1Q}

 prio= 0
 id= 0
 vlan= 42
 type= IPv4

[IP]

    version= 4
    ihl= 5
    tos= 0x0
    len= 29
    id= 1
    flags=
    frag= 0
    ttl= 64
    proto= ip
    chksum= 0x7c32
    src= 172.16.102.92
    dst= 172.16.64.49
    \options\

[Raw]

       load= 'some data'

The data looks as i would expect in scapy, any thoughts?

1

1 Answers

2
votes

It looks like two things happened, the Switches in my network discarded the outer VLAN, this i discovered when i sent a packet with double VLAN encapsulation. only one VLAN label showed up at the receiving side.

The second issue with the local Wireshark not showing the packet sent was a wireshark filter mis-configuration