From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 21 11:17:42 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0CE916A418 for ; Tue, 21 Aug 2007 11:17:42 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from s200aog14.obsmtp.com (s200aog14.obsmtp.com [207.126.144.128]) by mx1.freebsd.org (Postfix) with SMTP id 7BD1C13C469 for ; Tue, 21 Aug 2007 11:17:40 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from source ([217.206.187.80]) by eu1sys200aob014.postini.com ([207.126.147.11]) with SMTP; Tue, 21 Aug 2007 11:17:37 UTC Received: from [10.0.0.89] (bill.mintel.co.uk [10.0.0.89]) by rodney.mintel.co.uk (Postfix) with ESMTP id 8FAA2181428; Tue, 21 Aug 2007 11:48:41 +0100 (BST) Message-ID: <46CAC308.7070509@tomjudge.com> Date: Tue, 21 Aug 2007 11:48:40 +0100 From: Tom Judge User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Mohacsi Janos References: <20070821113922.B40614@mignon.ki.iif.hu> In-Reply-To: <20070821113922.B40614@mignon.ki.iif.hu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: vlan taggging on etherchannel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 11:17:42 -0000 Mohacsi Janos wrote: > Dear All, > What is the recommended way to configure vlan interfaces on > etherchannel bonded interfaces in a failure mode. I found, that > etherchannel is supported by ng_fec(4) (but not exactly what I want) and > also found that there two? way of configuring vlans: vlan(4) and > ng_vlan(4). But I did not found any description or configuration snippet > to configure both preferentially via /etc/rc.conf neither in FreeBSD > 6.x-stable, neither in FreeBSD-7.0-current. What I want to achieve: > > [switch1]-----GE---bge0----\ /----vlan100 > }=={-----vlan101 > [switch2]-----FE---bge1----/ \----vlan102 > \---vlan103 > > > I would like to prefer all the vlans via bge0 with GE towards switch1. > And use only bge1 in case of switch1 or bge0 link failure. > > I could use bond on Linux for this purpose. How to achieve similar setup? > You may want to take a look at if_lagg, it supports EtherChannel (AKA fec), LACP and failover modes (Which is what you would need). It is available in RELENG_6 and Current. You may wish to take a look at: http://nzfug.nz.freebsd.org/nzfug/HandbookUpdates/NetworkAggregation rc.conf entries for the example might look like (not tried this): cloned_interfaces="lagg0" ifconfig_lagg0="laggproto lacp laggport fxp0 laggport fxp1" As for the vlan interfaces we use if_vlan and rc.conf snippets look as follows: cloned_interfaces="vlan1 vlan2" ifconfig_vlan1="inet x.x.x.x/24 vlan 1 vlandev bge1" ifconfig_vlan2="inet x.x.x.x/24 vlan 2 vlandev bge1" Putting these to together for you use might look like this: cloned_interfaces="lagg0 vlan100 vlan101 vlan102 vlan103" ifconfig_lagg0="laggproto failover laggport bge0 laggport bge1" ifconfig_vlan100="inet x.x.x.x/24 vlan 100 vlandev lagg0" ifconfig_vlan101="inet x.x.x.x/24 vlan 101 vlandev lagg0" ifconfig_vlan102="inet x.x.x.x/24 vlan 102 vlandev lagg0" ifconfig_vlan103="inet x.x.x.x/24 vlan 103 vlandev lagg0" Tom