802.1q help

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


Joined: 17 Jun 2006
Posts: 13

PostPosted: Mon Aug 16, 2010 13:55    Post subject: Reply with quote
Netgear 3500L with DD-WRT v24-sp2 (08/07/10) mega (SVN revision 14896)

Can somebody please explain, why tagged VLAN's from a trunk are discarded at the switchports? I replaced a simple Linksys L2 Switch where trunks are transparently forwarded. All tagged networks reach the core router/dhcp no more.
Ok, I think. I configure Trunks like I do in CISCO Networks for example. VLAN1 native untagged and all others tagged on incoming and outgoing port. With GUI impossible, in cli setable but not working. And yes, I am aware, that the port numbering is inverted. I do not even need the VLANS on dd-wrt, but I need that it passes the trunks. Last hint: I do not even require L3 functions on this (simple) dd-wrt configuration.
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Aug 17, 2010 5:22    Post subject: Reply with quote
netsigi wrote:
Netgear 3500L with DD-WRT v24-sp2 (08/07/10) mega (SVN revision 14896)

Can somebody please explain, why tagged VLAN's from a trunk are discarded at the switchports? I replaced a simple Linksys L2 Switch where trunks are transparently forwarded. All tagged networks reach the core router/dhcp no more.
Ok, I think. I configure Trunks like I do in CISCO Networks for example. VLAN1 native untagged and all others tagged on incoming and outgoing port. With GUI impossible, in cli setable but not working. And yes, I am aware, that the port numbering is inverted. I do not even need the VLANS on dd-wrt, but I need that it passes the trunks. Last hint: I do not even require L3 functions on this (simple) dd-wrt configuration.

I think you're referring to Dynamic Trunking Protocol which configures trunks automatically and is a piece of Cisco's vast proprietary technology...

Did you see the switched ports page recently? I changed it a few days ago to explain more of the nvram variables and how to set them.

http://www.dd-wrt.com/wiki/index.php/Switched_Ports

I haven't finished revamping it so the trunking usage examples are still missing and it's probably still really confusing for configuring trunks... However, I gave a good example of all my variables from a working trunk on two different models here:

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=472090#472090

If you can't get it working with the new information then post the defaults from the three nvram commands, all the VLAN's you're trying to trunk, and what ports you're trying to use.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
netsigi
DD-WRT Novice


Joined: 17 Jun 2006
Posts: 13

PostPosted: Thu Aug 19, 2010 19:50    Post subject: Reply with quote
Quote:
I think you're referring to Dynamic Trunking Protocol which configures trunks automatically and is a piece of Cisco's vast proprietary technology...


No,no nothing dynamic. But Trunk is the correct term. Usually You have exactly one untagged VLAN and n tagged
VLANS between two switches. My last observations show, that tagging on dd-wrt means tag all VLANs or nothing.

Quote:
Did you see the switched ports page recently? I changed it a few days ago to explain more of the nvram variables and how to set them.


Yes, seems to be much work and a good start. I like the total absence of L3 informations. Found some good additional infos here:
http://oldwiki.openwrt.org/OpenWrtDocs%282f%29NetworkInterfaces.html#head-d37b87ad2086975b6ab4baa906e6e51b38752060

http://kamikaze.openwrt.org/docs/openwrt.html#x1-80001.2.1

My last test:
nvram set vlan3ports="4t 1t"

The one and only intention behind this is to tap dd-wrt in a existing trunk. And serving bridged wireless in default VLAN.
I was surprised, that indeed all devices in VLAN3 on my network reached the firewall now. But all other connectivity in the untagged VLAN is gone. The GUI is also no more reachable. Only via fixed IP over port 2 or 3.
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Thu Aug 19, 2010 22:51    Post subject: Reply with quote
netsigi wrote:
Quote:
I think you're referring to Dynamic Trunking Protocol which configures trunks automatically and is a piece of Cisco's vast proprietary technology...

No,no nothing dynamic. But Trunk is the correct term. Usually You have exactly one untagged VLAN and n tagged
VLANS between two switches. My last observations show, that tagging on dd-wrt means tag all VLANs or nothing.

Trunks don't magically configure themselves without some help, so either the old switch had a dynamic protocol running to configure the trunking or it wasn't VLAN capable at all and you were just using it to pass the trunk from another device that was VLAN capable?

