OpenWrt Forum Archive

Topic: WRT54GS with transparent vlan transport ?

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I have a 2 linux boxes with 802.1q vlan tagging and they are connected through a wireless link with two WAP54G (1 in AP mode, the other in client mode).

-------  802.1q  --------      --------  802.1q  -------
|BOX 1|----------|WAP54G|------|WAP54G|----------|BOX 2|
-------  tag 12  --------      --------  tag 12  -------

That works fine, but when I replace the WAP54G in AP mode with a WRT54G the vlan is not passed-through the WRT54G. I guess it's because of the Broadcom switch that is implementing vlans as well, so I try different setting in the nvram variables but without success sad
Now I'm thinking about to modify the et.o driver so here you come wink I wonder if it is possible to modify the et.o driver so that it sets the switch to pass-through vlan's packets, or simply configure one port without tagging to kernel interface.
Hoping you could understand me, I thank you in advance.

Now I'm thinking about to modify the et.o driver so here you come wink I wonder if it is possible to modify the et.o driver so that it sets the switch to pass-through vlan's packets, or simply configure one port without tagging to kernel interface.
Hoping you could understand me, I thank you in advance.

I've got an WRT54GS V1.1 where I've accidentally activated (somehow thrue flashing the wrong firmware) this feature which you want and now I can't get the switch to stop talking 802.1q to the outside.

See http://openwrt.org/forum/viewtopic.php?t=1080. So somehow it's possible but I don't know how to activate nor how to deactivate this feature :cry:

i'am not sure about WAP54G, but probably it  dont'have switch and forward all tagged frames as well. WRT54G have 802.1Q vlan switch, and forwards only these tagged frames, what is it configured to do. In older versions with the adm6996 switch, we can completely turn off 802.1Q with adm6996.o module. Look at http://www.openwrt.org/forum/viewtopic.php?t=363 , then it will be forwarding all tagged packets from whatever vlans (i have tried up to vlan120).
For the newer versions of WRT's is not such module done, because different switch chip, and we can't turn vlan support completely off. But via nvram variables, we can program switch to forward vlan tagged frames (not untag them) for every port. For example forwarding a vlan5, looks like this:

nvram set vlan5ports="0* 1* 2* 3* 4* 5*"

to vlan5 belongs all ports and * makes all of them tagged, so we receive tagged frames via wireless, pass these to switch tagged port 5 and output these via tagged ports 0-4. I, myselt not tried this, but in theory it must work. In such way we can bypass up to vlan15. There is no way to bypass for example vlan40.

Hi, thanks for your answers, I tried the following:

nvram set vlan5ports="0* 1* 2* 3* 4* 5*" 

but whithout success: the ethernet ports continued sending untagged frames.
So I dived in the /release/src/et/sys/ directory, looking for an answer. And I found it: etc_robo.c
In the function:

/* Configure the device and enable the VLANs */
int bcm53xx_config(robo_info_t *robo, uint8 cid , char *vars )

I set the ports to send tagged frames instead of untagged ones.

        /* port descriptor */
        struct {
                uint16 untag;   /* untag enable bit (Page 0x34 Address 0x08-0x0B Bit[11:6]) */
                uint16 member;  /* vlan member bit (Page 0x34 Address 0x08-0x0B Bit[5:0]) */
                uint8 pvidr;    /* pvid register address (Page 0x34 Address 0x10-0x1D) */
                uint8 cpu;      /* is this cpu port? */
        } pdesc[] = {
            //  marcosmas
            //    /* port 0 */ {1 << 6, 1 << 0, 0x10, 0},
            //    /* port 1 */ {1 << 7, 1 << 1, 0x12, 0},
            //    /* port 2 */ {1 << 8, 1 << 2, 0x14, 0},
            //    /* port 3 */ {1 << 9, 1 << 3, 0x16, 0},
            //    /* port 4 */ {1 << 10, 1 << 4, 0x18, 0},
                /* port 0 */ {0 << 6, 1 << 0, 0x10, 0},
                /* port 1 */ {0 << 7, 1 << 1, 0x12, 0},
                /* port 2 */ {0 << 8, 1 << 2, 0x14, 0},
                /* port 3 */ {0 << 9, 1 << 3, 0x16, 0},
                /* port 4 */ {0 << 10, 1 << 4, 0x18, 0},
            //  marcosmas
.....

Now the et.o module configures the Broadcom switch to not untag the frames that are leaving from the ethernet ports.
One important thing is that now you don't have to set the nvram variables vlan#ports/hwname, so you can pass the 4096 possible vlans.

The discussion might have continued from here.