mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Schewe <m@xsms.de>
To: linux-kernel@vger.kernel.org
Subject: Re: In kernel routing table vs. /sbin/ip vs. /sbin/route
Date: Sun, 6 Jan 2002 22:36:51 +0100	[thread overview]
Message-ID: <20020106223651.B31958@linux01.gwdg.de> (raw)
In-Reply-To: <Pine.LNX.4.33.0201061211050.2619-100000@tidus.zarzycki.org>
In-Reply-To: <Pine.LNX.4.33.0201061211050.2619-100000@tidus.zarzycki.org>

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

Hi,

On Sun, Jan 06, 2002 at 12:23:50PM -0800, Dave Zarzycki wrote:
> Using /sbin/route, I can add multiple default routes like so:
>
> /sbin/route add -net default gw 192.168.0.1
> /sbin/route add -net default gw 192.168.0.2
>
> But I cannot do the same with /sbin/ip:
>
> /sbin/ip route add default via 192.168.0.1
> /sbin/ip route add default via 192.168.0.2
> RTNETLINK answers: File exists

$ /sbin/ip route append default via 192.168.0.2

> Given that /sbin/ip is the more powerful and modern tool, I'm lead to
> believe that /sbin/route might be leaving the in kernel routing table
> in a weird state.
>
> My two simple questions are as follows:
>
> 1) Which tool is more correct?

RFC1122 says having several _default_ routes is okay.

> 2) What is the behavior of the kernel when multiple default routes are
> defined?

The kernel will make dead gateway detection to select the right one for
you.

Regards,
		Martin

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

      reply	other threads:[~2002-01-06 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-06 20:23 Dave Zarzycki
2002-01-06 21:36 ` Martin Schewe [this message]

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=20020106223651.B31958@linux01.gwdg.de \
    --to=m@xsms.de \
    --cc=linux-kernel@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

Powered by JetHome