OpenWrt Forum Archive

Topic: need help with vlan and trunk

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

hi!

my hardware is a linksys wrt54gl with kamikaze 7.09

i like to have my wan port on vlan506 (on the other side is a cisco trunk) with nat for vlan507
ethernet port 0-2 and wlan on vlan507
and ethernet port 3 on vlan508

i have tested to create one vlan with:

config switch eth0
        option vlan0    "1 2 3 5*"
        option vlan1    "4 5"
        option vlan506  "0 5*"

but nothing happens.

any ideas or tipps? thanks.

with friendly greetings,

cordo

You can only use VLAN 0 to 15 IIRC

An asterisk on a port inside a vlan definition means, that this is the default vlan on that port, and untagged packets belong to that vlan.
Specifing more than one asterisk for the same port on different vlans is not useful, and I don't know what are the consequences of that. Maybe the whole vlan definition could be ignored, the possiblities are endless ;-)

Cisco equipment does not support a vlan 0, if you want to communicate with cisco hardware, do not use vlan 0.

If you don't communicate via a trunked port to cisco (or other) hardware, vlan numbers are inside your linux device only, and hence irrelevant to the cisco hardware.
If you want to have a trunked port, you should specify the letter "t" (for tagged) following the port number on the vlan definition.

The default is "t"agged for the cpu port (usually 5), and "u"ntagged for all other ports.
Since you did not specify "t" with vlan506, it would be not a trunked port, and your cisco hardware would never see any vlan information.

In my opinion, a trunked port should have an asterisk in exactly one vlan definition, and a "t" on the remaining vlan definitions.

Restrictions of VLAN 0 to 15 on a broadcom switch are correct, if you want shared/common vlans on both your router and a cisco device, stay within vlan1 to vlan15.
Additionally you should not use the default vlan as the management vlan on your cisco device (see cisco docs).

I hope this helps a little bit...

(Last edited by MMCM on 16 Apr 2008, 12:47)

Restrictions of VLAN 0 to 15 on a broadcom switch are correct, if you want shared/common vlans on both your router and a cisco device, stay within vlan1 to vlan15.
Additionally you should not use the default vlan as the management vlan on your cisco device (see cisco docs).

Can you tell what the reason for this restriction is, and if there is any way around this ?

Thank you !

awaum wrote:

Can you tell what the reason for this restriction is, and if there is any way around this ?

Ask Broadcom and Cisco, I don't know.

If you want both types of devices to use vlans, use the lowest common denominator for both, which is vlan1 to vlan15.

(Last edited by MMCM on 25 Apr 2008, 00:55)

The discussion might have continued from here.