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

Workaround, instead of pluggin wan to lan

Discussion in 'Tomato Firmware' started by kripz, Mar 31, 2009.

  1. kripz

    kripz LI Guru Member

    right now instead of having the modem plugged into the WAN port, i have the modem plugged into a switch (not my WRT54GL) and my WRT54GL plugged into the switch. Is there a way to turn the wan port into a normal port, so i dont have to plug it into a lan port, and also giving me another lan port?
     
  2. Kiwi8

    Kiwi8 LI Guru Member

    Type in this at the telnet prompt of the WRT54GL:

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

    kripz LI Guru Member

    Can i put it in my init script?

    set vlan1ports=""
    set vlan0ports="4 3 2 1 0 5*"
    set manual_boot_nv=1
     
  4. bogderpirat

    bogderpirat Network Guru Member

    you'll only have to do it once. if you don't have remote ssh access, you can put it in init scripts and reboot the device once and remove those lines again.
    you have to reboot after changing the variables and commit in order for the changes to be permanent.
     
  5. kripz

    kripz LI Guru Member

    And just for future refernce for myself or others, to change it back im guessing its

    set vlan1ports="5"
    set vlan0ports="4 3 2 1 0*"
    set manual_boot_nv=1
     
  6. bogderpirat

    bogderpirat Network Guru Member

    no.

    the original configuration reads
    Code:
    vlan0ports="3 2 1 0 5*"
    vlan1ports="4 5"
    manual_boot_nv=0
    on a GL
     
  7. kripz

    kripz LI Guru Member

    Thank you.
     
  8. Kiwi8

    Kiwi8 LI Guru Member

    U dun have to put it in the init script although it works.

    Once those values are committed to NVRAM, it persists even if your router is reset as the values are loaded from NVRAM.
     
  9. pfoomer

    pfoomer LI Guru Member

    Curious

    Hi

    I am curious, why are you connecting it this way?
     
  10. kripz

    kripz LI Guru Member

    Because the WAN port is either on a different subnet or cant see the other vlan, devices plugged into the modem switch cannot access the net or other computers on my lan which are plugged into the routers switch.
     
  11. pfoomer

    pfoomer LI Guru Member

    Hi

    not sure I quite understand what you are trying to do, so I will explain my set up, to see if it makes sense.

    lan (192.168.1.*) ----> router-lan (192.168.1.*) --> router-wan(192.168.100.*) -->HUB --> modem ( 192.168.100.1)

    Connected to the HUB is a DMZ server, on 192.168.100.99, to monitor naughty boys!!!


    router scripts

    init

    ip addr add 192.168.100.10/24 dev vlan1 brd +

    firewall

    iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.100.0/24 -j MASQUERADE

    lan sees modem, dmz server, and internet using ISP dns

    internet sees dmz server

    dmz server sees internet (using externally defined dns, NOT isp's), but not LAN

    router has all four ports for lan, and uses wan port for the wan.
     
  12. ringer004

    ringer004 LI Guru Member

    Default for WRT54G v2.2, v3

    I have 2 older WRT54G, a v2.2 and a v3.

    The default config for both of these routers is:

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

    which is different than what was listed for a GL router. So will the commands provided in the first reply to change all ports to LAN ports work with the older v2.2/v3 routers?

    Thanks.
     
  13. bogderpirat

    bogderpirat Network Guru Member

    well, it should. i don't think the order in which the ports are listed make much of a difference. if it does, try setting vlan0ports to "1 2 3 4 0 5*". i don't think you need to change anything about vlan1ports, so long as you're not using the vlan1 device (i.e. have wan disabled on the webif).
     
  14. Kiwi8

    Kiwi8 LI Guru Member

    Assign in this way:
    nvram set vlan0ports="0 1 2 3 4 5*"
    nvram set vlan1ports="5"
     
  15. kripz

    kripz LI Guru Member

    This is why:

    [​IMG]

    Modem plugged into WAN port, WRT54GL handles PPOE auth and routing etc. PC A cannot access net or any other computer. Other computers cant access PC A.
     
  16. pfoomer

    pfoomer LI Guru Member

    Hi

    OK, now I understand, I think.

    Your set up is similar to mine, though you seem to have a multi port modem, where as I have a hub and a modem.

    Yes I experience similiar problems when I ran in PPOE mode, using bridged mode between the modem and router.

    To overcome this, I am running a DHCP server on the modem, running the router in WAN dhcp mode (using modem as its DHCP server), and NOT using the two scripts I mentioned earlier. The ip ranges are as I quoted, 192,168,1.* for the LAN, 192.168.100.* for the DMZ, modem.

    This allows me all the connectivity I described earlier, with port forwarding from the modem and dmz, via the router to the syslog server I run on the LAN.

    It course the assumes the modem has the dhcp capability, which mine does.
     
  17. ringer004

    ringer004 LI Guru Member

    Default config for v2.2, v3

    Thanks for the information.
    Much appreciated.
     
  18. kripz

    kripz LI Guru Member

    This was my work around, modem plugged into routers switch, and 1 port from routers switch to routers wan port.

    [​IMG]

    This way, router could auth ppoe and switch on my modem could be used for more pcs.

    Using

    Code:
    nvram set vlan1ports=""
    nvram set vlan0ports="4 3 2 1 0 5*"
    nvram set manual_boot_nv=1
    nvram commit
    reboot
    And removing the cable that joins the routers wan to routers switch did not work. The router could not auth PPOE to the modem.
     

Share This Page