if_bridge as if_vlan parent
julian at elischer.org
Mon Nov 23 06:08:54 UTC 2009
Tom Judge wrote:
> Josh Paetzel wrote:
>> On Nov 21, 2009, at 11:39 AM, Tom Judge wrote:
>>> I was why I get the following error when trying to create a vlan on
>>> top of if_bridge:
>>> # ifconfig bridge0 create
>>> # ifconfig vlan2 vlan 2 vlandev bridge0
>>> ifconfig: SIOCSETVLAN: Protocol not supported
>>> And if there was/is any reason for this to not be supported.
>> You can create a bridge from a pair of vlan devices....
>> # ifconfig vlan1 create
>> # ifcconfig vlan2 create
>> # ifconfig bridge0 create
>> # ifconfig vlan1 vlan 1 vlandev em0
>> # ifconfig vlan2 vlan 2 vlandev em0
>> # ifconfig bridge0 addm vlan1 addm vlan2
>> Is that more in line with what you want to do?
>> I'm a little curious what problem set using a bridge as the parent of
>> a vlan solves though.
> You have the problem upside down.
> I am trying to bridge 2 trunk ports on 2 separate switches with a
> FreeBSD box, and I would like to access a number of tagged vlans on the
> trunk with the FreeBSD box.
> / \
> [FBSD-vlan2] [FBSD-vlan200]
> ifconfig em0 up
> ifconfig em1 up
> ifconfig bridge0 create
> ifconfig bridge0 addm em0 stp em0 addm em1 stp em1 up
> ifconfig vlan2 create
> ifconfig vlan2 10.0.0.1/24 vlan 2 vlandev bridge0
> ifconfig vlan200 create
> ifconfig vlan200 10.9.9.1/24 vlan 200 vlandev bridge0
> This will fail when I try to attach the if_vlan's to the if_bridge.
I haven't tried it, but you MAY be able to plumb up some solution
to this using the netgraph vlan and bridge nodes.
> freebsd-net at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
More information about the freebsd-net