Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2004 17:27:48 +0300
From:      Andrew Riabtsev <resident@b-o.ru>
To:        freebsd-net@freebsd.org
Subject:   Re: Linux ethernet bonding like driver
Message-ID:  <9121917175.20040206172748@b-o.ru>
In-Reply-To: <20040205171946.13823.qmail@web60808.mail.yahoo.com>
References:  <20040205171946.13823.qmail@web60808.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9121917175.20040206172748>