V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
ldz
V2EX  ›  OpenWrt

请教一个设备关机一段时间之后再启动连不上路由器的问题

  •  
  •   ldz · 2020-10-28 10:57:24 +08:00 · 660 次点击
    这是一个创建于 1521 天前的主题,其中的信息可能已经有所发展或是发生改变。
    路由刷的是某位大神编译的 OpenWRT

    现象是当一个直接用网线连接路由的设备在关机一段时间时间重启后连不上路由器
    ping 不通路由的 ip,只有一个 169.254 的 ip
    OpenWRT 界面里显示设备的网卡和路由是能连上的
    因为设备没开机前对应的接口显示未连接,开机之后显示 1000Mb/s 全双工

    原本怀疑是 dhcp 的问题,尝试过
    1. 把这个设备的默认租期(12 小时)调整到无限大
    2. 给这个设备分配固定 ip
    3. 安装各种版本的 dnsmasq-full
    结果还是有问题

    确认是固件 bug,因为种种原因其他版本(包括自己编译的)都有更加难以接受的 bug,所以只能用这个版本


    Wed Oct 28 10:11:54 2020 daemon.notice netifd: Network device 'eth0' link is down
    Wed Oct 28 10:11:54 2020 kern.info kernel: [296105.040789] r8169 0000:02:00.0 eth0: Link is Down
    Wed Oct 28 10:11:54 2020 kern.info kernel: [296105.041452] br-lan: port 1(eth0) entered disabled state
    Wed Oct 28 10:11:57 2020 daemon.notice netifd: Network device 'eth0' link is up
    Wed Oct 28 10:11:57 2020 kern.info kernel: [296108.074847] r8169 0000:02:00.0 eth0: Link is Up - 1Gbps/Full - flow control off
    Wed Oct 28 10:11:57 2020 kern.info kernel: [296108.075402] br-lan: port 1(eth0) entered blocking state
    Wed Oct 28 10:11:57 2020 kern.info kernel: [296108.075777] br-lan: port 1(eth0) entered forwarding state
    Wed Oct 28 10:12:00 2020 daemon.notice netifd: Network device 'eth0' link is down
    Wed Oct 28 10:12:00 2020 kern.info kernel: [296111.520267] r8169 0000:02:00.0 eth0: Link is Down
    Wed Oct 28 10:12:00 2020 kern.info kernel: [296111.520938] br-lan: port 1(eth0) entered disabled state
    Wed Oct 28 10:12:03 2020 daemon.notice netifd: Network device 'eth0' link is up
    Wed Oct 28 10:12:03 2020 kern.info kernel: [296114.334238] r8169 0000:02:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    Wed Oct 28 10:12:03 2020 kern.info kernel: [296114.334792] br-lan: port 1(eth0) entered blocking state
    Wed Oct 28 10:12:03 2020 kern.info kernel: [296114.335159] br-lan: port 1(eth0) entered forwarding state

    上面是此设备(eth0)开机之后路由器上相关的 log
    此时这个设备连不上路由

    Wed Oct 28 10:20:41 2020 daemon.notice netifd: Interface 'lan' is now down
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.506380] br-lan: port 3(eth3) entered disabled state
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.506783] br-lan: port 2(eth2) entered disabled state
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.507129] br-lan: port 1(eth0) entered disabled state
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.509286] device eth0 left promiscuous mode
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.509831] br-lan: port 1(eth0) entered disabled state
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.530888] r8169 0000:02:00.0 eth0: Link is Down
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.544536] device eth2 left promiscuous mode
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.546643] br-lan: port 2(eth2) entered disabled state
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.563163] r8169 0000:04:00.0 eth2: Link is Down
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.578656] device eth3 left promiscuous mode
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.580212] br-lan: port 3(eth3) entered disabled state
    Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.595284] r8169 0000:05:00.0 eth3: Link is Down
    Wed Oct 28 10:20:41 2020 daemon.notice netifd: Interface 'lan' is disabled
    Wed Oct 28 10:20:41 2020 daemon.notice netifd: Network device 'eth3' link is down
    Wed Oct 28 10:20:41 2020 daemon.notice netifd: Network device 'eth2' link is down
    Wed Oct 28 10:20:41 2020 daemon.err odhcpd[3189]: setsockopt(IPV6_ADD_MEMBERSHIP): No such device
    Wed Oct 28 10:20:41 2020 daemon.notice netifd: Network device 'eth0' link is down
    Wed Oct 28 10:20:41 2020 daemon.err odhcpd[3189]: setsockopt(SO_BINDTODEVICE): No such device
    Wed Oct 28 10:20:41 2020 daemon.notice netifd: bridge 'br-lan' link is down
    Wed Oct 28 10:20:41 2020 daemon.notice netifd: Interface 'lan' has link connectivity loss Wed Oct 28 10:20:41 2020 kern.info kernel: [296632.697305] RTL8125B 2.5Gbps internal r8169-200:00: attached PHY driver [RTL8125B 2.5Gbps internal] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296632.870101] r8169 0000:02:00.0 eth0: Link is Down
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296632.870784] br-lan: port 1(eth0) entered blocking state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296632.871159] br-lan: port 1(eth0) entered

    disabled state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296632.872534] device eth0 entered promiscuous mode
    Wed Oct 28 10:20:42 2020 user.warn mwan3-hotplug[6492]: hotplug called on lan(ipv4) before mwan3 has been set up
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296632.901296] RTL8125B 2.5Gbps internal r8169-400:00: attached PHY driver [RTL8125B 2.5Gbps internal] (mii_bus:phy_addr=r8169-400:00, irq=IGNORE)
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.062206] r8169 0000:04:00.0 eth2: Link is Down
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.063050] br-lan: port 2(eth2) entered blocking state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.063428] br-lan: port 2(eth2) entered disabled state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.065106] device eth2 entered promiscuous mode
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.093576] RTL8125B 2.5Gbps internal r8169-500:00: attached PHY driver [RTL8125B 2.5Gbps internal] (mii_bus:phy_addr=r8169-500:00, irq=IGNORE)
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.266186] r8169 0000:05:00.0 eth3: Link is Down
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.267019] br-lan: port 3(eth3) entered blocking state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.267399] br-lan: port 3(eth3) entered disabled state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.269078] device eth3 entered promiscuous mode
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.270986] br-lan: port 3(eth3)
    blocking state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.271333] br-lan: port 3(eth3) forwarding state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.271719] br-lan: port 2(eth2)
    blocking state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.272068] br-lan: port 2(eth2) forwarding state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.272455] br-lan: port 1(eth0)
    blocking state
    Wed Oct 28 10:20:42 2020 kern.info kernel: [296633.272809] br-lan: port 1(eth0) forwarding state
    Wed Oct 28 10:20:42 2020 daemon.notice netifd: Interface 'lan' is enabled
    Wed Oct 28 10:20:42 2020 daemon.notice netifd: Interface 'lan' is setting up now
    Wed Oct 28 10:20:42 2020 daemon.notice netifd: Interface 'lan' is now up
    Wed Oct 28 10:20:42 2020 daemon.notice netifd: bridge 'br-lan' link is up
    entered entered entered entered entered entered

    Wed Oct 28 10:20:42 2020 daemon.notice netifd: Interface 'lan' has link connectivity Wed Oct 28 10:20:42 2020 user.warn mwan3-hotplug[6733]: hotplug called on lan(ipv4) before mwan3 has been set up
    Wed Oct 28 10:20:42 2020 lan)
    Wed Oct 28 10:20:42 2020 (br-lan)
    Wed Oct 28 10:20:42 2020 Wed Oct 28 10:20:42 2020 Wed Oct 28 10:20:42 2020 disabled state
    Wed Oct 28 10:20:42 2020 disabled state
    Wed Oct 28 10:20:42 2020 disabled state
    Wed Oct 28 10:20:43 2020 daemon.notice netifd: Network device 'eth3' link is up
    Wed Oct 28 10:20:43 2020 daemon.notice netifd: bridge 'br-lan' link is up
    Wed Oct 28 10:20:43 2020 daemon.notice netifd: Interface 'lan' has link connectivity Wed Oct 28 10:20:43 2020 kern.info kernel: [296634.704707] r8169 0000:05:00.0 eth3: Link is Up - 10Mbps/Full - flow control rx/tx
    Wed Oct 28 10:20:43 2020 kern.info kernel: [296634.705378] br-lan: port 3(eth3) entered blocking state
    Wed Oct 28 10:20:43 2020 kern.info kernel: [296634.705760] br-lan: port 3(eth3) entered forwarding state
    Wed Oct 28 10:20:45 2020 daemon.notice netifd: Network device 'eth0' link is up
    Wed Oct 28 10:20:45 2020 kern.info kernel: [296636.223186] r8169 0000:02:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    Wed Oct 28 10:20:45 2020 kern.info kernel: [296636.223863] br-lan: port 1(eth0) entered blocking state
    Wed Oct 28 10:20:45 2020 kern.info kernel: [296636.224239] br-lan: port 1(eth0) entered forwarding state
    Wed Oct 28 10:20:45 2020 daemon.notice netifd: Network device 'eth2' link is up
    Wed Oct 28 10:20:45 2020 kern.info kernel: [296636.274411] r8169 0000:04:00.0 eth2: Link is Up - 1Gbps/Full - flow control rx/tx
    Wed Oct 28 10:20:45 2020 kern.info kernel: [296636.274969] br-lan: port 2(eth2) entered blocking state
    user.notice firewall: Reloading firewall due to ifup of lan (br- user.notice nlbwmon: Reloading nlbwmon due to ifup of lan
    daemon.notice netifd: bridge 'br-lan' link is down daemon.notice netifd: Interface 'lan' has link connectivity loss kern.info kernel: [296633.561329] br-lan: port 1(eth0) entered
    kern.info kernel: [296633.562240] br-lan: port 2(eth2) entered kern.info kernel: [296633.563251] br-lan: port 3(eth3) entered daemon.err odhcpd[3189]: Failed to send to ff02::1%lan@br-
    Wed Oct 28 10:20:43 2020
    lan (Address not available)
    Wed Oct 28 10:20:43 2020
    Wed Oct 28 10:20:43 2020
    dhcp.cfg01411c - 2 addresses
    Wed Oct 28 10:20:43 2020 daemon.info dnsmasq-dhcp[10386]: read /etc/ethers - 0 addresses
    daemon.info dnsmasq[10386]: read /etc/hosts - 4 addresses daemon.info dnsmasq[10386]: read /tmp/hosts/

    Wed Oct 28 10:20:45 2020 kern.info kernel: [296636.275354] br-lan: port 2(eth2) entered forwarding state
    Wed Oct 28 10:20:45 2020 daemon.warn dnsmasq[10386]: Ignoring query from non-local network
    上面是重启 br-lan 接口之后路由器上的相关 log
    重启之后这个设备就能和路由联通了

    请 v2 各位大神给个思路,应该往哪个方向排查
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2708 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:14 · PVG 20:14 · LAX 04:14 · JFK 07:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.