一台计算机,两个 LAN 适配器,两个 IP 位于同一子网中,并带有 DHCP

一台计算机,两个 LAN 适配器,两个 IP 位于同一子网中,并带有 DHCP

我遇到了网络问题。当 ISP(光纤)为两条线路提供相同的子网时,问题就开始了。eth0 78.56.xxx.xxx eth1 78.56.yyy.yyy

@:route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         78.56.255.254   0.0.0.0         UG    0      0        0 eth0
78.56.192.0     0.0.0.0         255.255.192.0   U     0      0        0 eth0
78.56.192.0     0.0.0.0         255.255.192.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 lan1
172.22.22.0     0.0.0.0         255.255.255.0   U     0      0        0 lan1

@:ifconfig
eth0 inet addr:78.56.xxx.yyy  Bcast:78.56.255.255  Mask:255.255.192.0
eth1 inet addr:78.56.yyy.yyy  Bcast:78.56.255.255  Mask:255.255.192.0

配置(当它是旧 IP 85.206.YYY.YYY 时一切正常):

allow-hotplug eth0 
iface eth0 inet dhcp 

allow-hotplug eth1 
iface eth1 inet dhcp 
  post-up ip route add 78.56.192.0/18 dev eth1 src 78.56.yyy.yyy table eth1 
  post-up ip route add default via 78.56.255.254 dev eth1 table eth1 
  post-up ip rule add table eth1 from 78.56.yyy.yyy

现在 DHCP 更新出现了问题。当使用 ifup 运行 eth1 时,一切正常,但当更新开始时,线路访问就消失了(ifdown eth1 && ifup eth1 并再次正常工作直到更新)

 dhclient[2823]: message repeated 8 times: [ DHCPREQUEST of 78.56.225.235 on eth1 to 78.56.255.254 port 67 (xid=0x6fe207d3)]

dhcpdump:

eth0 
IP: 78.56.XXX.XXX (0:13:3b:f:48:e2) > 78.56.255.254 (0:0:5e:0:1:10) 
 eth1 
IP: 0.0.0.0 (0:13:3b:f:48:e1) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)

可以解决这个问题吗?也许我错过了什么或者做错了什么?

相关内容