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

DHCP Gets Invalid IP Address

Discussion in 'Tomato Firmware' started by jbaker6953, Oct 11, 2007.

  1. jbaker6953

    jbaker6953 LI Guru Member

    Config Change Kills Router (DHCP Issue?)

    I'm not sure how to even go about troubleshooting this issue, but it's happened to me in Tomato 1.07 and now in 1.10.

    I have remote SSH access enabled on my WRTGS 1.1 and use it is a proxy server from work. I connect to the administration pages by using the router's LAN IP on the remote machine.

    Whenever I make a change on the remote access page of the Administration section and save it, the connection is lost and the router gets a new IP address from Verizon DSL. The IP looks good (something like 71.x.x.x, which is Verizon's IP space), but I have no connectivity any more. As long as I have this IP address I cannot connect to anything on the WAN (in or out). I have to power down the router in order to correct it. The first time this happened to me I wrote it off as some fluke, but it happened to me again this morning.

    I don't think it's a case of just accidentally getting a bad IP from the Verizon DHCP server because Tomato renews the DHCP lease every two hours for months on end without issue. The problem only occurs when saving changes on the remote access page of the Administration section.

    Any ideas on tracking down this issue? I'm at work now so I've lost all contact with the router ... again.
  2. jbaker6953

    jbaker6953 LI Guru Member

    Thinking about it more, is there a way to schedule a cron job that checks whether the WAN is reachable, and if not does a hard DHCP release and renew. I don't want DHCP to request the current IP, but an entirely new one. Is it possible?
  3. mstombs

    mstombs Network Guru Member

    Have a search there are a few scripts we have tried to do this in this forum.

    When accessing remotely are you using a dynamic dns service such as dyndns - does the router correctly update this on WAN IP change?

    I assume you are using PPPOE with a bridge ADSL modem? There have been reports in previous versions of Tomato with this not properly reconnecting after failure - not sure if ever fully resolved.
  4. jbaker6953

    jbaker6953 LI Guru Member

    No PPOE, it's just an always-on vanilla LAN connection. If I knew what happens internally when you hit the SAVE button on the remote access page I could probably figure out where the error is.
  5. jbaker6953

    jbaker6953 LI Guru Member

    Oops. Regarding the DDNS, this isn't updated because WAN connectivity is lost.

    When you press SAVE, you get the count down timer and after that the router's toast.
  6. mstombs

    mstombs Network Guru Member

    Sounds like someone needs to test this in a lab - where they can remotely connect but still see what is happening. A great feature of Tomato is that it only restarts the services it needs when changing config - other firmwares do a full reboot (safer but much slower from lan!). Maybe the remote session blocks the "service wan restart" or equivalent command?
  7. jbaker6953

    jbaker6953 LI Guru Member

    The reset occurs successfully. When I log on from the LAN I can see that Tomato has a new IP for the router, and the IP appears to be correct (the right net block). For some reason though, the IP it gets during this procedure is not valid (according to Verizon) and so my WAN connectivity is dead. Even release and renew doesn't fix it because Tomato requests the same IP from the DHCP server, which dutifully complies. Only power off fixes it.

    I can't figure out how the DHCP release/renew is different than what happens when you save the remote access config.
  8. mstombs

    mstombs Network Guru Member

    You don't get random TCP/IP errors like that - their dhcp server (or is this delegated to their modem?) appears to be at fault, also check the netmask and gateway that is assigned.
  9. jbaker6953

    jbaker6953 LI Guru Member

    I would think it was their DHCP server, but why would Tomato be able to renew the DHCP lease thousands of times in a row without issue (it renews every two hours for months at a time), and screw up twice in a row right when I save a config change while logged in through SSH?

    Can somebody else here use an SSH connection as a proxy to the router and then press the SAVE button on the remote access page and see what happens?

    EDIT: Why does Tomato need to reset the WAN when changing anything on the remote access page? Shouldn't it just restart the services in question (Telnet, SSH, HTTPd)?

Share This Page