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~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]