Changing VLAN Settings to SWCONFIG

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


Joined: 29 Jul 2021
Posts: 5

PostPosted: Thu Jul 29, 2021 15:59    Post subject: Reply with quote
kernel-panic69 wrote:
No router or build information given. Blanket statement. Might help if you give details and proof of concept.


So far I've tested two builds on an AC68U.
- 47090
- 46604

My switch config is attached.

My intent is that port 1 would traffic untagged packets on VLAN1 and VLAN3-5 would be tagged.

The GUI sets port config as the following:
VLAN 1:
ports: 1t 3 4 5t
VLAN 2:
ports: 0 5t
VLAN 3:
ports: 1t 5t
VLAN 4:
ports: 1t 5t
VLAN 5:
ports: 1t 2 5t


In order for untagged traffic to pass on VLAN1 I issue the following command:

swconfig dev switch0 vlan 1 set ports '1 3 4 5t'
swconfig dev switch0 set apply

Then the config looks like this:
VLAN 1:
ports: 1 3 4 5t
VLAN 2:
ports: 0 5t
VLAN 3:
ports: 1t 5t
VLAN 4:
ports: 1t 5t
VLAN 5:
ports: 1t 2 5t

Untagged traffic then passes on port 1 to VLAN1. So, it's not that it is impossible to do... It's just that the UI doesn't allow for that granular of configuration between ports and VLAN.



Capture.PNG
 Description:
Switch Config
 Filesize:  49.66 KB
 Viewed:  3350 Time(s)

Capture.PNG


Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12815
Location: Netherlands

PostPosted: Thu Jul 29, 2021 16:19    Post subject: Reply with quote
Does this makes sense:

