Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Dec 2011 13:11:07 +0100
From:      Damien Fleuriot <ml@my.gd>
To:        freebsd-questions@freebsd.org
Subject:   Re: Switching default gateways
Message-ID:  <4EDF57DB.2010108@my.gd>
In-Reply-To: <CANmv3=yMu9Q9J6LK6uJBBOZDCBFN6NeZHE5-SO2w=UNiKSoQGQ@mail.gmail.com>
References:  <CANmv3=yMu9Q9J6LK6uJBBOZDCBFN6NeZHE5-SO2w=UNiKSoQGQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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.



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