什么值得买App下载 App ›
连续签到专享现金活动

宽带 IPv6 过段时间自动掉线要如何解决?

24-04-06

前言

最近发现家里的 Debian 盒子,每过4天就会提示 ETIMEDOUT

通过 systemctl restart NetworkManager 重启网络后,IPv6 恢复正常

通过查看路由器日志,发现每次报错前一天下午的五点半左右,运营商会重新拨号,导致 IPv6 地址变化

Feb 19 17:34:29 pppd[585]: local LL address fe80::49ee:1ba4:67a7:2c72 Feb 19 17:34:29 pppd[585]: remote LL address fe80::0200:5eff:fe00:010b Feb 19 17:34:29 pppd[585]: local IP address 100.67.115.194 Feb 19 17:34:29 pppd[585]: remote IP address 100.67.112.1 Feb 23 17:34:59 pppd[585]: local LL address fe80::29d6:8887:0c1a:1848 Feb 23 17:34:59 pppd[585]: remote LL address fe80::0200:5eff:fe00:0104 Feb 23 17:34:59 pppd[585]: local IP address 100.67.59.117 Feb 23 17:34:59 pppd[585]: remote IP address 100.67.56.1 Feb 27 17:35:18 pppd[585]: local LL address fe80::b905:473d:0b68:ecf9 Feb 27 17:35:18 pppd[585]: remote LL address fe80::0200:5eff:fe00:0107 Feb 27 17:35:19 pppd[585]: local IP address 100.67.120.191 Feb 27 17:35:19 pppd[585]: remote IP address 100.67.120.1

同时,使用 ip -6 address show 查看报错时的 IPv6 地址,发现地址仍为重新拨号前的地址,且租期未到期,不能获取到新的地址,导致 IPv6 无法使用

inet6 240e:xxxx:xxxx:xxxx::xxxx/64 scope global temporary dynamic valid_lft 599843sec preferred_lft 86343sec

解决方案

默认情况下,IPv6 的租期较长,当运营商重新拨号后,客户端没能及时更新 IPv6 地址。因此我们只需要将 IPv6 设置为有状态 (Stateful),同时将租期设置的短一些即可解决 IPv6 自动掉线的问题

宽带 IPv6 过段时间自动掉线要如何解决?

评论 10

Senis

要解决这个问题,最好的办法就是 slacc 无状态配置。有状态还要等过期做不到实时。如果无状态有问题,去换个固件或者路由器。

四川
只抄

[赞一个] 感谢分享 不过无状态的话 IPv6 防火墙放行好像比较麻烦?

浙江
wayes

我都把ipv6直接关了,老是出现莫名其妙的问题

北京
我是元芳

公司的网络,把ipv6关了,正常点

广东
GN-001用户头像挂件

填0?

广东

没有更多了