From owner-freebsd-questions@FreeBSD.ORG Wed Dec 7 12:11:12 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D9FE106566B for ; Wed, 7 Dec 2011 12:11:12 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1383A8FC14 for ; Wed, 7 Dec 2011 12:11:11 +0000 (UTC) Received: by lagv3 with SMTP id v3so243065lag.13 for ; Wed, 07 Dec 2011 04:11:10 -0800 (PST) Received: by 10.152.102.173 with SMTP id fp13mr11758223lab.24.1323259870634; Wed, 07 Dec 2011 04:11:10 -0800 (PST) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id ne3sm1440218lab.7.2011.12.07.04.11.08 (version=SSLv3 cipher=OTHER); Wed, 07 Dec 2011 04:11:09 -0800 (PST) Message-ID: <4EDF57DB.2010108@my.gd> Date: Wed, 07 Dec 2011 13:11:07 +0100 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: Switching default gateways X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2011 12:11:12 -0000 On 12/7/11 9:20 AM, Ross wrote: > I have a host with two uplinks. One is the default gateway. I want the > system to automatically switch to the other one if it detects problems > with the first one. How do I do this? Hello to you too, First of all, please realize this isn't a google search field, you're talking to actual humans and you might want to start off with a proper greeting. With regards to your question, this can be done in 2 different ways: 1/ script Ping your primary gateway, if it stops responding your script changes the gateway to your backup. When the primary comes back up, swap again. Easily done. 2/ routing protocols Get your 2 upstream routers to announce themselves via a routing protocol, only works if you have control of said gateways.