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

VLAN Configuration Problems

Discussion in 'Tomato Firmware' started by Xplorer4x4, Dec 18, 2013.

  1. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Tapatalk ate my last post so here's a short version. Router 1 is a Ethernet bridge getting wifi to my desktop. Router 2 is an Ethernet bridge that needs to access the VLAN from router 1 but I would like to use router 1 to bridge the WiFi signal to a separate ssid for the Ethernet bridge to router 2. I have set up wireless Ethernet bridges several times. No prob. However I can't seem to get the bridge to work on its own let alone bridging the WiFi to a separate ssid. Seems vlan should do this but I can't quite figure out what is wrong. Any pointers? Thanks in advance for tips!

    Sent from my XT926 using Tapatalk
     
    Last edited: Dec 18, 2013
  2. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Small edits to clean up some autocorrect typos.

    Sent from my XT926 using Tapatalk
     
  3. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    http://imgur.com/a/21T8w
    Heres the ettings of the router thats going to handle the VLAN. I have not entered any custom commands via ssh/telenet as I assume the fixes were added to the builds by now. I have tried to connect to my VLAN(SSID Wrekonize) with my android Smartphone but it goes from connecting to disconnected immediately so something must be wrong.
     
  4. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Someone? Anyone? I have read up on VLAN setups but still lost.
     
  5. vmixus

    vmixus Serious Server Member

    Don't count on it.
    Recently I ran into a VLAN issue with a router I setup and needed to manually configure everything.
    I've learned that the GUI can't reliably be trusted as the internal ports for each router (brand/model) are mapped differently.

    Your post doesn't indicate exactly what routers you're using but running vlan related queries specific to your brand/model might yield some answers.
     
    Xplorer4x4 likes this.
  6. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Thanks for pointing out the lack of models. It was in my original OP but when I retyped it, since tapatalk crashed, I forgot to include it. The VLAN config is going to be on a linksys E2000 which is in Wireless Ethernet Bridge mode from a WNR2000(stock). Then there is another E2000 which will be running off the VLAN as an Wireless Ethernet Bridge only. So to try to clear this up a bit more:
    WNR2000(AP using STOCK firmware)->E2000(Bridge/AP using TomatoUSB)->E2000(Bridge only using Tomato USB).
     
    Last edited: Jan 1, 2014
  7. mw333

    mw333 Serious Server Member

    If you cannot find documentation on the port/switchport mapping (today's web search engines are great) you could figure it out by setting up a bridge on a different subnet with only one port attached, and systematically test each port until you find the one that works. Write it down. For example, on the RT-N16 labeled LAN1 is GUI port 4 and on the f7d4301 LAN1 is GUI port 3.

    Sometimes port 1 is not switchport 1 and sometimes they are wired in reverse order.

    Repeat for all ports. Do not forget the WAN.
     
  8. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    I am trying to understand the relevance if the port mapping here. Is it really that important given that the primary E2000 will have one wired Ethernet connection and serve as a Wireless AP for my smatphone and second router in Wireless Ethernet Bridge?

    FWIW, I have not googled the port mappings, but will do in a sec. However, with my Desktop connected to port 1,2, and 3, on the primary E2000, I can access 192.168.1.100(Primary E2000) When I connect my desktop to port 4, I can no longer access 192.168.1.100(primary E2000). Instead I know have to access the primary router via 192.168.2.100. I have already changed the secondary E2000's IP over to 192.168.2.200. Set the router to Wireless Ethernet Bridge, and entered the WINS and Gateway as 192.168.2.100. However the second router is not accessible when connected to port 4 of the primary or via wireless. I have tried to connect to the WAN and LAN ports on the secondary, but still no access.

    tl;dr, as far as I can tell if I map vlan to port 4, vlan is port 4 based on the testing above. Thanks for the advice guys. Nice to finally be trying to make some head room here. I am beating my head against a wall in the mean time trying to stretch the wifi signal but at least I am learning. :)
     
  9. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Code:
    root@unknown:/# nvram show | grep vlan.ports
    vlan0ports=
    vlan1ports=2 3 4 8*
    vlan2ports=1 8
    vlan3ports=0 8
    vlan4ports=
    vlan5ports=
    vlan6ports=
    vlan7ports=
    vlan8ports=
    vlan9ports=
    root@unknown:/#
    root@unknown:/# nvram show | grep port.vlans
    root@unknown:/#
    root@unknown:/# nvram show | grep vlan.hwname
    vlan0hwname=
    vlan1hwname=et0
    vlan2hwname=et0
    vlan3hwname=et0
    vlan4hwname=
    vlan5hwname=
    vlan6hwname=
    vlan7hwname=
    vlan8hwname=
    vlan9hwname=
    root@unknown:/# nvram get lan_ifnames
    vlan1 eth1
    root@unknown:/#
    
    Fwiw, port 4 is assigned to the lan1/br1 bridge in the GUI, so am I reading this right that port 4 in the gui is physically port 1? I tried Secondary E2000 WAN->Primary E2000 P1 and P4, but still can not access the second route.
     
  10. vmixus

    vmixus Serious Server Member

    In my case I completely ignored the GUI and relied on the IP's I was getting assigned while plugged into each port. That way I could tell for sure what the phsyical / logical mappings were.

    I could be wrong but assuming the above posted config and a client plugged into physical LAN4 -- if you get a IP in a different range than LAN 1-3 in the specified range for br1 - then it's safe to assume that your ports are mapped in reverse order.

    Physical WAN | LAN1 | LAN2 | LAN3 | LAN4
    Logical 0 | 4 | 3 | 2 | 1
     
    Last edited: Jan 3, 2014
  11. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    So how are you suggesting I check the IPs assigned? Here are screen shots of the settings again: http://imgur.com/a/21T8w
     
  12. vmixus

    vmixus Serious Server Member

    After phsyically connecting a computer to LAN4 if DHCP assings an IP in the range of 192.168.2.1-254 then the vlan ports are mapping properly. Also, while plugged into LAN1-3 DHCP should assign 192.168.1.1-254.
     
  13. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Sorry I thought you were talking soemthing more complex. Results: LAN1-3 give me an address of 192.168.1.* while port 4 fails to assign an IP address.

    Code:
    nvram show | egrep "vlan.ports|vlan.hwname" | sort
    vlan0hwname=
    vlan0ports=
    vlan1hwname=et0
    vlan1ports=2 3 4 8*
    vlan2hwname=et0
    vlan2ports=1 8
    vlan3hwname=et0
    vlan3ports=0 8
    vlan4hwname=
    vlan4ports=
    vlan5hwname=
    vlan5ports=
    vlan6hwname=
    vlan6ports=
    vlan7hwname=
    vlan7ports=
    vlan8hwname=
    vlan8ports=
    vlan9hwname=
    vlan9ports=
    
     
    Last edited: Jan 3, 2014
  14. vmixus

    vmixus Serious Server Member

    Not sure why you can't get an IP on LAN 4 since you have DHCP enabled on br1 according to the screenshot you posted before.

    You can try to manually setup dhcp for vlan2 using Dnsmasq custom configuration (check reference links)
    Or try different settings for vlan2ports. Using a Linksys WRT300n, LAN4 ended up being 3 for me.
     
  15. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Yeah I was thinking it has to be some sort of DHCP problem at this point. Is your primary router set as an AP? Keep in mind the primary E2000 is technically a guest router. I am wondering if it is a problem with being set to Wireless Ethernet Bridge rather then AP. Could you be a bit more specific as to which link I should follow since none specify specifically mention dnsmaq in the title?
     
  16. Mindaugas

    Mindaugas Reformed Router Member

  17. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

  18. vmixus

    vmixus Serious Server Member

    Several of the reference links (read through them) give examples of manually setting up dhcp for vlans

    Under "Advanced -> DHCP/DNS -> Dnsmasq Custom configuration"
    Code:
    # Format
    interface=<interface>
    dhcp-range=net:<interface>,<range first>,<range last>,<subnet mask>,<lease time>
    dhcp-option=<interface>,3,<gateway ip>
    dhcp-option=vlan3,6,<dns>
    
    # Example
    interface=vlan2
    dhcp-range=net:vlan2,192.168.1.100,192.168.149,255.255.255.0,1440m
    dhcp-option=vlan2,3,192.168.1.1
    dhcp-option=vlan2,6,8.8.8.8
    
    If that doesn't work I would try to keep playing with the port mappings for vlan2ports to see if that makes any difference.
     
  19. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Thanks for sticking with this. You said to use dnsmasq and I couldn't find any references in your links besides the one I mentioned. Some, if not all, mention static routes. Sorry if I took that to literal. After playing with things a bit more I think you may be right, the ports are in reverse order because setting Port 4 in the GUI and then checking the mappings Port 1 was assigned to vlan2. Regardless of that, I can now see where I went wrong with the other dnsmasq script. When using ssh I got a print out of vlan1(as you can see earlier in the thread). Now I realize that when I assigned port 4/1 it was mapped to vlan2. So now I see why you used vlan2 as the iface. So I learned something more tonight(even if it should have been obvious)..so here is what I came up with..
    Code:
    # Format
    interface=vlan2
    dhcp-range=net:192.168.2.100,192.168.2.1,192.168.2.254,255.255.255.0,1440m
    dhcp-option=vlan2,3,192.168.1.1
    dhcp-option=vlan2,6,192.168.1.1
    
    No luck and fyi I have ports 1 and 4(internal and external) mapped to vlan2 just to avoid any issues with reverse port numbers. With the ports mapped though I can access the web ui via 192.168.2.100(br1) assuming I have a static ip set, but it seems to be failing to set a gateway according to Network Manager in Chakra.

    I also had some questions though about the script. Mainly the 3 options in the dhcp-option lines. There were 2 items not explained. Also I am confused as to weather dhcp should use vlan3(wan) or vlan2?

    I am drifting back to the thought that this router being used as an Ethernet Bridge is a hurdle(but not necessarily an issue) but I guess traffic still has to enter and exit through the WAN correct?
     
  20. vmixus

    vmixus Serious Server Member

    Code:
    # This line looks wrong in your code block
    dhcp-range=net:192.168.2.100,192.168.2.1,192.168.2.254,255.255.255.0,1440m
    
    # Update it like so
    dhcp-range=net:vlan2,192.168.2.1,192.168.2.254,255.255.255.0,1440m
    I only checked the first 3 examples from the reference links and they all show how to manually setup dhcp for vlan's using a similar dnsmasq script -- read through them.

    If you'd like to better understand dnsmasq options, read the man page. (search "dhcp-option")

    Also, there's tons of stuff on vlans in the dd-wrt wiki (with router specific info/instructions)
     
  21. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    I tried your correction and no luck.

    As for the links in your tut, I had only cherry picked a few and must have picked the wrong ones lol.

    So tonight I tried this guide with no luck. As in my other testing, I could connect to the router via br1 when connected to the proper port if I assigned a proper static IP for the br1 subnet. However it still fails to get a gateway IP.
     
  22. vmixus

    vmixus Serious Server Member

    Xplorer4x4 likes this.
  23. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    To add to the port confusion..when setting the port via cli using that guise I assigned port 4 but it choose flagged port 1 both in the GUI and physically on the router.

    Also..according to buddee the ports and labels are backwards, but when I run:
    Code:
    root@unknown:/# nvram show | grep vlan.ports
    vlan0ports=
    vlan1ports=1 2 3 4 8*
    
    Which is just the opposite of what he is reporting in the screen shots. Is it possible Cisco/Linksys has since straightened things out?

    As for the new links, I will try to check them out tonight/tomorrow but I can only absorb so much new information and I am nearing my wits end on doing this. And I am not relying strictly on the GUI. I grew up on Dos/Win3.1 and have been using Ubuntu/Chakra on my desktop for over a year now. In the processes of switching to Arch.
     
  24. vmixus

    vmixus Serious Server Member

    Hang in there and you'll get there eventually.
    I'm there now too as I'm just figuring this stuff out as well.
    Maybe someone will be able to chime in with some suggestions.

    Also, I was referring to how the vlan gui is unreliable.
     
  25. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    I knew what you meant about the GUI/CLI I am just saying I am not scared to get my hands dirty, but I am not quite familiar to the particular commands and such and have a little paranoia about bricking the router.

    Any feedback on the ports issue I mentioned?

    Thanks again for your persistence!
     
  26. Xplorer4x4

    Xplorer4x4 Addicted to LI Member

    Update: Well here is where I stand..I do have web ui access to the Netgeat AP router so I turned the repeater function on and switched the primary E2000 over to AP+WDS and the VLAN is now getting DHCP with out any tweaks. However, it is not getting WAN access and seems to be only operating as a LAN device.
     

Share This Page