From owner-freebsd-net@FreeBSD.ORG Sun Nov 22 04:55:09 2009 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B16C1065695 for ; Sun, 22 Nov 2009 04:55:09 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id C0E9A8FC2E for ; Sun, 22 Nov 2009 04:55:08 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 75AE348AF1; Sun, 22 Nov 2009 04:55:07 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lHgcsmzSh8up; Sun, 22 Nov 2009 04:55:01 +0000 (GMT) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id B448B48AE5; Sun, 22 Nov 2009 04:55:00 +0000 (GMT) Message-ID: <4B08C3DC.1080607@tomjudge.com> Date: Sun, 22 Nov 2009 04:53:48 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Josh Paetzel References: <4B0825DD.3000702@tomjudge.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "net@freebsd.org" Subject: Re: if_bridge as if_vlan parent X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 04:55:09 -0000 Josh Paetzel wrote: > On Nov 21, 2009, at 11:39 AM, Tom Judge wrote: > >> Hi, >> >> 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. >> >> Thanks >> > > > 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. [sw1-1/g1]->[FBSD-em0]-[FBSD-bridge0]-[FBSD-em1]->[sw2-1/g1] / \ [FBSD-vlan2] [FBSD-vlan200] So: 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. Tom