netsigi wrote:
Quote:
Did you see the switched ports page recently? I changed it a few days ago to explain more of the nvram variables and how to set them.

Yes, seems to be much work and a good start. I like the total absence of L3 informations. Found some good additional infos here:
http://oldwiki.openwrt.org/OpenWrtDocs%282f%29NetworkInterfaces.html#head-d37b87ad2086975b6ab4baa906e6e51b38752060

http://kamikaze.openwrt.org/docs/openwrt.html#x1-80001.2.1

VLAN's in DD-WRT are exposed as interfaces named vlan# which you can do everything you normally would with an interface (assign it an address, bridge it, run a DHCP server for it, etc.). You can find more info about how to use the interface in other wiki guides, the switched ports page is just about how to configure the nvram variables to get VLAN's functional on layer 2.

netsigi wrote:
My last test:
nvram set vlan3ports="4t 1t"

The one and only intention behind this is to tap dd-wrt in a existing trunk. And serving bridged wireless in default VLAN.
I was surprised, that indeed all devices in VLAN3 on my network reached the firewall now. But all other connectivity in the untagged VLAN is gone. The GUI is also no more reachable. Only via fixed IP over port 2 or 3.

If you want the GUI to be accessible from VLAN 3 then you need to assign the interface an IP within the subnet that VLAN 3 is using which you can do on the networking page. You should have the CPU internal port included in the vlan3ports also, see the explanation on the switched ports page.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
netsigi
DD-WRT Novice


Joined: 17 Jun 2006
Posts: 13

PostPosted: Fri Aug 20, 2010 9:32    Post subject: Reply with quote
phuzi0n wrote:
Trunks don't magically configure themselves without some help


How true. But You search explanations much too far. Like You I am trying hard to understand dd-wrt concepts. Or in Other words: With the concepts of many other Companies I earn my money Wink And therefore I have a quite good knowledge of them.

I made some quick drawings:


I put a simple Netgear, D-Link switch into the trunk. All ethernet packets are switched. Tagged or not. All VLAN's going thru. All Networks between "some" and "another" work.


Here dd-wrt comes into the game. Default settings.
Code:
nvram show | grep vlan.ports
vlan2ports=0 8
vlan1ports=4 3 2 1 8*

The untagged traffic is still forwarded, tagged packets are lost, dropped whatever, VLAN3 from "some" to "another" does not work.


I try do do what I do with any other network gear in this case: configuring the trunk. And minimalistic as needed. I tell port4 and port1, they have also capability to forward tagged VLAN3:
Code:
nvram show | grep vlan.ports
vlan2ports=0 8
vlan1ports=4 3 2 1 8*
vlan3ports=4t 1t


Now the VLAN3 is indeed forwarded between "some" and "another" but the untagged, let's say VLAN1 is now blocked. And also the management is no more reachable. I can connect my client PC to port2 or port3, set manually a address in the management lan (the untagged one) and then I can reach dd-wrt's address again and change the mess back. It is because DHCP for all Networks are behind "some"

There should be something like:
Code:

vlan2ports=0 8
vlan1ports=4u 3 2 1u 8*
vlan3ports=4t 1t


It's no Voodoo, no dynamic stuff. Just simple network basics ;-)

And later when the understanding is there, I will take the next challenge to bridge selectively WLAN's on some VLANS Wink without any L3 on dd-wrt.



dd-wrt-default.png
 Description:
 Filesize:  20.42 KB
 Viewed:  13356 Time(s)

dd-wrt-default.png



dd-wrt-tagged.png
 Description:
 Filesize:  21.42 KB
 Viewed:  13356 Time(s)

dd-wrt-tagged.png



dd-wrt-cheap.png
 Description:
 Filesize:  16.19 KB
 Viewed:  13356 Time(s)

dd-wrt-cheap.png




Last edited by netsigi on Fri Aug 20, 2010 9:39; edited 1 time in total
netsigi
DD-WRT Novice


Joined: 17 Jun 2006
Posts: 13

PostPosted: Fri Aug 20, 2010 9:37    Post subject: Reply with quote
Just for comparing: there are also cheap GB switches with working and "no questions" Webinterface Wink


verycheapcisco.png
 Description:
 Filesize:  160.19 KB
 Viewed:  13354 Time(s)

