802.1q vlan range on E3000 - VIDs beyond 15 possible?

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


Joined: 18 Sep 2010
Posts: 39

PostPosted: Tue Feb 08, 2011 9:12    Post subject: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
cron2 wrote:
OK, patching switch-bcmrobo.c works, and I can get my vlans 920+930+940 that way - but it's somewhat ugly (/proc/switch/eth0/vlan is prepopulated with 1024 subdirectories now), and of course I'd need to recomple the run-time environment to make it "compatible".

OTOH, for my purposes, just doing

echo "4t 8" >/proc/switch/eth0/vlan/920/ports
vconfig add eth0 920
ifconfig vlan920 ... up

perfectly well does the job from within a script :-)

The switch-robo.c patch is fully trivial:

Code:


--- switch-robo.c       (revision 15508)
+++ switch-robo.c       (working copy)
@@ -598,7 +598,7 @@
                        .interface              = device,
                        .cpuport                = 5,
                        .ports                  = 6,
-                       .vlans                  = 16,
+                       .vlans                  = 1020,
                        .driver_handlers        = cfg,
                        .port_handlers          = NULL,
                        .vlan_handlers          = vlan,


Yee-ha!


so, both bcmrobo.c and switch-robo.c need to be patched as you posted above to break the vlan number limit, right?
Sponsor
cron2
DD-WRT Novice


Joined: 05 Dec 2010
Posts: 29

PostPosted: Tue Feb 08, 2011 10:19    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
tangsoft wrote:

so, both bcmrobo.c and switch-robo.c need to be patched as you posted above to break the vlan number limit, right?


"Yes and no" :-)

If you only want runtime configuration, on DD-WRT, and have a switch that is controlled by switch-robo.c (which seems to be true for most/all? broadcom gear, but see phuzi0n's comment about non-broadcom), then it is sufficient to only patch switch-robo.c - for the E3000, that's all I need.

If you want the kernel driver to configure the switch properly on boot, based on NVRAM settings, with "high VLANs", then you need to patch bcmrobo.c

Since patching switch-robo.c only requires putting the newly compiled .ko on a jffs or usb filesystem and load that instead of the default module, it's way easier to get started than patching bcmrobo.c, recompiling the whole kernel, rebuilding the image, and wondering why it's not booting...

phuzi0n wrote:

... if the VLAN boardflag is enabled...


what sort of flag is this, and where is it set? Is it a NVRAM setting, or somethign specific to a certain architecture / board?

gert
tangsoft
DD-WRT Novice


Joined: 18 Sep 2010
Posts: 39

PostPosted: Wed Feb 09, 2011 5:22    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
cron2 wrote:
tangsoft wrote:

so, both bcmrobo.c and switch-robo.c need to be patched as you posted above to break the vlan number limit, right?


"Yes and no" :-)

If you only want runtime configuration, on DD-WRT, and have a switch that is controlled by switch-robo.c (which seems to be true for most/all? broadcom gear, but see phuzi0n's comment about non-broadcom), then it is sufficient to only patch switch-robo.c - for the E3000, that's all I need.

If you want the kernel driver to configure the switch properly on boot, based on NVRAM settings, with "high VLANs", then you need to patch bcmrobo.c

Since patching switch-robo.c only requires putting the newly compiled .ko on a jffs or usb filesystem and load that instead of the default module, it's way easier to get started than patching bcmrobo.c, recompiling the whole kernel, rebuilding the image, and wondering why it's not booting...


hi,gert, are you sure you can tag 3 vlans simutaneously over trunk port?
here i can load the revised module: switch-robo,and get 128 vlans propagate under the /proc/switch/eth0/vlan/.
when i try to tag my iptv vlan85 over wan port and get iptv streaming, the internet connection over vlan2 through wan port dropped. Or the reverse.
by the way, my router is wrt160nv3, should be brcm5325e switch chips. and my isp provides iptv/internet access over 1 single uplink through multiple vlans(iptv tagged vlan85, internet no tagged).
So i also need to figure out how to put tagged and untagged traffic together over wan port.

cron2 wrote:

phuzi0n wrote:

... if the VLAN boardflag is enabled...


what sort of flag is this, and where is it set? Is it a NVRAM setting, or somethign specific to a certain architecture / board?

gert

I have same question over this flag.
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1716

PostPosted: Wed Feb 09, 2011 7:20    Post subject: Reply with quote
Perhaps CFE? This is the only place I can think of..
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10143

PostPosted: Wed Feb 09, 2011 7:58    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
cron2 wrote:
phuzi0n wrote:

... if the VLAN boardflag is enabled...


what sort of flag is this, and where is it set? Is it a NVRAM setting, or somethign specific to a certain architecture / board?

gert

http://www.dd-wrt.com/wiki/index.php/Enabling_VLAN_Support_for_BCM4704#Configure_Boardflags

_________________
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)
tangsoft
DD-WRT Novice


Joined: 18 Sep 2010
Posts: 39

PostPosted: Wed Feb 09, 2011 8:10    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
phuzi0n wrote:
cron2 wrote:
phuzi0n wrote:

... if the VLAN boardflag is enabled...


what sort of flag is this, and where is it set? Is it a NVRAM setting, or somethign specific to a certain architecture / board?

gert

http://www.dd-wrt.com/wiki/index.php/Enabling_VLAN_Support_for_BCM4704#Configure_Boardflags


it looks like only for BCM4704, for my WRT160n V3, it is:
nvram get boardflags
0x710
if i set the boardflags like 0x810, the router will be half bricked.
looks like no need to set boardflag for wrt160n v3.

by the way, Gurus there, any clues for put 802.1Q tagged and untagged traffic together through wan port?
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7017

PostPosted: Wed Feb 09, 2011 8:19    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
tangsoft wrote:
phuzi0n wrote:
cron2 wrote:
phuzi0n wrote:

... if the VLAN boardflag is enabled...


what sort of flag is this, and where is it set? Is it a NVRAM setting, or somethign specific to a certain architecture / board?

gert

http://www.dd-wrt.com/wiki/index.php/Enabling_VLAN_Support_for_BCM4704#Configure_Boardflags


it looks like only for BCM4704, for my WRT160n V3, it is:
nvram get boardflags
0x710
if i set the boardflags like 0x810, the router will be half bricked.
looks like no need to set boardflag for wrt160n v3.




Where did you get the idea of adding 0x100 ?
The wiki article clearly says that you should OR 0x100 to your current value, not ADD.
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10143

PostPosted: Wed Feb 09, 2011 8:39    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
tangsoft wrote:
it looks like only for BCM4704, for my WRT160n V3, it is:
nvram get boardflags
0x710
if i set the boardflags like 0x810, the router will be half bricked.
looks like no need to set boardflag for wrt160n v3.

by the way, Gurus there, any clues for put 802.1Q tagged and untagged traffic together through wan port?

You just don't understand binary math and tried to do it without a hexadecimal calculator. Your 0x100 bit was already set as it will be on any model that has VLAN's already enabled. You actually unset 3 bits and set another.

_________________
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)
cron2
DD-WRT Novice


Joined: 05 Dec 2010
Posts: 29

PostPosted: Wed Feb 09, 2011 8:47    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
tangsoft wrote:

hi,gert, are you sure you can tag 3 vlans simutaneously over trunk port?


Yes, I've tried 2 + 920 + 930 + 940 at the same time and it worked. All of them tagged, though.

tangsoft wrote:

here i can load the revised module: switch-robo,and get 128 vlans propagate under the /proc/switch/eth0/vlan/.
when i try to tag my iptv vlan85 over wan port and get iptv streaming, the internet connection over vlan2 through wan port dropped. Or the reverse.
by the way, my router is wrt160nv3, should be brcm5325e switch chips. and my isp provides iptv/internet access over 1 single uplink through multiple vlans(iptv tagged vlan85, internet no tagged).
So i also need to figure out how to put tagged and untagged traffic together over wan port.


There's special letters for "untagged native vlan" in the switch config. You could try:

echo "0* 8" >vlans/2/ports
echo "0t 8" >vlans/85/ports

that should give you "vlan 2 untagged, vlan 85 tagged" on the port 0 (WAN). I think the "*" specifies "if untagged packets come in, they go to this particular VLAN".

What I do to make sure packets are tagged as I want them is to hook up a linux laptop to the port in question and run "tcpdump -n -e" there - "-e" will show ethernet headers and will display "vlan 85" for a tagged packet. Untagged packets won't show "vlan" info.

gert
tangsoft
DD-WRT Novice


Joined: 18 Sep 2010
Posts: 39

PostPosted: Wed Feb 09, 2011 9:30    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
phuzi0n wrote:
tangsoft wrote:
it looks like only for BCM4704, for my WRT160n V3, it is:
nvram get boardflags
0x710
if i set the boardflags like 0x810, the router will be half bricked.
looks like no need to set boardflag for wrt160n v3.

by the way, Gurus there, any clues for put 802.1Q tagged and untagged traffic together through wan port?

You just don't understand binary math and tried to do it without a hexadecimal calculator. Your 0x100 bit was already set as it will be on any model that has VLAN's already enabled. You actually unset 3 bits and set another.


Embarassed i really made a mess up with the bits...
anyway, thanks Guru.
tangsoft
DD-WRT Novice


Joined: 18 Sep 2010
Posts: 39

PostPosted: Wed Feb 09, 2011 9:53    Post subject: Re: both bcmrobo.c and switch-robo.c need to be patche? Reply with quote
cron2 wrote:
tangsoft wrote:

hi,gert, are you sure you can tag 3 vlans simutaneously over trunk port?


Yes, I've tried 2 + 920 + 930 + 940 at the same time and it worked. All of them tagged, though.

tangsoft wrote:

here i can load the revised module: switch-robo,and get 128 vlans propagate under the /proc/switch/eth0/vlan/.
when i try to tag my iptv vlan85 over wan port and get iptv streaming, the internet connection over vlan2 through wan port dropped. Or the reverse.
by the way, my router is wrt160nv3, should be brcm5325e switch chips. and my isp provides iptv/internet access over 1 single uplink through multiple vlans(iptv tagged vlan85, internet no tagged).
So i also need to figure out how to put tagged and untagged traffic together over wan port.


There's special letters for "untagged native vlan" in the switch config. You could try:

echo "0* 8" >vlans/2/ports
echo "0t 8" >vlans/85/ports

that should give you "vlan 2 untagged, vlan 85 tagged" on the port 0 (WAN). I think the "*" specifies "if untagged packets come in, they go to this particular VLAN".

What I do to make sure packets are tagged as I want them is to hook up a linux laptop to the port in question and run "tcpdump -n -e" there - "-e" will show ethernet headers and will display "vlan 85" for a tagged packet. Untagged packets won't show "vlan" info.

gert


hmm,thanks gert, it may be 5325E behaves in another way? when I did echo "0* 5" >vlans/2/ports, the output of cat vlans/2/ports just like: 0 5t. not like 0* 5t. And the echo "0t 5" >vlans/85/ports will make internet connection through vlan2 dropped.
its very appreciated if you can do a test on E3000.
I do agree the "*" specifies "if untagged packets come in, they go to this particular VLAN", but maybe it does not mean the outgoing packets will be untagged through the * port.
Not sure, i maybe make another mess. I will try to do a tcpdump.
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1716

PostPosted: Wed Feb 09, 2011 9:54    Post subject: Reply with quote
cron2, can you provide the patched module? If you are unconfortable to attach it here and be blamed for possible bricks, you can pm me Smile
tangsoft
DD-WRT Novice


Joined: 18 Sep 2010
Posts: 39

PostPosted: Wed Feb 09, 2011 10:02    Post subject: Reply with quote
fggs wrote:
cron2, can you provide the patched module? If you are unconfortable to attach it here and be blamed for possible bricks, you can pm me Smile


i attached mine here. it is for 128 vlans, and for kernel up to 2.6.
Hope it helps.

To gert: if you would let me try your ko file, that would be nice. In case I am doing something wrong with module compiling stuff.



switch-roboko.txt
 Description:
revised kernel module for switch-robo. it will propagate 128 vlans under /proc/switch/eth0/vlan/. rename switch-roboko.txt to switch-robo.ko to use.

Download
 Filename:  switch-roboko.txt
 Filesize:  11.47 KB
 Downloaded:  1303 Time(s)

cron2
DD-WRT Novice


Joined: 05 Dec 2010
Posts: 29

PostPosted: Wed Feb 09, 2011 16:57    Post subject: Reply with quote
fggs wrote:
cron2, can you provide the patched module? If you are unconfortable to attach it here and be blamed for possible bricks, you can pm me Smile


Attached. It works on my E3000 and I have not tested this on anything else - use on your own risk.



switch-robo-e3000-gcc412.zip
 Description:
patched switch-robo.ko for e3000 with 1020 vlans

Download
 Filename:  switch-robo-e3000-gcc412.zip
 Filesize:  5.08 KB
 Downloaded:  1021 Time(s)

fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1716

PostPosted: Wed Feb 09, 2011 17:13    Post subject: Reply with quote
Something is definitely not right, sizes are too different
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next Display posts from previous:    Page 3 of 8
Post new topic   Reply to topic    DD-WRT Forum 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