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

How assign WAN port to switch?

Discussion in 'Tomato Firmware' started by pswayze, Aug 25, 2008.

  1. pswayze

    pswayze Addicted to LI Member

    Please forgive the n00b question, I'm a fresh convert from dd-wrt. So far I'm very happy with my decision but I can't figure out how to turn the WAN port into a LAN port. I read the existing threads but I've noticed that people say it is different on WRT54G vs WRT54GL. I have a WRT54G and want to assign the WAN port to act as a LAN port.

    Also, once this is working correctly, I will have two routers (a WRT54G and a WRT54GL both running tomato) hard wire bridged. Should I disable the wireless completely on one of them? It seems like a complete waste but I've read if you bridge the wireless connections, you halve your throughput. Any suggestions? Thanks a bunch.
  2. HennieM

    HennieM Network Guru Member

    Well Patrick, the answer to your first question might be in here http://www.dd-wrt.com/wiki/index.php/Switched_Ports

    As for your second question:
    You can have 2 APs both talking the same SSID, giving 2 wireless coverage areas, as you have them connected by wire.

    I assume one of them is your main router connected to the internet, and the 2 routers are connected via their LAN ports. On the #1 router, set it up as for a normal router.

    The second router:
    IP address: on the same subnet as #1 (say #1 is, make #2, and exclude from #1's DHCP range).
    SSID: the same as #1
    Channel: 5 above or below #1 (say #1 is on channel 6, set #2 to channel 1 or channel 11).
    Wireless security: Exactly the same as #1
    DHCP server: off
    Router mode (not gateway mode) although this does not really matter
    WAN: disabled

    Now your wireless clients will connect to either #1 or #2, depending on which one is closer, and you won't even know to which one your client connects. Your 2 routers will also not talk to one another (the talking between them is done via the wired [LAN-to-LAN] connection), so there's no bandwidth to be lost.
  3. pswayze

    pswayze Addicted to LI Member

    Thank you so much. Those answered both my questions perfectly. I do have a question though. I have a v1 WRT54G and those aren't explicitly mentioned in the port numbering section. So lets assume the numbering is the same as the v2. How does this sound to make the WAN port a LAN port?

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

    eRd12 LI Guru Member

  5. pswayze

    pswayze Addicted to LI Member

    This was a very informative link but I was just curious about the port numbering. After reading it a second time, I realize that either way, I'll need to set 0-5 as LAN ports. :rolleyes: ::walks away sheepishly::
  6. bhlonewolf

    bhlonewolf LI Guru Member

    Re: wireless ... keep wireless enabled on both, set them to different channels, same SSID/encryption. Clients will jump to whichever is stronger -- good way to extend coverage.

    Re: turn wan into lan -- I did this on a GL router:

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

    My understanding is that the manual_boot is used to verify integrity of the vlan0ports, and you may need to set this to 1 depending on your router. I had to on mine, otherwise the values got reset.

    Also, always get your values first before changing them -- just do a nvram get instead of a set with the variable name. That way you know what to change them back to.
  7. TexasFlood

    TexasFlood Network Guru Member

    I'm not really sure, but I can tell you the following is what I did to use my WAN port on the LAN (with WRT54G v2 and WR850G) so maybe you can extrapolate from that.

    nvram set vlan1ports=""
    {maybe this should be "5", dunno, but it's working}
    nvram set vlan0ports="0 1 2 3 4 5*"
    nvram set manual_boot_nv=1
    nvram commit

    Before the changes, they were set as follows:

    vlan1ports="4 5"
    vlan0ports="3 2 1 0 5*"

    WRT54G v2
    vlan1ports="0 5"
    vlan0ports="1 2 3 4 5*"

    So if your settings now look like mine did before changing, perhaps you can do the same thing.
  8. RonWessels

    RonWessels Network Guru Member

    Actually, according to this OpenWRT Wiki entry, a WRT54G V1 has a completely different VLAN setup. The LAN ports are on vlan2 rather than vlan0.

    The easiest thing may be to simply dump all the nvram vlan settings (nvram show | grep vlan) and modify what is currently working.

    Oh yes, you do need the manual_boot_nv=1 setting, otherwise the vlan ports will be re-initialized at every reboot.

Share This Page