802.1q bridged trunk with STP

Corey Smith corsmith at gmail.com
Wed Mar 7 20:38:25 UTC 2007


Please CC: me as I am off list.

I want to be able to create an 802.1q bridged trunk.  This is nice if
you want layer 1 and 2 redundancy on an arbitrary number of logical
networks with only two physical network interfaces.

Here is try1:

ifconfig bridge18 destroy
ifconfig bridge19 destroy
ifconfig vlan18 destroy
ifconfig vlan19 destroy
ifconfig vlan118 destroy
ifconfig vlan119 destroy

ifconfig vlan18 create
ifconfig vlan19 create
ifconfig vlan118 create
ifconfig vlan119 create

ifconfig vlan18 vlan 18 vlandev bge0 up
ifconfig vlan19 vlan 19 vlandev bge0 up
ifconfig vlan118 vlan 18 vlandev bge1 up
ifconfig vlan119 vlan 19 vlandev bge1 up

ifconfig bridge18 create
ifconfig bridge19 create

ifconfig bridge18 inet 192.168.1.50/24 addm vlan18 stp vlan18 addm vlan118 \
  stp vlan118 up
ifconfig: unable to set bridge flags: Invalid argument

This works if you don't enable stp but gives the error above
otherwise.  Without using spanning tree you can't actually plug it
into your switch.

Instead of running STP over the vlan interfaces I decided to try
running STP on the real interfaces and then use the bridge interfaces
as the vlan vlandev.

Try2:

ifconfig vlan18 destroy
ifconfig bridge1 destroy

ifconfig vlan18 create
ifconfig bridge1 create

ifconfig bridge1 addm bge0 stp bge0 addm bge1 stp bge1 up

ifconfig vlan18 inet 192.168.1.50/24 vlan 18 vlandev bridge1 up
ifconfig: SIOCSETVLAN: Protocol not supported

Still no dice.  I think that this method is the one that is actually
supported by Cisco switches and has a cleaner config

Is there a way to accomplish this task using FreeBSD 6.2-RELEASE ?

-Corey Smith


More information about the freebsd-net mailing list