Vlan – How to reliably see VLAN tags on a client

vlan

I am investigating some CPEs that might not be properly tagging frames. What can I use to reliably capture the raw packet with 802.1q tag? It becomes a problem because the driver/firmware might be stripping the tag before the packet is passed on to wireshark/tcpdump.

The same goes with generating tagged traffic. How can I know for sure the frames sent out on the wire are actually tagged when I generate QinQ frames with Ostinato, but the OS driver (such as Windows 10 + Intel ANT) doesn't even support VLAN features.

The NICs I am using are all Intel (i340-T4 etc). The CPE in question are some Mikrotik RB4xx/7xx with Atheros switching chip and some unmanaged switches (testing how they handled tagged frames). I suspect there are some bugs in switch chip tagging that's why I don't decided to take a look into what's actually being sent/received. From what I have read most Intel NICs process VLAN tags in hardware and do not pass it up.

Best Answer

Windows has no built-in support mechanisms for VLANs. There aren't separate physical and VLAN interfaces you can capture from, unless a specialized driver that adds such support is present.

So whether you see VLAN tags in Wireshark or not will depend on the network adapter you have and on what it and its driver do with VLAN tags.

Most "simple" network adapters (e.g. widely used Realtek RTL 8139) and their drivers will simply pass VLAN tags to the upper layer to handle these. In that case, Wireshark will see VLAN tags and can handle and show them.

Some more sophisticated adapters will handle VLAN tags in the adapter and/or the driver. This includes some Intel adapters and, as far as i know, Broadcom gigabit chipsets (NetXtreme / 57XX based chips). Moreover, it is likely that cards that have specialized drivers will follow this path as well, to prevent interference from the "real" driver.

source

On a cisco switches diffrent models needs diffrent config. for example at destination interface encapsulation dot1q needs to be added this will allow switch copy vlan tags to output port.