ip addr
显示:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:6d:5e:86:29:49 brd ff:ff:ff:ff:ff:ff
inet X.X.X.X/24 brd X.X.X.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2604:X:X:X::11/64 scope global deprecated
valid_lft forever preferred_lft 0sec
inet6 fe80::X:X:X:X/64 scope link
valid_lft forever preferred_lft forever
deprecated
特别是,我对其中的和感到好奇preferred_lft 0sec
。
我的系统日志一遍又一遍重复这样的事情:
dhclient: PRC: Address 2604:X:X:X::11 depreferred.
dhclient: PRC: Address 2604:X:X:X::11 expired.
dhclient: PRC: Bound lease is devoice of active addresses. Re-initializing.
dhclient: XMT: Solicit on eth0, interval 1010ms.
dhclient: RCV: Advertise message on eth0 from ::.
dhclient: XMT: Request on eth0, interval 920ms.
dhclient: RCV: Reply message on eth0 from ::.
大约四秒钟后,它又重复了一次。我可以看到地址在输出中出现又消失ip addr
。
当地址存在时,我可以 ping 网关:
64 bytes from 2604:X:X:X::1: icmp_seq=1 ttl=255 time=0.318 ms
64 bytes from 2604:X:X:X::1: icmp_seq=2 ttl=255 time=0.277 ms
64 bytes from 2604:X:X:X::1: icmp_seq=3 ttl=255 time=0.336 ms
64 bytes from 2604:X:X:X::1: icmp_seq=4 ttl=255 time=0.324 ms
ping: sendmsg: Network is unreachable
ping: sendmsg: Network is unreachable
64 bytes from 2604:X:X:X::1: icmp_seq=7 ttl=255 time=0.316 ms
64 bytes from 2604:X:X:X::1: icmp_seq=8 ttl=255 time=0.321 ms
64 bytes from 2604:X:X:X::1: icmp_seq=9 ttl=255 time=0.331 ms
64 bytes from 2604:X:X:X::1: icmp_seq=10 ttl=255 time=0.327 ms
但如果我尝试从互联网 ping 该主机,它会认为
IP6 :: > ff02:1:ff00:11: ICMP6, neighbor solicitation, who has 2604:X:X:X::11, length 24
多次,但从未发送响应。ip maddr show
列出。inet6 ff02::1:ff00:11
eth0
此时我已经没什么可找的了。问题可能出在哪里?特别是,DHCP 中即将过期的地址是怎么回事(顺便说一下,这是正确的地址)?
编辑:我查看了 Wireshark 中的 tcpdump,发现租约的首选寿命为 4 秒,有效寿命为 8 秒,这与 syslog 中的时间一致。
这实际上是在 OpenContrail 网络上运行的虚拟机,但我首先想排除它只是 Linux 问题的可能性。