Instead of the check box we need a drop down box with:
Off (same as unchecked
Untagged
Tagged

The tag check box below the column can than be deleted

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14102
Location: Texas, USA

PostPosted: Thu Jul 29, 2021 16:20    Post subject: Reply with quote
I presume you mean next to each vlan number on the left, @egc?
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
hemirunner426
DD-WRT Novice


Joined: 29 Jul 2021
Posts: 5

PostPosted: Thu Jul 29, 2021 16:23    Post subject: Reply with quote
egc wrote:
Does this makes sense:

Instead of the check box we need a drop down box with:
Off (same as unchecked
Untagged
Tagged

The tag check box below the column can than be deleted


Something like this on the far right for each VLAN row would work.

Choosing whether or not a VLAN is tagged makes more sense.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12815
Location: Netherlands

PostPosted: Thu Jul 29, 2021 16:30    Post subject: Reply with quote
I mean instead of the check boxes (Actually you can use triple state checkbox, when I was programming for Windows with Visual Studio they had one in the framework but a simple drop down box of course should work)


Naamloos.png
 Description:
 Filesize:  77.26 KB
 Viewed:  3323 Time(s)

Naamloos.png



_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14102
Location: Texas, USA

PostPosted: Thu Jul 29, 2021 16:34    Post subject: Reply with quote
You're not suggesting we follow OpenWRT's model in the webUI, are you? Blasphemy! *chuckle* I believe FreshTomato has a similar interface of sorts and works well. DD-WRT has always had an issue here and it would be great to come up with a solution that works on all platforms Cool
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12815
Location: Netherlands

PostPosted: Fri Jul 30, 2021 17:40    Post subject: Reply with quote
This is better I think Smile


Naamloos.png
 Description:
 Filesize:  106.2 KB
 Viewed:  3293 Time(s)

Naamloos.png



_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Sun Aug 01, 2021 8:28; edited 1 time in total
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14102
Location: Texas, USA

PostPosted: Fri Jul 30, 2021 19:13    Post subject: Reply with quote
Let us know how convincing BrainSlayer to make this change goes CoolLaughingTwisted Evil
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Sun Aug 01, 2021 0:43    Post subject: Reply with quote
egc wrote:
This is better I think Smile


This modification would be great !

One thought - given there can only be one untagged VLAN per port, could you just put a 'native VLAN dropdown' at the top of each port's VLAN selection list and populate that dropdown from the list of configured VLAN ids (plus 'None')? This could be less of a change to the UI, the main challenge would be populating the dropdown with the configured VLAN ids.

One question - do Broadcom routers that support VLANs always support combining tagged and untagged frames on the same port?

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Sun Aug 01, 2021 7:50    Post subject: Reply with quote
msj100 wrote:
One question - do Broadcom routers that support VLANs always support combining tagged and untagged frames on the same port?


Not through the GUI.
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Sun Aug 01, 2021 9:20    Post subject: Reply with quote
Per Yngve Berg wrote:
msj100 wrote:
One question - do Broadcom routers that support VLANs always support combining tagged and untagged frames on the same port?


Not through the GUI.


Understand combining untagged and tagged is not supported through the GUI - I just recall reading that some of the Broadcom based routers (Asus) did not actually support mixing untagged and tagged frames on a single port.

BTW - example of what I was suggesting for selecting untagged VLAN in mockup screenshot attached.



screenshot-192.168.1.1-2021.08.01-17_58_04c.png
 Description:
Example where untagged (native VLAN) per port might be configured?
 Filesize:  110.38 KB
 Viewed:  3207 Time(s)

screenshot-192.168.1.1-2021.08.01-17_58_04c.png



_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12815
Location: Netherlands

PostPosted: Sun Aug 01, 2021 10:10    Post subject: Reply with quote
The native VLAN id is the untagged one on VLAN 1 so I am no sure if this is necessary.

We might need the cpu port(s), I think if you have one CPU port traffic is always tagged (but not sure not a vlan expert) but if you have two CPU ports traffic is untagged (at default that is where one CPU port is attached to vlan 1 and the other to vlan 2, again not sure)

Mine is not a mockup it is the real GUI and it works. "Slight problem", the underlying code logic is not functional.

As there is no documentation it will take me weeks of researching and try and error to get it functional.

So I am afraid you really should ask BS to do that for us

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Mon Aug 02, 2021 2:39    Post subject: Reply with quote
OK - I'm still very much learning about VLANs.

Maybe I'm not using the right terminology - I know there is nuance around terms like 'native VLAN' and 'default VLAN' and even 'VLAN 1'.

My understanding:

- each switch port can only have one untagged VLAN id associated with it

- the untagged VLAN id associated with a switch port determines the VLAN with which untagged Ethernet frames from the device connected to that port are associated - this can be any VLAN id (this is what I'm calling 'native VLAN', perhaps wrongly) - I'm already doing this to get non-802.1q capable devices onto a specific network

- configuration of VLAN tagging appears to be at a port level, so does this imply all Ethernet frames for that particular switch port must be tagged (will the port still support untagged frames)? ...after some testing, I see it is absolutely possible to support tagged and untagged frames on a single port - however, I can't seem to find a way to preserve manual swconfig changes so they survive reboot. I assume, for now, I need to write swconfig set and apply commands to rc_startup?

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12815
Location: Netherlands

PostPosted: Mon Aug 09, 2021 11:58    Post subject: Reply with quote
Indeed you need to run the swconfig commands at startup.

I am looking into to it and it is rather complex.
To use the existing logic I came up with the following:
adding a checkbox for each port/vlan to tag that, see picture.

The GUI is working (sort off) but the underlying code-logic is very complex and not quite working yet, I need BS to do that.



tag-800.png
 Description:
 Filesize:  73.48 KB
 Viewed:  2931 Time(s)

tag-800.png



_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Mon Aug 09, 2021 12:45    Post subject: Reply with quote
Yeah - I can imagine the logic would get quite tricky - should only have a maximum of one VLAN marked as 'on' with no 'tag' (i.e. untagged) per port. Very tricky!
_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 3 of 4
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