Bridge interface as the vlan(4) parent

Eygene Ryabinkin rea-fbsd at codelabs.ru
Thu Oct 16 04:25:36 UTC 2008


Andrew, *, good day.

I had just came across the following situation: I have two VLAN-tagged
links that are coming to my machine from two switches.  I am running
RSTP on the switches and need the machine to participate in the spanning
tree formation (one switch is the root, another is the backup).

Since RSTP messages are coming untagged, I need to make bridge on my
physical interfaces, to enable spanning tree formation.  And the bridge
should be the parent device for the vlan(4) interfaces that will untag
the packets.  It is not possible just now to have bridge interface to be
parent of vlan interface for two reasons:

1. vlan(4) won't attach to IFT_BRIDGE; this is rather easy to fix;

2. there should be a hook on the bridge path that will call vlan_input/
   vlan_output; this is the harder problem, but I think that it isn't
   so hard, at least I have such impression after glancing at the code.

Questions: may be I don't understand something and there is another way
to create RSTP-aware bridge that will handle vlans?  If my swithes will
speak PVST, this will be easy -- one bridge per vlan instance and
vlan(4) interfaces will be bridged.  But I need RSTP.

The second question: does anyone sees any problems apart from the
mentioned two?  May be I am wrong about the complexity of the second
problem?

Thanks!
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual   
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook 
    {_.-``-'         {_/            #
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20081016/0c7998a6/attachment.pgp


More information about the freebsd-net mailing list