To enable VLAN tagging, you need two things: the vlan rpm (e.g., vlan-1.8-23) and the 8021q kernel module. Once installed, the vconfig command can be used to create VLAN interfaces on an existing physical device. For more info, see the vconfig( man page.
After your VLAN interfaces are set up and traffic is flowing, you can run Wireshark and capture on the VLAN interface of your choice (e.g., eth0.100 for VLAN 100) or on the underlying physical interface (e.g., eth0). If you choose the former, you will only see frames destined for that VLAN; if you choose the latter, you may see all frames or you may see only untagged frames (if there are any). It depends on the NIC, the NIC firmware, the driver, and the alignment of the moon and planets. (A table enumerating the behaviors of various adapters, firmware versions, and drivers might be useful. -Guy Harris)
If you are capturing on the host system where the VLANs are configured, you will probably not see the VLAN tags in the captured frames -- even if you capture on the physical device. The driver is stripping the tags before the pcap library sees them. See the tech note from Intel mentioned in the Windows section below作者: ziggler 时间: 2009-07-09 12:37 http://wiki.wireshark.org/CaptureSetup/VLAN作者: ziggler 时间: 2009-07-09 12:38 标题: 回复 #1 yjh777 的帖子 http://www.netinst.com/support/osup1056.html作者: yjh777 时间: 2009-07-09 15:19 标题: 回复 #4 ziggler 的帖子 谢谢,,