Linksys E1200v2 VLAN

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
apolonio
DD-WRT Novice


Joined: 04 Dec 2011
Posts: 22

PostPosted: Thu Feb 23, 2017 10:31    Post subject: Linksys E1200v2 VLAN Reply with quote
Been struggling with getting VLAN tagging working on my Linksys E1200v2

I do use the serial console, you really need to if you are going to try things that have a potential to boot you off the network.

Also I don't use wifi or any gateway/routing/NAT.

Basically I want a switch that can split a trunk into its seperate VLANs.

What I wanted to do was have trunked vlan with 3 tags going in to one port, and each of the other 3 ports are untagged for each VLAN.

Here is what I tried

Code:

nvram set port4vlans="1 2 18 19 21"
nvram set port3vlans="3 18 19 21"
nvram set port2vlans="4 18 19 21"
nvram set port1vlans="5 18 19 21"
nvram set port0vlans="3 4 5 16 18 19 21"
nvram set port5vlans="1 2 3 4 5 16"
nvram set vlan1ports="2 4 5*"
nvram set vlan2ports="2 4 5"
nvram set vlan3ports="0t 3 5"
nvram set vlan4ports="0t 5"
nvram set vlan5ports="0t 1 5"
nvram set vlan3hwname=et0
nvram set vlan4hwname=et0
nvram set vlan5hwname=et0
nvram commit
reboot


Port 4 has VLAN 1 and 2 which I use to manage the router, it is also the WAN port.

Port 0 which is labeled 1 on the router is where the trunk comes in. Tags 3,4, and 5 come in on that port.

Port 1 is untagged VLAN5
Port 2 is untagged VLAN4
Port 3 is untagged VLAN3

I think I may just be out of luck and this router can't VLAN.

I tried another router, the WRT320N, although the ports are laid out different, I could configure the VLANs how I wanted.


Code:

nvram set port0vlans="1 2 18 19 21"
nvram set port1vlans="3 18 19 21"
nvram set port2vlans="4 18 19 21"
nvram set port3vlans="5 18 19 21"
nvram set port4vlans="3 4 5 16 18 19 21"
nvram set port5vlans="1 2 3 4 5 16"
nvram set vlan1ports="0 8*"
nvram set vlan2ports="0 8"
nvram set vlan3ports="4t 1 8"
nvram set vlan4ports="4t 2 8"
nvram set vlan5ports="4t 3 8"
nvram set vlan3hwname=et0
nvram set vlan4hwname=et0
nvram set vlan5hwname=et0
nvram commit
reboot


Maybe it is not possible with this router and I am out of luck and just need confirmation.
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6867
Location: Romerike, Norway

PostPosted: Thu Feb 23, 2017 11:47    Post subject: Reply with quote
This I don't understand: "Port 4 has VLAN 1 and 2 which I use to manage the router, it is also the WAN port. "

If a port have more than one vlan, it have to be tagged. What equipment is connected to port 4?
apolonio
DD-WRT Novice


Joined: 04 Dec 2011
Posts: 22

PostPosted: Thu Feb 23, 2017 16:25    Post subject: Linksys E1200v2 VLAN Reply with quote
Short Answer: It is the port I use to manage the router so I leave it alone.

More Details:
When I first set up the router, through the Web UI, I set the WAN Connection type to Disabled and I check the Assign WAN Port to Switch. Through some past research this is what I found

Code:

port 0 = physical port 1
port 1 = physical port 2
port 2 = physical port 3
port 3 = physical port 4
port 4 = physical port WAN


So I plug my laptop in to port 4 (the WAN port) and I can access the router through the network via web page, ssh, and telnet. So I do not want to change port 4 much. VLAN0, VLAN1, and VLAN2 seem to have been created by the initial install so I leave those alone as well. From my notes.

Code:

vlan0 seems to be WAN vlan
vlan1 seems to be LAN vlan
vlan2 seems to be WIFI vlan



I have an out of band connection via serial console as well. Just in case. From the serial console I can


Code:

erase nvram
reboot


log in as root with the password admin

and reboot again

This rebuilds vlan2, I clear its ip
Code:

ifconfig vlan2 0.0.0.0


Then assign the IP I need to br0 and add vlan2 back
Code:

ifconfig br0 x.x.x.x netmask 255.255.255.0
brctl addif br0 vlan2


It gives me access to the Web UI where I can restore my backup config.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6867
Location: Romerike, Norway

PostPosted: Thu Feb 23, 2017 16:52    Post subject: Reply with quote
Remove the wsn port from vlan3 and add to vlan1
apolonio
DD-WRT Novice


Joined: 04 Dec 2011
Posts: 22

