openwrt 宽带频繁掉线重连: No response to 5 echo-requests

近日升级了 openwrt 的版本 23.05.4 并重新设置,发现宽带 pppoe 拨号频繁地断线重连,发生时间从几十秒到几分钟不等,已经影响到网络的正常使用,一些物联网设备也因此出错重启。

查看 openwrt 的日志发现,可能与 pppd 的这句 No response to 5 echo-requests 有关。

09:30:25 2024 daemon.info pppd[18184]: No response to 5 echo-requests
09:30:25 2024 daemon.notice pppd[18184]: Serial link appears to be disconnected.
09:30:25 2024 daemon.info pppd[18184]: Connect time 10.8 minutes.
09:30:25 2024 daemon.info pppd[18184]: Sent 598878 bytes, received 128821 bytes.
09:30:25 2024 daemon.notice ttyd[3380]: [ 09:30:25:3453] N: rops_handle_POLLIN_netlink: DELADDR
09:30:25 2024 daemon.notice ttyd[3380]: [ 09:30:25:3529] N: rops_handle_POLLIN_netlink: DELADDR
09:30:25 2024 daemon.err odhcp6c[18588]: Failed to send RS (Network unreachable)
09:30:25 2024 daemon.err odhcp6c[18588]: Failed to send RELEASE message to ff02::1:2 (Network unreachable)
09:30:25 2024 daemon.notice ttyd[3380]: [ 09:30:25:3619] N: rops_handle_POLLIN_netlink: DELADDR
09:30:25 2024 daemon.notice netifd: Interface 'wan6' is disabled
09:30:25 2024 daemon.notice netifd: Network device 'pppoe-wan' link is down
09:30:25 2024 daemon.notice netifd: Network alias 'pppoe-wan' link is down
09:30:25 2024 daemon.notice netifd: Interface 'wan6' has link connectivity loss
09:30:25 2024 daemon.notice netifd: Interface 'wan' has lost the connection
09:30:25 2024 daemon.notice netifd: wan6 (18588): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan6" } (Permission denied)
09:30:26 2024 user.notice mwan3-hotplug[23451]: mwan3 hotplug on wan6 not called because interface disabled
09:30:26 2024 daemon.err odhcp6c[18588]: Failed to send SOLICIT message to ff02::1:2 (Network unreachable)
09:30:26 2024 daemon.notice netifd: Interface 'wan6' is now down
09:30:27 2024 user.notice mwan3-hotplug[24159]: mwan3 hotplug on wan not called because interface disabled
09:30:31 2024 daemon.notice pppd[18184]: Connection terminated.
09:30:31 2024 daemon.info pppd[18184]: Connect time 10.8 minutes.
09:30:31 2024 daemon.info pppd[18184]: Sent 598878 bytes, received 128821 bytes.
09:30:31 2024 daemon.notice pppd[18184]: Modem hangup
09:30:31 2024 daemon.info pppd[18184]: Exit.
09:30:31 2024 daemon.notice netifd: Interface 'wan' is now down
09:30:31 2024 daemon.notice netifd: Interface 'wan' is setting up now
09:30:31 2024 daemon.info pppd[24717]: Plugin pppoe.so loaded.
09:30:31 2024 daemon.info pppd[24717]: PPPoE plugin from pppd 2.4.9
09:30:31 2024 daemon.notice pppd[24717]: pppd 2.4.9 started by root, uid 0
09:30:37 2024 daemon.info pppd[24717]: PPP session is 46903
09:30:37 2024 daemon.warn pppd[24717]: Connected to CC:**:**:**:**:00 via interface wan.41
09:30:37 2024 kern.info kernel: [22535.653978] pppoe-wan: renamed from ppp0
09:30:37 2024 daemon.info pppd[24717]: Renamed interface ppp0 to pppoe-wan
09:30:37 2024 daemon.info pppd[24717]: Using interface pppoe-wan
09:30:37 2024 daemon.notice pppd[24717]: Connect: pppoe-wan <--> wan.41
09:30:37 2024 daemon.info pppd[24717]: CHAP authentication succeeded: Authentication Successful,Welcome!
09:30:37 2024 daemon.notice pppd[24717]: CHAP authentication succeeded
09:30:37 2024 daemon.notice pppd[24717]: peer from calling number CC:**:**:**:**:00 authorized
09:30:37 2024 daemon.notice pppd[24717]: local  LL address fe80::****:f63a
09:30:37 2024 daemon.notice pppd[24717]: remote LL address fe80::****:3100
09:30:37 2024 daemon.notice ttyd[3380]: [ 09:30:37:5595] N: rops_handle_POLLIN_netlink: DELADDR
09:30:37 2024 daemon.notice pppd[24717]: local  IP address 172.**.**.**
09:30:37 2024 daemon.notice pppd[24717]: remote IP address 172.**.**.**
09:30:37 2024 daemon.notice pppd[24717]: primary   DNS address 211.**.**.**
09:30:37 2024 daemon.notice pppd[24717]: secondary DNS address 120.**.**.**
09:30:37 2024 daemon.notice netifd: Network device 'pppoe-wan' link is up
09:30:37 2024 daemon.notice netifd: Interface 'wan6' is enabled
09:30:37 2024 daemon.notice netifd: Network alias 'pppoe-wan' link is up
09:30:37 2024 daemon.notice netifd: Interface 'wan6' has link connectivity
09:30:37 2024 daemon.notice netifd: Interface 'wan6' is setting up now
09:30:37 2024 daemon.notice netifd: Interface 'wan' is now up
09:30:38 2024 user.notice mwan3-hotplug[25420]: mwan3 hotplug on wan not called because interface disabled
09:30:39 2024 user.notice firewall: Reloading firewall due to ifup of wan (pppoe-wan)
09:30:41 2024 daemon.notice netifd: Interface 'wan6' is now up
09:30:42 2024 user.notice mwan3-hotplug[26292]: mwan3 hotplug on wan6 not called because interface disabled
09:30:42 2024 user.notice firewall: Reloading firewall due to ifup of wan6 (pppoe-wan)

找到 wan 接口高级设置中有两个可能相关的选项 LCP echo failure threshold, LCP echo interval。 结合页面上描述和网络资料,这个功能会向上级设备发送所谓 LCP echo request,上级设备回应则视为正常,上级设备不回应则视为失败,失败次数达到设定的阈值时则触发重连。例如这篇文章 https://www.chiphell.com/thread-1352411-1-1.html 就提到华硕路由器默认开启这个功能,但国内某些运营商不会对 LCP echo request 进行回应导致路由器掉线重拨。

advance setting of wan interface

但在 openwrt 中 LCP echo failure threshold 的默认值为 0,根据页面上的描述,即忽略错误、不开启这个功能。我在配置路由器时也没有修改此项,按理说不应该会出现这个问题。当我将 LCP echo failure threshold 修改为 0LCP echo interval 修改为 3600。luci 没有显示可变更的内容。我只能将 LCP echo failure threshold 修改为 10LCP echo interval 修改为 3600。然后前面说的几分钟就断线重连的这种状况就没有再出现了,wan 接口稳定运行。

uptime of wan interface

出现问题的具体原因我没有兴趣细究,我只是普通用户,能用就行。

Built with Hugo
Theme Stack designed by Jimmy