Stuart Henderson wrote:
On 2009-02-22, Daniel Ouellet <[email protected]> wrote:
# cat /etc/hostname.vlan{2,1002}
up vlan 2 vlandev dc0
up vlan 2 vlandev dc1
Here I assume here a typo and it would be

Mike has it right.

# cat /etc/hostname.vlan{2,1002}
up vlan 2 vlandev dc0
up vlan 1002 vlandev dc1

As you can't have the same vlan with two different parent?

you are confusing 802.1Q vlan id ("vlan 2") with interface name
(vlan2, vlan1002).
if you don't specify a particular vlan id, it defaults to the same
as the interface name, but there does not have to be any relationship
between the two.

In bridge mode, all traffic pass but i can't isolate each vlan to filter
on them witch I am trying to do.

you must bridge the individual vlans, not the parent interface.

First many thanks to Mike for the original suggestion and to Stuart to correct my miss understanding of the suggestion and the final working setup is a variation on the suggestion I guess.

So, here is how it is solved. It's a combinations of both parent bridge and vlan bridge.

I also discover oppose to what I thought that the native vlan would be the standard #1 as native, but when configure as 1, I couldn't get it to work.

I tried to have just the interfaces as up, then configure the native vlan as 1 and even tried as 0 just to see, but didn't work either as the native vlan. Vlan #2 did however worked regardless how I configure the native one.

So, in the end a mix of both did the trick.

Here is the final configuration and this works:

# cat hostname.dc0
inet 10.0.1.2 255.255.255.0 NONE media 100baseTX mediaopt full-duplex description Uplink
# cat hostname.dc1
up media 100baseTX mediaopt full-duplex description LAN
# cat hostname.vlan2
up vlan 2 vlandev dc0
# cat hostname.vlan1002
up vlan 2 vlandev dc1
# cat bridgename.bridge1
add dc0 add dc1 up
# cat bridgename.bridge2
add vlan2 add vlan1002 up

I thought I could do as below, but didn't, nor did the use of vlan 0 instead of 1 in testing. I guess vlan 1 add tag in the end oppose to no tag for native 1. I didn't know that and thought that it should be. My bad.

# cat hostname.dc0
up media 100baseTX mediaopt full-duplex description Uplink
# cat hostname.dc1
up media 100baseTX mediaopt full-duplex description LAN
# cat hostname.vlan1
inet 10.0.1.2 255.255.255.0 NONE vlan 1 vlandev dc0
# cat hostname.vlan1001
up vlan 1 vlandev dc1
# cat hostname.vlan2
up vlan 2 vlandev dc0
# cat hostname.vlan1002
up vlan 2 vlandev dc1
# cat bridgename.bridge1
add vlan1 add vlan1001 up
# cat bridgename.bridge2
add vlan2 add vlan1002 up

So, I guess the native vlan is no vlan at all (;> Is that true?

Many thanks for the suggestion and the added correction on my assumption as it was wrong the first time.

I must admit, the configuration might be a bit weird and hopefully it's not a side effect and can scale well, but I do very much appreciate the feedback and for the archive in case someone else need this weird setup, here it is and it does work, so far anyway. Will see when I start to beat it up more! (;>

Thanks again!!!

Daniel

Reply via email to