All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benbenshi <benbenshi@gmail.com>
To: linux-os@analogic.com, linux-kernel@vger.kernel.org,
	zhuangyy@xianan.com.cn
Subject: Re: route trouble with kernel
Date: Wed, 29 Jun 2005 10:17:26 +0800	[thread overview]
Message-ID: <42C204B6.1040806@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0506280942330.12415@chaos.analogic.com>

Richard B. Johnson wrote:

>
> It could be argued that if `iptables` retains its
> parameters after its only interface has been shut
> down it's a bug.
>
> The fact that no routes remain after a network
> interface has been shut down is both logical
> and in conformance with de facto Unix standards.
> This is partially as a result of route's manipulating
> flags (the UP flag would be wrong if the interface
> was down).
>
> I can't imagine that you have so many routes
> that it takes a significant amount of time to
> reset them using a script. If so, you probably
> have a configuration error where you are
> not properly using netmasks. Certainly, you
> shouldn't have to establish a host-route for
> every host on your network. You only need a
> network route (out the interface) and a
> default route that goes to some router to get
> out of your LAN. Even if you __are__ a router,
> the network setup remains about the same,
> only the user-mode software changes, which
> may dynamically alter the routing tables.
>
> On Tue, 28 Jun 2005, cigarette Chan wrote:
>
>> 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.
>
>
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips).
> Notice : All mail here is now cached for review by Dictator Bush.
> 98.36% of all statistics are fiction.
>
my host is a vpn gateway, and i have several virtual interface to run
vpn. ie tap0, tap1....
I have to add routes to these TAPs to make vpn work. but after i restart
the tapX, i have
to re-add routes relate to this interface~

If i have to maintain several vpn and lots of TAPs , So i need a simple
way to maintian route tables.
sometimes it's quite diffcult to do this with shell scipts ,especially
when it's quite complex.


thanks~

  reply	other threads:[~2005-06-29  2:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28 12:57 route trouble with kernel cigarette Chan
2005-06-28 13:45 ` Richard B. Johnson
2005-06-29  2:17   ` Benbenshi [this message]
2005-06-28 14:00 ` Valdis.Kletnieks

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=42C204B6.1040806@gmail.com \
    --to=benbenshi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=zhuangyy@xianan.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.