软路由 WAN 口非常频繁掉线,已排查多种问题,均无果,求帮助。

275 天前
 PqZS58MLPBHFpEqm

问题描述

家里配置了一套软路由,使用有 1~2 年都非常稳定,速度和稳定性都很好。

但是,上周末家里的软路由出现问题,WAN 口频繁掉线,掉线后在 2 分钟之后又自动重连,过 30 分钟~2 个小时之间又再次掉线重连,该现象一直持续。

查看日志后关键信息显示是 Interface 'wan' has link connectivity loss 紧接着就 Interface 'wan' is now down (具体日志在后文)

配置信息

  1. 上海电信宽带 + 光猫 DHCP 自动拨号
  2. 软路由是 R2S/R5S + github 主流固件
  3. 路由器是 Redmi AX5 + AX 5400
  4. 网络链路是 光猫(千兆口)-> 软路由 Wan -> 软路由 Lan -> 无线路由器 Wan (所有设备都是连接 Redmi 无线路由器)

排查思路及结果

  1. 分别是 R2S/R5S + 两套 openwrt 固件(都重刷 DHDAXCW+stupidloud )总共四次尝试,均是相同报错。备注:只换了机器,网线和电源还是一套
  2. 无线路由器有线插了 NAS+树莓派,把它们都拔下来后,依旧是相同报错。
  3. 无线路由器从 AX5 换成 AX5400 ,网络配置不变,依旧是相同报错。
  4. 把软路由从家庭网络中去除,变成 光猫 -> 无线路由器,因为没有 openwrt 了,获取不到日志,但使用过程是「正常」的,玩了几把游戏都没有掉线体验。

相关日志

全量日志: https://gist.github.com/Wei-Xia/58e206ec7cb6e11b3c7f1c14f6bb3c0b 报错部分:

Sun Aug  6 21:36:56 2023 daemon.notice netifd: Network device 'eth0' link is up
Sun Aug  6 21:36:56 2023 daemon.notice netifd: Interface 'wan' has link connectivity
Sun Aug  6 21:36:56 2023 daemon.notice netifd: Interface 'wan' is setting up now
Sun Aug  6 21:36:56 2023 kern.info kernel: [21954.520425] rk_gmac-dwmac fe2a0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
Sun Aug  6 21:36:56 2023 daemon.notice netifd: Interface 'wan6' has link connectivity
Sun Aug  6 21:36:56 2023 daemon.notice netifd: Interface 'wan6' is setting up now
Sun Aug  6 21:36:56 2023 daemon.notice netifd: wan (26341): udhcpc: started, v1.36.0
Sun Aug  6 21:36:56 2023 daemon.notice netifd: wan (26341): udhcpc: broadcasting discover
Sun Aug  6 21:36:57 2023 kern.info kernel: [21955.468674] rk_gmac-dwmac fe2a0000.ethernet eth0: Link is Down
Sun Aug  6 21:36:57 2023 daemon.notice netifd: Network device 'eth0' link is down
Sun Aug  6 21:36:57 2023 daemon.notice netifd: Interface 'wan' has link connectivity loss
Sun Aug  6 21:36:57 2023 daemon.notice netifd: Interface 'wan6' has link connectivity loss
Sun Aug  6 21:36:57 2023 daemon.notice netifd: wan (26341): udhcpc: received SIGTERM
Sun Aug  6 21:36:57 2023 daemon.notice netifd: wan (26341): udhcpc: entering released state
Sun Aug  6 21:36:57 2023 daemon.notice netifd: wan (26341): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Sun Aug  6 21:36:57 2023 daemon.notice netifd: Interface 'wan' is now down
Sun Aug  6 21:36:57 2023 daemon.notice netifd: Interface 'wan6' is now down
Sun Aug  6 21:37:18 2023 daemon.notice netifd: Network device 'eth0' link is up
Sun Aug  6 21:37:18 2023 daemon.notice netifd: Interface 'wan' has link connectivity
Sun Aug  6 21:37:18 2023 daemon.notice netifd: Interface 'wan' is setting up now
Sun Aug  6 21:37:18 2023 daemon.notice netifd: Interface 'wan6' has link connectivity
Sun Aug  6 21:37:18 2023 daemon.notice netifd: Interface 'wan6' is setting up now
Sun Aug  6 21:37:18 2023 kern.info kernel: [21976.870422] rk_gmac-dwmac fe2a0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
Sun Aug  6 21:37:18 2023 daemon.notice netifd: wan (27250): udhcpc: started, v1.36.0
Sun Aug  6 21:37:18 2023 daemon.notice netifd: wan (27250): udhcpc: broadcasting discover
Sun Aug  6 21:37:21 2023 kern.info kernel: [21979.893842] rk_gmac-dwmac fe2a0000.ethernet eth0: Link is Down
Sun Aug  6 21:37:21 2023 daemon.notice netifd: Network device 'eth0' link is down
Sun Aug  6 21:37:21 2023 daemon.notice netifd: Interface 'wan' has link connectivity loss
Sun Aug  6 21:37:21 2023 daemon.notice netifd: Interface 'wan6' has link connectivity loss
Sun Aug  6 21:37:21 2023 daemon.notice netifd: wan (27250): udhcpc: broadcasting discover
Sun Aug  6 21:37:21 2023 daemon.notice netifd: wan (27250): udhcpc: received SIGTERM
Sun Aug  6 21:37:21 2023 daemon.notice netifd: wan (27250): udhcpc: entering released state
Sun Aug  6 21:37:21 2023 daemon.notice netifd: wan (27250): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Sun Aug  6 21:37:21 2023 daemon.notice netifd: Interface 'wan' is now down
Sun Aug  6 21:37:21 2023 daemon.notice netifd: Interface 'wan6' is now down
Sun Aug  6 21:37:31 2023 daemon.notice netifd: Network device 'eth0' link is up
Sun Aug  6 21:37:31 2023 daemon.notice netifd: Interface 'wan' has link connectivity
Sun Aug  6 21:37:31 2023 daemon.notice netifd: Interface 'wan' is setting up now
Sun Aug  6 21:37:31 2023 daemon.notice netifd: Interface 'wan6' has link connectivity
Sun Aug  6 21:37:31 2023 daemon.notice netifd: Interface 'wan6' is setting up now
Sun Aug  6 21:37:31 2023 kern.info kernel: [21989.381455] rk_gmac-dwmac fe2a0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
Sun Aug  6 21:37:31 2023 daemon.notice netifd: wan (27967): udhcpc: started, v1.36.0
2447 次点击
所在节点    路由器
27 条回复
Ggmusic
275 天前
拼多多 9 块钱包邮买个电瓶车充电器通用散热小风扇,usb 接口那种,再把 r2s 架在上面试试。
PqZS58MLPBHFpEqm
275 天前
@Ggmusic 应该不是散热的问题。。。温度才 30~40 度,很低的。。。
seeme
275 天前
换根网线
keyfunc
275 天前
换个口做 wan ?
2333wz
275 天前
我这里 改为桥接后表现为半小时掉线一次
villivateur
275 天前
有试过 openwrt 官方的固件吗? GitHub 上找的别人魔改的固件很可能有问题
vmebeh
275 天前
openwrt 的 wan 连无线路由器的 lan 看看还掉不掉线
ShineyWang
275 天前
我前一个月也遇到软路由莫名其妙掉线问题
不过我是 lan 口掉线(后来我换了拓扑,重新接线,现在不知道怎么就好了)

