https://bugzilla.redhat.com/show_bug.cgi?id=498981#c4
https://serverfault.com/questions/544651/vlan-tags-not-shown-in-packet-capture-linux-via-tcpdump
加-e参数,可以将VLAN信息显示在console界面。
-e
Print the link-level header on each dump line. This can be used, for example, to print MAC layer addresses for protocols such as Ethernet and IEEE 802.11.
上面的总结只是作用于在console上的打印,如果是保存到文件-w,问题应该是 -i any 导致。需要指定-i为特定的interace,带VLAN的interface。而不能是any。
-i interface
–interface=interface
Listen on interface. If unspecified, tcpdump searches the system interface list for the lowest numbered, configured up interface (excluding loopback), which may turn out to be, for example, ‘eth0’.
On Linux systems with 2.2 or later kernels, an interface argument of ‘any’ can be used to capture packets from all interfaces. Note that captures on the ‘any’ device will not be done in promiscuous mode. 这里有说promiscuous的mode文章来源:https://www.toymoban.com/news/detail-637236.html
如果抓取不到 v文章来源地址https://www.toymoban.com/news/detail-637236.html
到了这里,关于Linux: network: tools: tcpdump,抓取vlan包需要注意的事情;不然会出现LLC协议的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!