69
我的接口上有一个 VLAN ID,enp101s0f0
但是没有接收到任何数据包:
enp101s0f0.69: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.15.2.5 netmask 255.255.255.248 broadcast 10.15.2.7
inet6 fe80::20f:53ff:fe56:2390 prefixlen 64 scopeid 0x20<link>
ether 00:0f:53:56:23:90 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
但是未标记的接口正在接收带有 VLAN ID 标记的数据包69
:
enp101s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::20f:53ff:fe56:2390 prefixlen 64 scopeid 0x20<link>
ether 00:0f:53:56:23:90 txqueuelen 1000 (Ethernet)
RX packets 5814204 bytes 485470187 (462.9 MiB)
如图所示tcpdump
:
[root@box-04 ~]# tcpdump -i enp101s0f0 -nn -e vlan
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp101s0f0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:41:46.911547 2c:33:11:f9:9b:1e > 01:00:0c:cc:cc:cd, ethertype 802.1Q (0x8100), length 68: vlan 69, p 7, LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Cisco (0x00000c), pid PVST (0x010b), length 42: STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id 80af.2c:33:11:f9:9b:41.8097, length 42
我认为路由表设置正确:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.15.0.1 0.0.0.0 UG 0 0 0 eno1
10.15.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
10.15.2.0 0.0.0.0 255.255.255.248 U 0 0 0 enp101s0f0.69
这可能是什么问题?
编辑
ip -s -s -d link show dev
这两个接口的情况如下:
[root@box-04 ~]# ip -s -s -d link show dev enp101s0f0
4: enp101s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq portid 000f53562390 state UP mode DEFAULT qlen 1000
link/ether 00:0f:53:56:23:90 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64
RX: bytes packets errors dropped overrun mcast
485969816 5820208 0 6 0 5815704
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
4675014 72946 0 0 0 0
TX errors: aborted fifo window heartbeat transns
0 0 0 0 4
[root@box-04 ~]# ip -s -s -d link show dev enp101s0f0.69
6: enp101s0f0.69@enp101s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000
link/ether 00:0f:53:56:23:90 brd ff:ff:ff:ff:ff:ff promiscuity 0
vlan protocol 802.1Q id 698 <REORDER_HDR> addrgenmode eui64
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
7832 36 0 0 0 0
TX errors: aborted fifo window heartbeat transns
0 0 0 0 2
答案1
从输出的第三行可以看出ip -s -s -d link show dev enp101s0f0.69
,此接口的 vlan id 是698, 不是69。所以,这只是一个配置错误或打字错误。