掉线这里你可以看看光猫,里面有没有什么有效日志

还有你可以试试换 wan 和 lan 口绑定看看有没有问题
sadfQED2
275 天前
我之前是 lan 口频道掉线,换成了 op 官方的代码,从新编译就好了。用 leda 的代码始终有问题
stormscloudy
275 天前
无非就是光猫到软路由这段有问题
1.排查设备问题:先把出口软路由换了,换成硬路由试试
2.如果是软路由问题,那么可以尝试更换固件
podel
275 天前
内核日志 dmesg 没给欸。

另外 也可以简单的换设备检查一下呗。
shakoon
275 天前
wan 掉线,先看光猫那儿掉没有,lz 只说了后端设备的排查,就不看一下前端么。如果光猫没有问题,后端你也检查了,那就换一条光猫到路由器的网线试试。
huangya
275 天前
1. 9 楼说得好,你换成成 op 官方的代码看看。
2. >把软路由从家庭网络中去除,变成 光猫 -> 无线路由器,因为没有 openwrt 了,获取不到日志,但使用过程是「正常」的,玩了几把游戏都没有掉线体验。

可以一直 ping baidu.com 几个小时,看看有没有丢包。
fatekey
275 天前
是从来没出现过这问题,还是你之前不玩游戏没发现呢。。。我觉得是固件问题概率很大,把 mwan3 、负载均衡啥的干掉试试?
c1273082756
275 天前
我之前也频繁断网, 没看过日志, 我是直接剪掉网线两端, 然后重新夹了两个新的水晶头 就解决了
helijia21
275 天前
网卡坏了或者网线有问题,要么换个猫,要么你用以太网测试仪看下你的网口有没有问题
kylo1989
275 天前
感觉很可能是光猫有问题,我们做网吧的出口专线的光猫这几年都不少坏,家用估计坏猫不稀奇了
leafyyy
275 天前
大概率软路由固件问题,别说 Openwrt 了。 之前双光猫(移动+电信双接入) 到 ikuai 软路由的两个 WAN 口 基本上一天两次 有时候一天一次,都是同时掉线的。 后来更新了 ikuai 固件就好了。
blessyou
275 天前
换网线,买圆网线,我遇到一次你这种情况就是网口在 1000M 和 100M 来回跳。
ResidualBlood
275 天前
这个我之前也碰到过, 我是给 WAN 添加个 mac 地址就好了
```
vi /etc/config/network
```
找到`config interface 'wan' `这一行,在这段代码的末尾强行指派一个 mc 地址,任意的都行
```
option macaddr 'a0:63:91:4d:5d:f5' 
```

这个问题似乎很常见?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/963235

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX