PqZS58MLPBHFpEqm
V2EX  ›  路由器

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

  •  
  •   PqZS58MLPBHFpEqm · Aug 8, 2023 · 6433 views
    This topic created in 1190 days ago, the information mentioned may be changed or developed.

    问题描述

    家里配置了一套软路由,使用有 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
    
    27 replies  •  2023-08-08 22:00:08 +08:00
    Ggmusic
    Ggmusic
    Aug 8, 2023 via iPhone
    1
    拼多多 9 块钱包邮买个电瓶车充电器通用散热小风扇,usb 接口那种,再把 r2s 架在上面试试。
    PqZS58MLPBHFpEqm
    PqZS58MLPBHFpEqm
    OP
    Aug 8, 2023
    2
    @Ggmusic 应该不是散热的问题。。。温度才 30~40 度,很低的。。。
    seeme
    seeme
    Aug 8, 2023
    3
    换根网线
    keyfunc
    keyfunc
    Aug 8, 2023
    4
    换个口做 wan ?
    2333wz
    2333wz
    Aug 8, 2023
    5
    我这里 改为桥接后表现为半小时掉线一次
    DawnMoon
    DawnMoon
    Aug 8, 2023
    6
    有试过 openwrt 官方的固件吗? GitHub 上找的别人魔改的固件很可能有问题
    vmebeh
    vmebeh
    Aug 8, 2023 via iPhone
    7
    openwrt 的 wan 连无线路由器的 lan 看看还掉不掉线
    ShineyWang
    ShineyWang
    Aug 8, 2023
    8
    我前一个月也遇到软路由莫名其妙掉线问题
    不过我是 lan 口掉线(后来我换了拓扑,重新接线,现在不知道怎么就好了)

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

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

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

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

    这个问题似乎很常见?
    paullee
    paullee
    Aug 8, 2023
    21
    目测网线问题,另外 openwrt 强推 https://github.com/immortalwrt/immortalwrt 超级稳定,需要的所有软件都可直接在 opkg 在线安装。
    Senorsen
    Senorsen
    Aug 8, 2023
    22
    参考 ls 说法,有时过热会引起网卡问题,掉线等。然后建议单纯一个 openwrt 放物理机里,不建议虚拟机+all in one ,发热太大不稳定。
    bjfane
    bjfane
    Aug 8, 2023
    23
    之前遇到过一次是光纤问题,也就是进户之前有问题,老是自动换 ip (也就是掉线),后来运营商整了一次,好了。
    Suzutan
    Suzutan
    Aug 8, 2023 via iPhone
    24
    前几天遇到一样的问题,到后来发现是水晶头没打好😂
    ysn2233
    ysn2233
    Aug 8, 2023
    25
    我遇到过,重刷了固件好了,也不知道啥原因
    PqZS58MLPBHFpEqm
    PqZS58MLPBHFpEqm
    OP
    Aug 8, 2023
    26
    谢谢各位的热心帮助!

    今天把网线都换了,问题解决了。。。

    软硬件折腾半天,没想到最后是 网线 的问题,大家排查网络的时候千万别忘记它啊。。

    对了,坏的网线品牌是绿联的,下次要买个质量过关的网线!
    wentijianihao
    wentijianihao
    Aug 8, 2023
    27
    遇到过,换成屏蔽网线就好了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2053 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 142ms · UTC 15:02 · PVG 23:02 · LAX 07:02 · JFK 10:02
    ♥ Do have faith in what you're doing.