From owner-freebsd-net@FreeBSD.ORG Fri Feb 6 06:26:19 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 023B116A4CE for ; Fri, 6 Feb 2004 06:26:19 -0800 (PST) Received: from mail.butovo-online.ru (mail.b-o.ru [212.5.78.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73E5543D2F for ; Fri, 6 Feb 2004 06:26:16 -0800 (PST) (envelope-from resident@b-o.ru) Received: from [192.168.92.185] (helo=192.168.92.185) by mail.butovo-online.ru with esmtp (Exim 4.24) id 1Ap742-00026q-F0 for freebsd-net@freebsd.org; Fri, 06 Feb 2004 17:34:38 +0300 Date: Fri, 6 Feb 2004 17:27:48 +0300 From: Andrew Riabtsev X-Mailer: The Bat! (v1.62i) Business X-Priority: 3 (Normal) Message-ID: <9121917175.20040206172748@b-o.ru> To: freebsd-net@freebsd.org In-Reply-To: <20040205171946.13823.qmail@web60808.mail.yahoo.com> References: <20040205171946.13823.qmail@web60808.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: Linux ethernet bonding like driver X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andrew Riabtsev List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 14:26:19 -0000 Hi Anshuman, Thursday, February 5, 2004, 8:19:46 PM, you wrote: AK> Hi all, AK> I have a situation where my servers (Freebsd Solaris AK> and Linux) are connected to two independent switches AK> via 2 seperate NIC cards. To enhance my redundancy I AK> want to group 2 adapters in a active-standby failover AK> mode, with a single IP flipping between the two. AK> Under Solaris I can do this with nafo or more recently AK> ipmp. Under Linux I can use the Ethernet bonding AK> driver in mode=1 to get this behavior. I did not find AK> any ready made solutions for FreeBSD so i coded my own AK> perl script to look at ifconfig and do a failover AK> based on "status" ... it can also ping a couple of AK> IPs and figure if the link is up but connectivity has AK> gone down. It fails over any aliases, fixes arp table, AK> takes care of vlans and moves the def route. I'd be AK> happy to share if anyone is interested. AK> So what is the issue ? AK> Well, I would like to achieve faster failover times AK> than my script currently gives (~5 seconds). The linux AK> driver does a failover in < 100 ms. It uses MII status AK> to detect link loss. AK> So in FreeBSD is there a way to implement a virtual AK> driver which can team 2 or more physical adapters in a AK> failover group ? I would appreciate some pointers on AK> where to get started. You could start from example in man ng_one2many. Then just edit source code of ng_one2many to check if link up on card, connected to hook in which packet should be send if not just send it to the next hook in destination hooks list. It is simple and you dont need to flip IP between interfaces, deal with arp-table, vlans and so on... -- Andrew mailto:resident@b-o.ru