I to have run into this issue

The cause is that the vlan table in the broadcom switch only has 16 entries
They are indexed by the last 4 bits of the vlan id
The result is that vlan 1 and vlan 17 will hit the same table entry
So the order you configure matters, and vlan 17 config will stomp on vlan 1.

Because of this, the openwrt people decided to only support vlans 0 - 15

To solve it, I stopped using the switch module and used robocfg to configure
the switch
I then modified robocfg (its easier to hack than the switch module) to
support vlans > 15.  But I still have the last 4 bit index restriction.
There is no way to get around that.

I am currently working on spanning tree for the switch, and once I have that
working I port to move my robocfg  modifications into the switch module, and
submit them back to openwrt.

cheers
----------------------------------------------------------
Chris Martin
m: 0419812371
----------------------------------------------------------


On Wed, Jun 2, 2010 at 12:17 AM, manoo <ma...@manoo.hu> wrote:

> hello guys.
>
> I have played with .1q on openwrt and I have faced some problems. I have
> two pre-defined vlans: vlan5 and vlan600. both vlans has an own dhcp
> server - I am able to gain ip addresses from them. I want to connect the
> wrt's wan to a trunk port of a cisco (where I use only tagged vlans). I
> can use vlan600 (I have already made the virtual devices - 'vconfig add
> eth0 <vlannumber>':
>
> r...@openwrt:/# robocfg switch disable vlans enable reset vlan 600 ports
> "4t 5t"
>  switch enable
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> r...@openwrt:/# robocfg show
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> Switch: enabled
> Port 0(W):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 1(4):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 2(3): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 4(1): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> VLANs: BCM5325/535x enabled mac_check mac_hash
> vlan8: 4t 5t
> r...@openwrt:/# udhcpc -i eth0.600
> udhcpc (v1.11.2) started
> Sending discover...
> Sending select for 10.10.10.225...
> Lease of 10.10.10.225 obtained, lease time 900
> udhcpc: ifconfig eth0.600 10.10.10.225 netmask 255.255.255.0 broadcast +
> udhcpc: setting default routers: 10.10.10.1
> udhcpc: setting dns servers: 10.10.10.1
> r...@openwrt:/#
>
> it seems the 'robocfg show' command shows a wrong vlan id: vlan8.
>
> it works of course with vlan5:
>
> r...@openwrt:/# robocfg switch disable vlans enable reset vlan 5 ports
> "4t 5t" s
> witch enable
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> r...@openwrt:/# robocfg show
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> Switch: enabled
> Port 0(W):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 1(4):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 2(3): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 4(1): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> VLANs: BCM5325/535x enabled mac_check mac_hash
> vlan5: 4t 5t
> r...@openwrt:/# udhcpc -i eth0.5
> udhcpc (v1.11.2) started
> Sending discover...
> Sending select for 192.168.0.118...
> Lease of 192.168.0.118 obtained, lease time 900
> udhcpc: ifconfig eth0.5 192.168.0.118 netmask 255.255.255.0 broadcast +
> udhcpc: setting default routers: 192.168.0.1
> udhcpc: setting dns servers: 192.168.0.1
> r...@openwrt:/#
>
> my problem is when I define more than one vlans I cannot use higher vlan
> number than 15:
>
> r...@openwrt:/# robocfg switch disable vlans enable reset vlan 5 ports
> "4t 5t" v
> lan 600 ports "4t 5t" switch enable
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> r...@openwrt:/# robocfg show
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> Switch: enabled
> Port 0(W):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 1(4):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 2(3): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 4(1): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> VLANs: BCM5325/535x enabled mac_check mac_hash
> vlan5: 4t 5t
> vlan8: 4t 5t
> r...@openwrt:/# udhcpc -i eth0.600
> udhcpc (v1.11.2) started
> Sending discover...
> Sending select for 10.10.10.225...
> Lease of 10.10.10.225 obtained, lease time 900
> udhcpc: ifconfig eth0.600 10.10.10.225 netmask 255.255.255.0 broadcast +
> udhcpc: setting default routers: 10.10.10.1
> udhcpc: setting dns servers: 10.10.10.1
> r...@openwrt:/# udhcpc -i eth0.5
> udhcpc (v1.11.2) started
> Sending discover...
> Sending discover...
> Sending discover...
>
> r...@openwrt:/#
>
>
> It seems that only the last vlan works. If I change the order of the
> vlans only the vlan5 interface will work:
>
> r...@openwrt:/# robocfg switch disable vlans enable reset vlan 600 ports
> "4t 5t"
>  vlan 5 ports "4t 5t" switch enable
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> r...@openwrt:/# robocfg show
> probing eth1
> SIOCETHTOOL: No such device
> probing eth0
> Switch: enabled
> Port 0(W):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 1(4):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 2(3): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> Port 4(1): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
> Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
> VLANs: BCM5325/535x enabled mac_check mac_hash
> vlan5: 4t 5t
> vlan8: 4t 5t
> r...@openwrt:/# udhcpc -i eth0.5
> udhcpc (v1.11.2) started
> Sending discover...
> Sending select for 192.168.0.118...
> Lease of 192.168.0.118 obtained, lease time 900
> udhcpc: ifconfig eth0.5 192.168.0.118 netmask 255.255.255.0 broadcast +
> udhcpc: setting default routers: 192.168.0.1
> udhcpc: setting dns servers: 192.168.0.1
> r...@openwrt:/# udhcpc -i eth0.600
> udhcpc (v1.11.2) started
> Sending discover...
> Sending discover...
> Sending discover...
>
> r...@openwrt:/#
>
> It seems the problem is always causes trouble if I want to use vlan
> number higher than 15 despite of the box can handle higher vlan number
> (for example vlan600). Have any of you faced with this before? I have
> tried it with both brcm-2.4 and brcm47xx (of kamikaze 8.09.2)
>
> thanks,
>
> manoo
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to