netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: daviseago@gmail.com
Cc: netdev@vger.kernel.org, netfilter@vger.kernel.org
Subject: Re: Which one is chosen on multiple default gateway set?
Date: Wed, 22 Aug 2012 23:38:08 -0700 (PDT)	[thread overview]
Message-ID: <20120822.233808.1184757734447108096.davem@davemloft.net> (raw)
In-Reply-To: <CAJPS4yY7sqqsOfhiouqjmfuW3Kof-ZzHEBs9E1+QoYYce01U4Q@mail.gmail.com>

From: Wei Huang <daviseago@gmail.com>
Date: Thu, 23 Aug 2012 14:31:26 +0800

> If multiple default gateways are set, which one will be chosen? And if
> the chosen one is down, will others take over?

Yes.

> It works sometime, but not most of the time. (example below) The
> behavior is inconsistent.

The problem is that when a nexthop becomes unresponsive we need
to wait for an event to timeout the routing cache entry.

In 3.6.0-rc1 and later, this inconsistent behavior will happen less
often, because the routing cache has been removed so we will do the
full default route resolution on every route lookup.  The only problem
at that point is socket cached routes, those will still need to wait
for a timeout before the next default gateway will be tried.

  reply	other threads:[~2012-08-23  6:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23  6:31 Which one is chosen on multiple default gateway set? Wei Huang
2012-08-23  6:38 ` David Miller [this message]
2012-08-23  7:30   ` Wei Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120822.233808.1184757734447108096.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=daviseago@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).