verycheapcisco.png


LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Fri Aug 20, 2010 10:39    Post subject: Reply with quote
netsigi wrote:


There should be something like:
Code:

vlan2ports=0 8
vlan1ports=4u 3 2 1u 8*
vlan3ports=4t 1t


It's no Voodoo, no dynamic stuff. Just simple network basics ;-)



There is support for the "u" attribute, the opposite of the "t", did you test the example above?
I think it should work.

_________________
Kernel panic: Aiee, killing interrupt handler!
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Fri Aug 20, 2010 14:20    Post subject: Reply with quote
netsigi wrote:
I made some quick drawings:


I put a simple Netgear, D-Link switch into the trunk. All ethernet packets are switched. Tagged or not. All VLAN's going thru. All Networks between "some" and "another" work.

I'm asking if those switches are VLAN capable or not?

I understand now that you're trying to get the untagged vlan1 to still function along with the trunk. During my test earlier in this thread I said that these settings allow both VLAN's to work between two routers:

#worked
vlan0ports=1 2 4 5*
vlan1ports=0 5
vlan2ports=3 4t 5

Those settings worked fine using my two 100mbit models, but similar settings (adjusted for gigabit numbering VLAN's 1-3) between a gigabit model (wrt320n) and a 100mbit model (wrt300n v1.1) resulted in the tagged VLAN 3 working but the default VLAN 1 not working. ie. it may be a problem specific to the gigabit switches. I hadn't ever heard about the "u" option until now, so I'll play around with it and see if it makes any difference for me.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Fri Aug 20, 2010 15:47    Post subject: Reply with quote
I was a bit too quick there Embarassed

Code:

/* Port flags */
#define FLAG_TAGGED   't'   /* output tagged (external ports only) */
#define FLAG_UNTAG   'u'   /* input & output untagged (CPU port only, for OS (linux, ...) */
#define FLAG_LAN   '*'   /* input & output untagged (CPU port only, for CFE */

_________________
Kernel panic: Aiee, killing interrupt handler!
zebfink
DD-WRT Novice


Joined: 22 Apr 2010
Posts: 3

PostPosted: Tue Aug 24, 2010 4:54    Post subject: Reply with quote
Not sure if this helps.....
But I was running into similar issues of the same nature.

Found the exact solution for my 802.1Q issues (with WiFi and Trunking) already solved.

Been working perfectly for me since Jan, 2010

Scroll down to Duvi's post with his diagrams

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=214284&sid=569f4946dc099ed0cc812f913452ff71


Zeb
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Aug 24, 2010 5:02    Post subject: Reply with quote
zebfink wrote:
Not sure if this helps.....
But I was running into similar issues of the same nature.

Found the exact solution for my 802.1Q issues (with WiFi and Trunking) already solved.

Been working perfectly for me since Jan, 2010

Scroll down to Duvi's post with his diagrams

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=214284&sid=569f4946dc099ed0cc812f913452ff71


Zeb

That thread talks about how to configure the GUI which doesn't work on gigabit models as I explained at the start of this thread.

I just got done adding examples to the switched ports page for how to configure nvram variables for trunks.

http://www.dd-wrt.com/wiki/index.php/Switched_Ports

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
netsigi
DD-WRT Novice


Joined: 17 Jun 2006
Posts: 13

PostPosted: Tue Aug 24, 2010 19:09    Post subject: Reply with quote
zebfink wrote:

Found the exact solution for my 802.1Q issues (with WiFi and Trunking) already solved.

Scroll down to Duvi's post with his diagrams

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=214284&sid=569f4946dc099ed0cc812f913452ff71

Zeb


Yes, it is very near. It works because all VLAN's on the uplink ports of the switches are tagged.

It is very common, that there are "grown" networks out there, where later VLAN's where implemented. And mostly there is still a untagged, default VLAN for legacy devices. And I do not understand where the limitations are. Is it broadcom, is it xx-wrt or is it some proprietary driver thing?
Ok, one thing that still narrows the usability is the limitations of VLAN-Tags from 0 to 16 instead of 0 to 4096.

How is this under x86? For example pfSense under pcengines WRAP and ALIX works perfect with trunks AND native VLAN that can be any number between one and 4k.
Goto page Previous  1, 2 Display posts from previous:    Page 2 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