为什么我会在不同的接口上获得“重复”的本地 IP 地址?

为什么我会在不同的接口上获得“重复”的本地 IP 地址?

我有两个连接到 Ubuntu 服务器的网络接口(一个无线接口和一个 USB 适配器),并且两个接口都具有相同的本地 IP 地址。是否有任何原因或强制其分配不同的 IP 地址的方法?

以下是输出ip addr(mac 被部分屏蔽):

4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether f8:16:XXXX brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.100/24 brd 192.168.1.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::fa16:54ff:fe96:c648/64 scope link 
       valid_lft forever preferred_lft forever
34: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 58:2c:XXX brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.100/24 brd 192.168.1.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::5a2c:80ff:fe13:9263/64 scope link 
       valid_lft forever preferred_lft forever

IP路由:

default via 192.168.1.1 dev eth1  proto static 
192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.100  metric 1 
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.100  metric 9 

猫 /etc/网络/接口

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

#auto wlan0
#iface wlan0 inet dhcp
#post-up route add default via 192.168.1.1 dev wlan0

#auto usb0
#iface usb0 inet dhcp
#post-up route del default dev usb0

root@:~# sudo arp-scan -I eth1 -l

Interface: eth1, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.1.1 00:0d:87XXX Elitegroup Computer System Co. (ECS)

1 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.8.1: 256 hosts scanned in 1.316 seconds (194.53 hosts/sec). 1 responded

root@:~# sudo arp-scan -I wlan0 -l

Interface: wlan0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.1.1 e8:cd:2XXX  (Unknown)
192.168.1.101   20:cXXX (Unknown)

相关内容