PostPosted: Thu Feb 23, 2017 17:00    Post subject: Reply with quote
I will give that a try, but I also wanted to send an illustration of what I am trying to do.




VLANPortsTags.jpg
 Description:
 Filesize:  138.22 KB
 Viewed:  7117 Time(s)

VLANPortsTags.jpg


apolonio
DD-WRT Novice


Joined: 04 Dec 2011
Posts: 22

PostPosted: Thu Feb 23, 2017 18:35    Post subject: Reply with quote
Something tells me the E1200 cannot to VLANs

I see this error scrolling by when it reboots

Code:

configure vlan ports to
cannot open /proc/switch/eth0/vlan/0/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/1/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/2/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/3/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/4/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/5/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/6/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/7/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/8/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/9/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/10/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/11/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/12/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/13/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/14/ports
configure vlan ports to
cannot open /proc/switch/eth0/vlan/15/ports


I look under /proc and indeed there is no switch.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6867
Location: Romerike, Norway

PostPosted: Thu Feb 23, 2017 21:39    Post subject: Reply with quote
nvram set vlan1ports="4 5*"
nvram set vlan2ports="5"
nvram set vlan3ports="0t 1 5"
nvram set vlan4ports="0t 2 5"
nvram set vlan5ports="0t 3 5"
nvram set vlan3hwname=et0
nvram set vlan4hwname=et0
nvram set vlan5hwname=et0
nvram commit
reboot

vlan1 shall be bridged to br0.
apolonio
DD-WRT Novice


Joined: 04 Dec 2011
Posts: 22

PostPosted: Fri Feb 24, 2017 1:12    Post subject: Solved Reply with quote
Thanks Per Yngve Berg, that was it, so this linksys E1200 can do port based and tag based VLANs.

I appreciate you all taking the time to help me.
truehomie35
DD-WRT Novice


Joined: 27 May 2019
Posts: 22

PostPosted: Thu Jun 13, 2019 4:51    Post subject: Reply with quote
how do i know which port # belong to port id on the rear side of the router ???
apolonio
DD-WRT Novice


Joined: 04 Dec 2011
Posts: 22

PostPosted: Thu Jun 13, 2019 6:20    Post subject: I recall finding a web page Reply with quote
I recall finding a web page regarding broadcomm

It has been a while but I think this was it

https://wiki.dd-wrt.com/wiki/index.php/Default_internal_device_network
truehomie35
DD-WRT Novice


Joined: 27 May 2019
Posts: 22

PostPosted: Fri Jun 14, 2019 15:30    Post subject: Re: I recall finding a web page Reply with quote
apolonio wrote:
I recall finding a web page regarding broadcomm

It has been a while but I think this was it

https://wiki.dd-wrt.com/wiki/index.php/Default_internal_device_network


oh I see...

BTW why do you need 3 VLAN ports trunked into port 0??

Quote:
What I wanted to do was have trunked vlan with 3 tags going in to one port, and each of the other 3 ports are untagged for each VLAN
apolonio
DD-WRT Novice


Joined: 04 Dec 2011
Posts: 22

PostPosted: Fri Jun 14, 2019 15:47    Post subject: Limited Ethernet Connections Reply with quote
There were two reasons I wanted to do this,

The first was a portable lab running VMware ESXi host that only had 1 NIC. With the cheap (and small) ddwrt unit, I could bring a network with multiple subnets to places where I have presentations.

A light ddwrt VM on the ESXi host was also used
https://www.youtube.com/watch?v=qbmE87ZpB4A

The second was that there are some places in my home with only two network connections, with this setup, I can access three subnets at a time (if you don't count VLAN 1 which is a management subnet)
truehomie35
DD-WRT Novice


Joined: 27 May 2019
Posts: 22

PostPosted: Fri Jun 14, 2019 17:37    Post subject: Re: Limited Ethernet Connections Reply with quote
I see.. so if I have simply

nvram set vlan3ports="1 5"
nvram set vlan4ports="2 5"
nvram set vlan5ports="3 5"

there is nothing to worry about ..?? right?
i mean backyard is closed


Last edited by truehomie35 on Fri Jun 14, 2019 17:46; edited 2 times in total
truehomie35
DD-WRT Novice


Joined: 27 May 2019
Posts: 22

PostPosted: Fri Jun 14, 2019 17:41    Post subject: Re: Limited Ethernet Connections Reply with quote
could you also tell me what following strings mean ??

nvram set vlan3hwname=et0
nvram set vlan4hwname=et0
nvram set vlan5hwname=et0
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6867
Location: Romerike, Norway

PostPosted: Fri Jun 14, 2019 19:22    Post subject: Reply with quote
It associates a VLAN with a switch. More useful on routers that have more than one switch chip.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum