Full VLAN support on WNR3500Lv2 with Tomato ?

3 posts / 0 new
Last post
DLW
DLW's picture
Full VLAN support on WNR3500Lv2 with Tomato ?

Dear all,

I just bought a Netgear WNR3500Lv2 that I planned to use both as a gigabit switch and wireless access point to extend my wireless network.

The switch has to be VLAN aware because it needs to forward both untagged packets and VLAN ID 100 tagged packets. These come from the streaming video between a french freebox server (ADSL router) and freebox player (Media player).

The solution I found is to use the command 

robocfg switch disable vlan 100 ports "0t 1t 2t 3t 4t 8t" switch enable

It works (thought is incompatible with the GUI that does not accept ports both tagged and untagged) BUT

If you use it too early in the boot process, it does not work. So I did put

sleep 5; robocfg ....

in the init script box (sleep 3 was not enough).

For some reason unknown to me, the switch is recognised as "BCM5325/535x" instead of "BCM53115" by 'robocfg show' in the early stages of the boot process:

--------------

Switch: enabled gigabitPort 0:   10HD enabled stp: none vlan: 2 mac: 28:c6:8e:04:e1:73

Port 1:   DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00

Port 2:   10HD enabled stp: none vlan: 1 mac: 00:12:fb:a2:4b:f6

Port 3:   DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00

Port 4:   DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00

Port 5:   10HD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00

VLANs: BCM5325/535x enabled mac_check mac_hash

-----------

After the 5 seconds, 'robocfg show' outputs :

------------

Switch: enabled gigabit

Port 0: 1000FD enabled stp: none vlan: 2 jumbo: off mac: 28:c6:8e:04:e1:73

Port 1:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00

Port 2:  100FD enabled stp: none vlan: 1 jumbo: off mac: 00:12:fb:a2:4b:f6

Port 3:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00

Port 4:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00

Port 8: 1000FD enabled stp: none vlan: 1 jumbo: off mac: 9c:d3:6d:9e:9e:ea

VLANs: BCM53115 enabled mac_check mac_hash

   1: vlan1: 1 2 3 4 8t

   2: vlan2: 0 8t

   3: vlan3: 8t

   4: vlan4: 0t 8t

   5: vlan5: 8t

 100: vlan100: 0t 1t 2t 3t 4t 8t

------------------

Maybe this impacts the settings for vlans when you want to use a VLAN VID which is incompatible with "BCM5325/535x" in the VLAN related init scripts ... I am still trying to find out where this occurs in the source code of "router/rc/*.c"

Is robocfg used to configure the switch using the nvram config or does the switch chip actually read the nvram directly to configure itself ?

Thanks in advance for any hints 

Dominique

DLW
DLW's picture
"Is robocfg used to configure

"Is robocfg used to configure the switch using the nvram config or does the switch chip actually read the nvram directly to configure itself"

I found the answer to this question: it is the linux driver et.ko which uses src-rt/shared/bcmrobo.c that configures the switch using configuration from nvram ... I think this part of the code does not work with alternate mapping for VLAN/VID ... it does not even try to read "vlan.*vid" nvram variables ...

I still do not get why robocfg gets confused with the identity of the switch during the boot process ... apparently the et.ko driver resets the switch when the nvaram variable "gpio5=robo_reset" is set.

Is there a reason from the et.ko driver to configure the switch depending on the nvram instead of using userspace robocfg later instead ?

fireblade-au
fireblade-au's picture
Did you get this working

Did you get this working right?  I'm wanting to know if an VLAN Id can be used as I've read previously with WRT the VLAN Id's shown are 1-15 like the Dot1Q VLAN Id field is only 4 bits but the 802.1q standard permits 1-4092 with the exception of about 5 ID's for token-ring of Ethernet ID's.