On 05/04/11 08:52, Yeoh Chun Yeow wrote:
> Untagged packet receive by port 1 is drop. But VLAN 1 and VLAN 2 tagged
> packet for port 0 is working perfertly.
> 
> config 'switch_vlan'
>         option 'device' 'eth1'
>         option 'vlan' '1'
>         option 'vid' '1'
>         option 'ports' '0t 1 5t'
> 
> config 'switch_vlan'
>         option 'device' 'eth1'
>         option 'vlan' '2'
>         option 'vid' '2'
>         option 'ports' '0t 1 5t'

It works for me; I just tried it.

But it is a curious setup. Did you do it just to test the functionality? Having
untagged membership of two VLANs is a nice corner case that might have some use,
but is definitely not normal. Since it does work on the M chip, I left it in for
those cases where it might be useful. But if it doesn't work on the FC chip, I
would just throw the possibility out in the driver once we can differentiate
between the two chips.

> Working for both VLAN tagged and untagged packet.
> 
> config 'switch_vlan'
>         option 'device' 'eth1'
>         option 'vlan' '1'
>         option 'vid' '1'
>         option 'ports' '0t 5t'
> 
> config 'switch_vlan'
>         option 'device' 'eth1'
>         option 'vlan' '2'
>         option 'vid' '2'
>         option 'ports' '1 5t'

Good to hear a more usual setup does work. I assume this is with the patch you
sent earlier? In that case the common case where a port has both untagged and
tagged memberships fails, right?

Watch out for the primary VLAN ID; "pvid" property of the port. "swconfig dev
eth1 show" is your friend. The PVID might not always be what you expect. Seeing
where untagged packets go is something that needs to be tested for the FC chip.
The M chip is configured such that untagged packets coming in on a port are only
accepted if the port is a member of its PVID, and sent out to other members of
that VLAN. If a port is not a member of the VLAN that is in its PVID, the
packets are dropped (i.e., source port filtering, both for tagged and untagged
packets). Note that it doesn't matter if a port is a tagged or untagged member
of a VLAN, just if it is a member at all.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to