public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jose Luis Domingo Lopez <linux-kernel@24x7linux.com>
To: linux-kernel@vger.kernel.org
Subject: Re: route reload after interface restart
Date: Fri, 1 Jul 2005 10:24:47 +0200	[thread overview]
Message-ID: <20050701082447.GB4859@localhost> (raw)
In-Reply-To: <42C4C964.2090200@gmail.com>

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

On Friday, 01 July 2005, at 12:41:08 +0800,
Benbenshi wrote:

> i have done an experiment as follow:
> 
> 1. default route was add to eth0
> 2.ifconfig eth0 down
> 3.ifconfig eth0 192.168.10.57 netmask 255.255.255.0 up
> 
> no default route was re-added to kernel, failed!
> 
And how the kernel is supposed to know what your desired default gateway is?

When you bring a network interface down, it wipes every route using that
interface. If you then bring the interface up again, and give it an IP and
network mask, there will be no more added routing information but the
route to the network where the interface is directly connected.

What you need is not the way the kernel works. Think about, for example, a
dial-up network interface with frequent IP changes. Suddenly the link goes
down, it makes the call, and gets a differente IP/mask _and_ default route
to the Internet. If the kernel somewhat remembered the previous default
route, if wouldn't work.

So, to make the default route persistent, script the thing.

Greetings,

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.13-rc1)


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

      reply	other threads:[~2005-07-01  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 11:13 route reload after interface restart chengq
     [not found] ` <200506301418.04419.vda@ilport.com.ua>
2005-06-30 14:11   ` chengq
2005-07-01  0:47     ` Patrick McHardy
2005-07-01  0:57       ` Benbenshi
     [not found]         ` <42C498ED.4050400@trash.net>
2005-07-01  4:41           ` Benbenshi
2005-07-01  8:24             ` Jose Luis Domingo Lopez [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=20050701082447.GB4859@localhost \
    --to=linux-kernel@24x7linux.com \
    --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