自动 IPv6 WAN 地址协商

自动 IPv6 WAN 地址协商

我正在运行 vanilla Debian 4.19 作为家用路由器,但在启动时设置自动 IPv6 地址协商时遇到问题。我认为我在和中对 WAN 接口 ( eno1)进行了正确的设置:sysctl.confinterfaces

# /etc/sysctl.conf
net.ipv6.conf.eno1.accept_ra=2
net.ipv6.conf.eno1.forwarding=0

# /etc/network/interfaces
iface eno1 inet6 auto
  dhcp 1
  request_prefix 1

但在重新启动时,eno1仅分配了一个 v4 全局地址和一个链路本地 v6 地址。dhclient手动运行时,我看到分配了一个 v6 全局地址,但即使在那时,最后也出现了一个令人担忧的警告:

$ sudo dhclient -6 -N -v eno1
Internet Systems Consortium DHCP Client 4.4.1
...
Listening on Socket/eno1
Sending on   Socket/eno1
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Confirm, 0 ms elapsed.
XMT:  X-- IA_NA <last4:bytes:of:mac>
XMT:  | X-- Confirm Address 2001:<more:public:digits>
XMT:  V IA_NA appended.
XMT: Confirm on eno1, interval 930ms.
<repeat Forming..Confirm messages x3 with different times>
Max retransmission duration exceeded.
PRC: Bound to lease <14:bytes:in:hex:pairs>.

尽管有警告,但运行后dhclient我仍可以成功ping6跨互联网定位目标。我知道我可以将命令设置为作为的一部分运行id-up.d,但我觉得这会掩盖一些我不太理解的更深层次的问题。

编辑:看来我太早说了,尽管有警告,但它“正常工作”。几分钟后,v6 地址与 解除关联,eno1并显示以下消息/var/log/syslog

Jun 24 16:33:04 citadel dhclient[711]: PRC: Rebinding lease on eno1.
Jun 24 16:33:04 citadel dhclient[711]: XMT: Rebind on eno1, interval 10530ms.
<repeats for a while>
Jun 24 16:45:04 citadel dhclient[711]: PRC: Address 2001:<more:public:digits> depreferred.
Jun 24 16:45:04 citadel dhclient[711]: PRC: Address 2001:<more:public:digits> expired.
Jun 24 16:45:04 citadel dhclient[711]: PRC: Bound lease is devoid of active addresses.  Re-initializing.
Jun 24 16:45:04 citadel dhclient[711]: Cannot renew without an active binding.
Jun 24 16:45:04 citadel dhclient[711]: XMT: Solicit on eno1, interval 1030ms.
<repeats>

相关内容