怎么样在PC上抓取vlan信息的数据包

最好可以显示vlan所用的协议、ID等详细信息
2025-06-27 16:53:57
推荐回答(1个)
回答1:

在linux下比较方便:
先添加一个vlan接口

#vconfig add eth0 10
再抓包
# tcpdump -i eth0 -n -e
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:44:45.069868 3c:97:0e:57:8c:e1 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 10, p 0, ethertype ARP, Request who-has 192.168.10.2 tell 192.168.10.1, length 28

显示 802.1q ,vlan号是20