From: vfclists on

When linux as multiple gateways and multiple DNS servers, how long
does it take to switch to the other connections when the leading ones
fail?

I have had a connection which appeared not to work because one of the
gateways was unavailable.

Is there a way of configuring a time out for them to switch over?
From: David Schwartz on
On Mar 24, 9:28 am, vfclists <vfcli...(a)googlemail.com> wrote:
> When linux as multiple gateways and multiple DNS servers, how long
> does it take to switch to the other connections when the leading ones
> fail?
>
> I have had a connection which appeared not to work because one of the
> gateways was unavailable.
>
> Is there a way of configuring a time out for them to switch over?

It all depends on how it's supposed to detect the failure of the
gateway. What failover mechanism are you using?

DS
From: Rick Jones on
vfclists <vfclists(a)googlemail.com> wrote:
> When linux as multiple gateways and multiple DNS servers, how long
> does it take to switch to the other connections when the leading ones
> fail?

I think you really have two entertwined questions here.

1) when trying to reach a given IP address, how quickly, if at all,
will the routing code switch from one default route to another -
does it have "dead gateway detection" or not

and

2) when there are multiple DNS servers listed in /etc/resolv.conf, how
long before the resolver library code will attempt to contact the
next DNS server in the list (ie try to reach a different IP address)

For the latter, you might consider putting some known to be
unreachable IP address in first in your /etc/resolv.conf file and then
take a system call trace of something looking-up a name in the
DNS. Make certain the system call trace includes timestamps. I'd
suggest a tcpdump trace, but if there is indeed a switchover of
default gateways, and that includes a switchover of outbound network
interfaces you might not get the traffic.

Actually, are there multiple NICs involved, or are these gateways all
reached vie the one interface?

There may also be a manpage for resolv.conf which describes directives
which go into the file and if there is one for setting a timeout at
the DNS query level it should be there.

rick jones
--
oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
From: vfclists on
On Mar 24, 4:28 pm, vfclists <vfcli...(a)googlemail.com> wrote:
> When linux as multiple gateways and multiple DNS servers, how long
> does it take to switch to the other connections when the leading ones
> fail?
>
> I have had a connection which appeared not to work because one of the
> gateways was unavailable.
>
> Is there a way of configuring a time out for them to switch over?

I thought the process was automatic, something built into the
networking system.
I guess I have to consider again.
Are there some systems or scripts that will do this automatically?
From: Pascal Hambourg on
Hello,

Rick Jones a �crit :
>
> 1) when trying to reach a given IP address, how quickly, if at all,
> will the routing code switch from one default route to another -
> does it have "dead gateway detection" or not

If you mean the kernel routing code, AFAIK the vanilla kernel has no
built-in dead gateway detection and failover mechanism. Patches have
been released to add DGD support into the kernel, see
<http://www.ssi.bg/~ja/#routes>.