Re: route reload after interface restart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: Digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux