From owner-freebsd-questions Tue Aug 20 20:57:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8076A37B400 for ; Tue, 20 Aug 2002 20:57:15 -0700 (PDT) Received: from dragoncrest.jasnetworks.net (dragoncrest.jasnetworks.net [65.194.254.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FBD943E42 for ; Tue, 20 Aug 2002 20:57:14 -0700 (PDT) (envelope-from raiden23@netzero.net) Received: from works (works.jasnetworks.net [192.168.0.2]) by dragoncrest.jasnetworks.net (8.12.3/8.11.6) with ESMTP id g7L45fgh018826; Wed, 21 Aug 2002 00:05:42 -0400 (EDT) (envelope-from raiden23@netzero.net) Message-Id: <4.2.0.58.20020820234636.00a02b90@192.168.0.25> X-Sender: megos@192.168.0.25 X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Wed, 21 Aug 2002 00:05:06 -0400 To: friar_josh@webwarrior.net, "W. Desjardins" From: Lord Raiden Subject: Re: network link failover Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <1029872940.224.63.camel@markx.vladsempire.net> References: <20020820144648.T26962-100000@mail.carracing.com> <20020820144648.T26962-100000@mail.carracing.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 07:48 PM 8/20/02 +0000, Josh Paetzel wrote: >On Tue, 2002-08-20 at 18:56, W. Desjardins wrote: > > Hi, > > > > I couldnt find anything in the archives specific to this question. > > > > I was wondering if there are any network card drivers that support link > > failover between either 2 cards, or 2 ports on the same card? basically, I [snip] Actually I use a simple sh script to do much the same thing. It goes something like this. (commands to get ID of master card.) if master rl0 then ping server1 on rl0 if success then end if fail then ping server 2 on rl0 if success then end if fail then ping server 3 on rl0 if success then end if fail then (command to switch rl1 to master) (runs test on rl1 at this point to verify that the new nic connection is working and data is moving. If not, it lets out a royal fit) if master rl1 then (same basic commands as above.) If it fails running ping commands on both servers, it's set to make a royal fit and scream its head off (via a cool audio screamer tool rigged to the PC speaker) till someone comes to check things out. The chances of both switches or both nics being out is slim. The chances of the three servers it pings to test the connection being down at the same time is slimmer. If it has to fail over it sends an error report to the internal sysops mailing list which basically tells whoevers on duty that it's had a network failure on one of the switches or the nics and we deal with it from there. Since this script is slightly different for each machine and is somewhat ungainly in size (two pages of code total I think) for an sh script and customized to our internal network I can't share it, but this example of ours should give you something to start with. We fire this from cron every 5 minutes and I've only ever seen this actually initiate a failover like twice and both times it was because the switch died. Since implementing it I also haven't seen a huge increase in ICMP or network traffic in general either as the whole script runs for only a few seconds if it gets a ping reply. All it needs is 3 successful ping replies from one host and it considers its job done. One other part that I added that makes this script so large is I also have this setup to identify network trouble via slow ping times (>50ms internal when our average is about 8ms) and packet loss due to any variety of issues. :) If it sees 3 clean pings it simply terminates. But if it gets any "request timed out" errors or the ping times are greater than 50ms, it tests further and determins if it's a slow server doing it, or if the lan might have bigger issues. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message