From: Benbenshi <benbenshi@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re:Re: route trouble with kernel
Date: Wed, 29 Jun 2005 09:27:57 +0800 [thread overview]
Message-ID: <42C1F91D.4060609@gmail.com> (raw)
Valdis.Kletnieks@vt.edu wrote:
>>On Tue, 28 Jun 2005 20:57:04 +0800, cigarette Chan said:
>>
>>
>
>
>>>>i add a route to the kernel
>>>>eg: # route add -net XXX.XXX.XXX.XXX/24 gw XXX.XXX.XXX.XXX dev eth1
>>>>
>>>>but after i restart eth1
>>>>
>>>>#ifdown eth1
>>>>#ifup eth1
>>>>
>>>>the route disappear,this make me a lot of troubles.i have several
>>>>interfaces,and i have to
>>>>re-add all of these routes...
>>>>
>>>>Is there any way or patches to make route work like iptables,after i
>>>>restart the interface,
>>>>rules are still there.
>>>>
>>>>
>>
>>
>>
>>Your system should have a way of doing this in a callout during the ifup
>>and ifdown scripts. Under Fedora, ifup calls ifup-post, which calls
>>/sbin/ifup-local - you could add your routes there.
>>
>>
>>
>
>
nerver used Fedora before. On my Debian sarge, ifup will call
/etc/network/interfaces,
which looks like follow:
################################
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.10.200
netmask 255.255.255.0
broadcast 192.168.10.255
network 192.168.10.0
gateway 192.168.10.1
###############################
with this script,ifup know how to add default gateway to the route
table. Is that your mean ?
>>More importantly, routes are different from iptables. At worst, an iptable
>>rule has a dangling '-i ethX' match that will fail if the interface is down,
>>but that's a harmless because the packet isn't from that interface.
>>
>>On the other hand, what is the kernel supposed to do with a route that
>>points to a down'ed ethX after you've done the ifdown, but before you've
>>done the ifup? It may as well clear routes to the down'ed interface....
>>
>>
>
>
If ethX was down, can kernel just drop the packages to ethX ? Is there
anything wrong with kernel to work like this ?
Thanks for your great reply.
reply other threads:[~2005-06-29 1:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=42C1F91D.4060609@gmail.com \
--to=benbenshi@gmail.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