V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
PqZS58MLPBHFpEqm
V2EX  ›  路由器

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

  •  
  •   PqZS58MLPBHFpEqm · 263 天前 · 2404 次点击
    这是一个创建于 263 天前的主题,其中的信息可能已经有所发展或是发生改变。

    问题描述

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

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

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

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

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

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

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

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

    对了,坏的网线品牌是绿联的,下次要买个质量过关的网线!
    wentijianihao
        27
    wentijianihao  
       262 天前
    遇到过,换成屏蔽网线就好了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2966 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:10 · PVG 21:10 · LAX 06:10 · JFK 09:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.