Discussion in 'Tomato Firmware' started by afonso_, May 29, 2007.

  1. afonso_

    afonso_ LI Guru Member

    Connection Type DHCP
    IP Address
    Subnet Mask

    I can't connect to the Internet... I think it has something to do with the Subnet Mask. Shouldn't it be
  2. Roimeister

    Roimeister LI Guru Member

    looks pretty flakey to me... I'd release and renew from the Basic--> Overview menu and see if that fixes things.

    Typically your WAN IP address and your Gateway IP address begin with the same numbers and are usually the same all the way up to the last "dot"

    Subnet mask of would be pretty useless since there would be only 1 computer on the subnet

    try the release and renew and call your ISP if that doesn't fix it
  3. ifican

    ifican Network Guru Member

    Yes either your IP or Gateway IP is incorrect
  4. mstombs

    mstombs Network Guru Member

    Let me guess - your using an ADSL modem in half-bridge mode?

    The problem is the same as here


    and you may be able to fix in Tomato with a firewall script equivalent to that I have used with Hyperwrt Thibor.

  5. afonso_

    afonso_ LI Guru Member

    IP and Gateway IP are both correct.

    mstombs, you are right! I'm trying to connect in 'half-bridged' mode. My SpeedTouch call it DMZ or 'assign a public IP do a device'.
    Thank for the script, I'll try it later.
  6. mstombs

    mstombs Network Guru Member

    Note the theoretically correct network mask is as you are given only a single IP address by your ISP. The modem 'spoofs' this to to try to avoid your problem of the router not understanding the default gateway not being in the same network as the IP address. This spoofing doesn't work because the ISP gateway is so different in your case. A problem with this spoofing is that you will not be able to connect to other nearby internet users as the mask pretends they are local - unless the modem also spoofs arp replies (as zipb does) for the spoofed addresses.

    Windows XP and a recent Linux distro I have do work 'out of the box' with the strange IP, Netmask and out of network gateway - so this is a router problem.

    Re the script, You need to find out what the WAN port is called (vlan1?), where the variables are stored (in nvram?) and that the 'route' command or equivalent is available. You may not need the "route del" commands if the routes automatically get flushed on WAN IP address change - but in my testing I did get an occasion where they didn't - and duplicate default routes meant internet connection was lost as per original problem.
  7. afonso_

    afonso_ LI Guru Member

    mstombs, thank you! your script seems to work just fine.

    Here is my settings right now:

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface * UH 0 0 0 vlan1 * U 0 0 0 br0 * U 0 0 0 vlan1 * U 0 0 0 lo
    default dial-b1-169-216 UG 0 0 0 vlan1

    vlan1 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
    inet addr: Bcast: Mask:
    RX packets:2257 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1921 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:1550477 (1.4 MiB) TX bytes:289225 (282.4 KiB)

    I'm able to access the Internet and the modem webpage (
  8. mstombs

    mstombs Network Guru Member


    Can you confirm that the Hyperwrt Thibor firewall script also works with tomato? (and I haven't made you revert to Hyperwrt!). If so thats a nice result - the interface names and nvram variables for both must follow the same Linksys source.
  9. afonso_

    afonso_ LI Guru Member

    I've only tested with Tomato and I can say it works. Nice job ;)
  10. mstombs

    mstombs Network Guru Member

    Great, thanks.

    I've only tested on Thibor, and in my case the netmask spoof also works. If you have a problem in the future - some untested combination please check and post the routing table again. The script just adds the first and last entries, defining a route to the modem and then defining it as the default gateway. Most of the code is there to remember what was set - so it can be undone when the WAN IP changes.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice