Chinaunix

标题: broadcom 网卡丢掉带vlan tag的报文,如何设置使不丢弃 [打印本页]

作者: yjh777    时间: 2009-07-09 11:24
标题: broadcom 网卡丢掉带vlan tag的报文,如何设置使不丢弃
如题,

测试环境上用的broadcom网卡,默认会丢掉vlan报文;如何改这个设置
有人遇到过这种情况吗?是在linux环境下。




----------------------------------------------------------------------------------------------------------------------------------------
问题找到了,不是网卡丢报文,是交换网板把报文丢掉了;
非常感谢ziggler的热心回复,,

[ 本帖最后由 yjh777 于 2009-7-9 20:21 编辑 ]
作者: ziggler    时间: 2009-07-09 11:24
标题: 回复 #1 yjh777 的帖子
Linux

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 的帖子
谢谢,,

可是为什么普通的网卡不配vlan,tcpdump也可以抓到vlan报文啊?

broadcom网卡却不行,只能抓到发出去的;对端broadcom卡一个也没抓到,,
作者: ssffzz1    时间: 2009-07-10 21:37
你没开启VLAN TAG的话,当网卡收到VLAN TAG报文就丢弃了。

WIN系统可以通过修改注册表解决。LINUX的方法就是开启VLAN tag




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2