我有一个基于 Debian 的 DHCP 服务器,其中为我们网络中的每个 VLAN(vlan10_)配置了网络接口,以及没有 VLAN 的网络上的一个接口(eth0)。
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1496 qdisc mq state UP group default qlen 1000
link/ether 00:1e:0b:8e:1e:5a brd ff:ff:ff:ff:ff:ff
inet 10.91.1.4/16 brd 10.91.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::21e:bff:fe8e:1e5a/64 scope link
valid_lft forever preferred_lft forever
5: vlan101@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1496 qdisc noqueue state UP group default
link/ether 00:1e:0b:8e:1e:5a brd ff:ff:ff:ff:ff:ff
inet 10.91.101.4/24 brd 10.91.101.255 scope global vlan101
valid_lft forever preferred_lft forever
inet6 fe80::21e:bff:fe8e:1e5a/64 scope link
valid_lft forever preferred_lft forever
6: vlan102@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1496 qdisc noqueue state UP group default
link/ether 00:1e:0b:8e:1e:5a brd ff:ff:ff:ff:ff:ff
inet 10.91.102.4/24 brd 10.91.102.255 scope global vlan102
valid_lft forever preferred_lft forever
inet6 fe80::21e:bff:fe8e:1e5a/64 scope link
valid_lft forever preferred_lft forever
etc.
DHCP 服务器连接到中央交换机,并且我们的 VLAN 由也连接到中央交换机的交换机提供服务。
我们注意到我们看到每个 DHCPREQUEST 两次:在相关的 vlan10_ 接口和 eth0 上。
09:18:25 DHCPREQUEST for 10.91.117.95 (10.91.117.4) from c8:1e:e7:38:9a:3a (iPhone) via vlan117
09:18:25 DHCPACK on 10.91.117.95 to c8:1e:e7:38:9a:3a (iPhone) via vlan117
09:18:25 DHCPREQUEST for 10.91.117.95 (10.91.117.4) from c8:1e:e7:38:9a:3a (iPhone) via eth0: wrong network.
09:18:25 DHCPNAK on 10.91.117.95 to c8:1e:e7:38:9a:3a via eth0
我还验证了,如果我从 VLAN 上的计算机广播流量,则数据包会被我们 DHCP 服务器上的 tcpdump 两次拾取。在 VLAN 上的计算机上:
netcat -ub 255.255.255.255 6767
foopacket
关于 DHCP:
tcpdump -vv -i any port 6767
09:25:08.303594 ethertype IPv4, IP (tos 0x0, ttl 64, id 13069, offset 0, flags [DF], proto UDP (17), length 38)
10.91.122.190.38610 > 255.255.255.255.6767: [udp sum ok] UDP, length 10
09:25:08.303594 IP (tos 0x0, ttl 64, id 13069, offset 0, flags [DF], proto UDP (17), length 38)
10.91.122.190.38610 > 255.255.255.255.6767: [udp sum ok] UDP, length 10
DHCP 服务器上的路由表可清晰了解网络布局:
0.0.0.0 10.90.4.1 0.0.0.0 UG 0 0 0 vlan100
10.90.0.0 0.0.0.0 255.255.0.0 U 0 0 0 vlan100
10.91.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
10.91.101.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan101
10.91.102.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan102
10.91.103.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan103
etc.
DHCP 服务器上的网络接口配置:
iface eth0 inet static
address 10.91.1.4
netmask 255.255.0.0
mtu 1496
auto vlan100
iface vlan100 inet static
address 10.90.0.4
netmask 255.255.0.0
gateway 10.90.4.1
mtu 1496
vlan_raw_device eth0
auto vlan101
iface vlan101 inet static
address 10.91.101.4
netmask 255.255.255.0
mtu 1496
vlan_raw_device eth0
auto vlan102
iface vlan102 inet static
address 10.91.102.4
netmask 255.255.255.0
mtu 1496
vlan_raw_device eth0
eth0 接口是否因为服务器配置而捕获 VLAN 标记数据包以及特定的 vlan10_ 接口,或者网络本身是否存在问题,导致流量逃离 VLAN 并在管理网络上取消标记?
谁能帮助我理解为什么 DHCP 服务器会看到重复流量?
谢谢