有问题的计算机具有Linux SO并连接到具有DHCP服务活动的本地网络。我配置了一个由DHCP提供给该计算机的公共IP地址,我可以使用这个IP地址进入它。现在是奇怪的部分。
ifconfig
返回169.254.x.x地址。我有 读 当DHCP无法为其提供正确的地址时,会将169.254.x.x提供给计算机。但它确实提供了一个正确的地址,我可以(使用公共IP地址)和网站作为 http://www.whatsmyip.org/ 告诉我计算机有我在DHCP上配置的公共IP地址。
这怎么可能,我应该在这篇文章中包含哪些细节?
当我让我的同事重新启动他的网络时
/etc/init.d/net.eth0 restart
这是他的输出:
* Caching service dependencies ... [ ok ]
* Unmounting network filesystems ... [ ok ]
* Bringing down interface eth0
* Stopping dhcpcd on eth0 ... [ ok ]
* Bringing up interface eth0
* dhcp ...
* Running dhcpcd ...
control_open: Connection refused
eth0: adding address fe80::f85f:1ef7:db63:7475
eth0: waiting for carrier
eth0: carrier acquired
DUID 00:01:00:01:1b:ef:52:ea:dc:85:de:20:38:fa
eth0: IAID a9:04:2c:82
eth0: soliciting an IPv6 router
eth0: rebinding lease of 193.136.136.136
eth0: probing for an IPv4LL address
eth0: DHCP lease expired
eth0: soliciting a DHCP lease
eth0: using IPv4LL address 169.254.78.15
eth0: adding route to 169.254.0.0/16
forked to background, child pid 6332 [ ok ]
* received address 169.254.78.15/16 [ ok ]
* Mounting network filesystems ...
的输出 ifconfig
如下:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.78.15 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::f85f:1ef7:db63:7475 prefixlen 64 scopeid 0x20<link>
ether 48:85:a3:04:2d:81 txqueuelen 1000 (Ethernet)
RX packets 113090 bytes 80195148 (76.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39425 bytes 7462270 (7.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 2259 bytes 217008 (211.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2259 bytes 217008 (211.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether df:83:de:11:37:fb txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ip addr
显示两个IP,169.x.x.x和193.x.x.x.仍然没有发现为什么169.x.x.x由DHCP服务器给出。
ifconfig
?
ifconfig
在其他计算机上使用时返回?
/etc/network/interfaces
文件来管理您的连接?