1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

random WAN disconnections - dying router?

Discussion in 'Tomato Firmware' started by molnart, Nov 28, 2017.

  1. molnart

    molnart Addicted to LI Member

    Hi, I am using my Linksys E3000 with tomato for 5+ years, and recently i am experiencing connectivity issues - internet is not working. When i renew the WAN DHCP lease from the Web interface everything is up again, but after 2-3 days it goes down. I have a cable modem in front of the tomato router which is providing the WAN IP address via DHCP. I don't think it's my ISP's modem messing around, as I have the same fixed public IP address at least since march.

    router log does not show anything specific. 19:41:52 is when i renewed the DHCP lease. The errors at 18:25 are coming from my wife's windows phone (which recently has troubles connecting to wifi until restarted). interesting thing is that my home network is on the 192.168.2.x subnet, yet my wife's phone is trying to do something with on 192.168.1.x (maybe because on another location i have a router on that subnet which has the same SSID and password and phone roams between them ?)
    Code:
    Nov 26 18:25:44 E3000 daemon.info dnsmasq-dhcp[4508]: DHCPNAK(br0) 192.168.1.34 d0:92:9e:xx:xx:xx wrong address
    Nov 26 18:25:48 E3000 daemon.info dnsmasq-dhcp[4508]: DHCPNAK(br0) 192.168.1.34 d0:92:9e:xx:xx:xx wrong address
    Nov 26 19:41:52 E3000 user.debug dhcpc-event[5226]: 182: pptp peerdns disabled
    Nov 26 19:41:52 E3000 user.debug init[1]: 182: pptp peerdns disabled
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[4508]: exiting on receipt of SIGTERM
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: started, version 2.72+ cachesize 1500
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset Tomato-helper auth no-DNSSEC loop-detect
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: asynchronous logging enabled, queue limit is 5 messages
    Nov 26 19:41:52 E3000 daemon.info dnsmasq-dhcp[5229]: DHCP, IP range 192.168.2.51 -- 192.168.2.99, lease time 1d
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: reading /etc/resolv.dnsmasq
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: using nameserver 8.8.8.8#53
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: using nameserver 8.8.4.4#53
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: read /etc/hosts - 2 addresses
    Nov 26 19:41:52 E3000 daemon.info dnsmasq[5229]: read /etc/dnsmasq/hosts/hosts - 9 addresses
    Nov 26 19:41:52 E3000 daemon.info dnsmasq-dhcp[5229]: read /etc/dnsmasq/dhcp/dhcp-hosts
    
    so do you think it's time to get a new router, or i am just missing something obvious here?
     
  2. Sean B.

    Sean B. LI Guru Member

    Unfortunately, neither your symptom nor info you've provided are enough to even venture a guess at what the problem may be. However, a disconnect that is fixed by simply renewing the DHCP lease doesn't imply a hardware fault with the router, and is too specific to be glitching from memory faults etc. So providing you're certain no changes to the router and/or its configuration etc have been made in the time frame this issue started, however non-related they may seem to have been, my money would be on an issue upstream. Diagnostic steps when the issue is present would be needed to shed any light.
     
  3. Monk E. Boy

    Monk E. Boy Network Guru Member

    When I join a network my phone/laptop/tablet/etc. will attempt to use the IP address it was last assigned, even if that address is completely invalid for the subnet on the new network. It will suggest the old IP to the DHCP server, get rejected, then get assigned a new address. This is fairly normal behavior, although some OSes don't hold onto old IP with a deathgrip while other OSes will.

    If the only issue is that your WAN address is no longer valid, and the router doesn't need to be power cycled or otherwise rebooted, the problem probably isn't going to get solved by replacing the router, assuming you put Tomato on the new hardware. As Sean points out, we'd need a lot more information about your setup and then you'd need to do quite a bit of work to figure out where the problem lies.

    Is this an AT&T UVerse modem by any chance? The last time I had UVerse I had the problem where if the router didn't renew its address at the halfway point it would, when the lease expired, create a verrrry lonnnnnng pauuuuuuuse while the DHCP lease was invalidated then requested then validated. I solved it by inserting an iptables rule:
    iptables -I INPUT -p udp --sport 67 --dport 68 -j ACCEPT

    Basically the rule says that if something sends data from source port 67 to port 68 over udp to the router itself then the router should accept that traffic. This allows the DHCP address to renew at the 50% mark and get extended without completely expiring. I don't know if this rule was ever added to Tomato's default iptables rules.
     
  4. molnart

    molnart Addicted to LI Member

    i don't think this is the problem, as my public IP address is fixed and unchanged, so I am quite positive that trying to access the previous IP is not the problem (as the WAN IP stays the same). Also I am operating with the very same setup (same ISP modem and tomato router) for 4+ years and the issue only appeared two weeks ago. I am still on tomato v130, as i haven't updated the router for years, nor changed any config.

    actually this where i am asking for your help: what information could be relevant to troubleshoot the issue? i have supressed some dhcp messages in the system log via the dhcp-quiet parameter, i will try to disable that and see whether syslog provides any more details. otherwise i am clueless where to look for the solution, so trying a secondary router is my only idea
     
  5. Sean B.

    Sean B. LI Guru Member

    I believe what @Monk E. Boy was referring to by "WAN address is no longer valid" is a loss of connectivity due to a failure somewhere in the IP lease or renewal process that invalidates your routers use of/claim to said IP address. This does not mean the IP address itself is no longer valid or has changed.

    And as I stated before, the symptoms you describe do not imply a router hardware issue. Baring any configuration/setting changes ( which you're adamant none have occurred ) lands us back to the direction I last concluded with. The issue is likely upstream of your router + cable modem. The DHCP lease/renewal and related communications not only involve the hardware/software on your end ( router + cable modem ) but also your ISPs DHCP servers. Things such as hardware/network infrastructure upgrades or failures, server configuration changes, multiplexer saturation from oversold service etc etc can all cause issues.. and your ISP is unlikely to be updating its customers about everything they're doing at any given time on a "just in case" basis. What should be the first, and is certainly by far the simplest diagnostic step would be to touch base with your ISP. Explain your symptoms and ask if there's any known issues or changes in your area that may be a contributing factor. If that yields nothing, then proceeding with diagnostics on what you have access to/control over stands less chance of being a tail chase.
     
  6. molnart

    molnart Addicted to LI Member

    it definitely seems like an ISP issue. today i was at my mother-in-law, who has the same ISP and same setup, but with a mikrotik router instead of tomato and she has the same disconnections. i checked with my ISP's helpdesk and they recommended restarting their modem... not sure if that will help tough, will see in a few days
     
  7. Monk E. Boy

    Monk E. Boy Network Guru Member

    The DHCP issue won't cause you to get a new IP, it will simply create a disconnect situation where your router will be without a working IP for a few seconds seconds to a few minutes until the router and DHCP server have a nice chat with one another. Your router will claim to still have the same IP address, it just won't be able to send data through it. To my knowledge that iptables rule doesn't have a whole lot of downsides, so trying it to see if it helps isn't a bad idea.

    Personally my ISP takes it upon themselves to completely disconnect my internet connection in the middle of the night because they apparently feel that the majority of their customers are retirees who won't notice it being down (for up to six hours!) so long as they don't start work until after midnight. I've requested that they notify me of what's obviously scheduled maintenance work (otherwise why would it occur exactly on the hour?) but have been playing dumb. Though, to be fair, tier 1 techs usually aren't privy to decent information...
     
  8. Sean B.

    Sean B. LI Guru Member

    Not sure at what version it was introduced, and I'm speaking in regards to Toastmans builds, but that rule is set by default when DHCP is selected for the WAN.
     
  9. molnart

    molnart Addicted to LI Member

    i will try the iptables rule, altough i am not confident in adding configs that i have no idea what are they doing.

    is there a simple command in tomato to renew the WAN DHCP lease? i would set it as daily cronjob to renew the lease, as the issue with my isp seems like a long lasting one.. (dhclient and ifdown/ifup are not available)
     
  10. Sean B.

    Sean B. LI Guru Member

    I'd suggest you check to see if it already exists first ( see my previous post ) via:

    Code:
    iptables -t filter --list-rules INPUT
    or if you have an earlier version of iptables on your build then substitute -vnxL in place of --list-rules.

    USR1 is the renew signal for dhcpc, here's a suitable format to run in the scheduler:

    Code:
    #!/bin/sh
    PID="$(pidof udhcpc)"
    
    if [ $PID ]
     then
       kill -USR1 $PID
       logger "WAN DHCP lease renewed by Scheduler."
     else
       logger "Unable to renew WAN DHCP lease, udhcpc is not running!"
    fi
    
     
    Last edited: Dec 5, 2017
    molnart likes this.
  11. schnappi

    schnappi Serious Server Member

    Hi,

    Over the weekend all of a sudden lost remote access to office. Was irritated and started searching this forum and found this thread. To begin with this happened before multiple times when had a WRT54GL with Toastman Tomato firmware (usually corresponding in with heavy traffic downstream to a server at office). Restarting the WRT54GL always solved the issue. Last year replaced the WRT54GL with an RT-N66U with Toastman Tomato firmware hoping to alleviate this issue. When lost all remote connections to office this last weekend checked all opened ports and confirmed they were all closed (this is the same thing that happened previously with WRT54GL) so assumed that the issue was with the RT-N66U and that maybe had too much traffic for the RT-N66U and that needed an ARM router with a 1ghz processor to deal with the traffic (have 100 Mbps symmetric ATT fiber connection).

    When got to office Sunday (do this almost every weekend so it was no big deal, company has nothing remotely close to do with computers just do all the computer stuff myself) all machines had no internet connections but was very happy to see that was able to login to the RT-N66U with no issues. Restarting the ATT NVG595 modem resolved the issue without the RT-N66U needing to be restarted (ATT required any router of ones own to be behind an Arris modem/ router). In the NVG595, NVG589/ whatever that ATT requires there is an option called "Passthrough DHCP Lease" where one can set how often the WAN IP will renew on the Tomato router. Not sure if ATT is the ISP above.

    Point being all in all would venture to say the issue above is not an issue with the Tomato router. In order to properly test this theory though do you @molnart have another router that you could use for a few weeks to test to see if the issue reoccurs? Would really like to know as well if this is ATT or someone else where own router has to be behind their hardware.
     
  12. Monk E. Boy

    Monk E. Boy Network Guru Member

    Interesting. To be honest I haven't had AT&T UVerse in a few years and that's the only provider I noticed this issue with (everyone else just renewed at 100% without any fuss like any normal DHCP server would), and I probably mentioned this enough for Toastman to implement the change and completely missed that it was implemented because, well, I don't have UVerse.
     
  13. schnappi

    schnappi Serious Server Member

    The option to set the "Passthrough DHCP Lease" for your own router is on the NVG589 (ATT's router).
     
  14. molnart

    molnart Addicted to LI Member

    ok, issue solved, actually it was my fault. today i have realized that the router at my mother-in-laws is getting the same public IP address as mine. than trying out further, connecting at one location disconnected the other. i have realized that 3 years ago i did a MAC address cloning for testing purposes. as previously the routers were located 500 km's from each other this wasn't a problem, but when moving them to the next street they connected to the same DHCP server of my ISP what caused the conflict...

    the funnies thing is that if i would have replaced the "dying" router at the beginning the issue would be solved and i would have no idea what caused it
     
  15. Sean B.

    Sean B. LI Guru Member

    Haha wow. Welp, it was clear there was a problem with the DHCP exchange between your router and ISP's servers, however this is one cause I don't think I'd have ever thought to suggest checking for.
     

Share This Page