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

Use all 5 ports on the LAN with tomato

Discussion in 'Tomato Firmware' started by rodalpho, Feb 22, 2008.

  1. rodalpho

    rodalpho LI Guru Member

    My network looks like this

    internet -> router A
    router A -> desktop PC, NAS, mac mini, ethernet cable to router B
    tomato router B -> tivo, HTPC, xbox360, slingbox

    In order to do this, I need to use all 5 ports on router B on the LAN in switch mode with NAT disabled. I can do this using my trusty DDWRT and this method. But having tried tomato (on router A) I'd like to load it on B as well. Is that possible?

  2. mstombs

    mstombs Network Guru Member

    Tomato has no support for VLAN config in the web GUI. You can probably do it via nvram variable commands from the console - I've reassigned one lan to a new WAN2 which is the other way round!
  3. kiskakas

    kiskakas Network Guru Member

    ..but this will be a nice feature in the newest tomatoes :)

  4. rodalpho

    rodalpho LI Guru Member

    Ahh so it's not supported yet, OK. Anyone know how to do it with the nvram commands, or should I just leave it alone?
  5. Kiwi8

    Kiwi8 LI Guru Member

  6. rodalpho

    rodalpho LI Guru Member

    That looks like the trick, thanks much!
  7. Kiwi8

    Kiwi8 LI Guru Member

    This is the set of commands that I did:

    nvram set vlan0ports="0 1 2 3 4 5"
    nvram set vlan1ports="5"
    nvram commit

    This will also help to map any of your LAN ports into WAN port in the event your original WAN port is spoilt. Just assign any of the ports 1 to 4 to vlan1ports and plug your modem to that port. :)
  8. infinity005

    infinity005 LI Guru Member

    What would I do to map than wan to the lan and the lan to the wan? I want to use it as a wireless isp router so I need the wifi to be the wan.
  9. Frank B

    Frank B Addicted to LI Member

    The best fix to make a 5 Port switch is
    1. Configure the router fully how you want it through Web Interface
    Once complete (including Disabling WAN)

    2. Do the following NVRAM Changes

    nvram set vlan1ports=""
    nvram set vlan0ports="4 3 2 1 0 5*"
    nvram set manual_boot_nv=1
    nvram commit

    You will now have a functional 5 port switch
  10. Kiwi8

    Kiwi8 LI Guru Member

    May I ask, what is the function of the variable "manual_boot_nv"? :confused:
  11. mstombs

    mstombs Network Guru Member

    The ports on a WRT54GL and similar (GSV4) have reverse numbering compared to others, if this flag not set the nvram vlan mapping is reset on every boot -it is not needed if your router not one of the affected ones.
  12. Kiwi8

    Kiwi8 LI Guru Member

    oic.... so if we set the variable on those unaffected ones will it still work or cause a problem?
  13. mstombs

    mstombs Network Guru Member

    I don't know for sure, the trick came from the Author Jon, I don't see any problem as long as the router is allowed to boot a least once without this variable set after a firmware upgrade to setup key nvram variables to the way it expects.
  14. fyellin

    fyellin LI Guru Member

    The function sysinit() in rc/init.c looks to see if the nvram is "dirty". If any of several nvram variables don't have precisely the expected value, these variables are restored to the expected value and the router reboots. For the WRT54GL, one of the tests is that vlan0ports be precisely "3 2 1 0 5*".

    Setting manual_boot_nv bypasses this test. You'll get the value of vlan0ports that you want, but some safety is lost.
  15. TexasFlood

    TexasFlood Network Guru Member

    From what I read earlier, this prevents the ports from being reset when the router is rebooted.
  16. jsmiddleton4

    jsmiddleton4 Network Guru Member

    Ok so the commands to make a 5 port ap/switch aren't the same for the Linksys routers? Different versions require a different sequence for the port numbers? What about the Buffalo's? I know, its Linksysinfo.org but some of us are using Buffalo routers with Tomato and there simply is no buffaloinfo.org for the Tomato stuff.

Share This Page