making a route sticky

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



Am Fr, den 05.08.2005 schrieb Aleksandar Milivojevic um 17:06:

> Is it possible to have a route stick in the kernel, even if device it points to
> goes to roller coaster up and down drive.
> 
> For example.  I have an ADSL modem and am doing VPN over it.  There's a route
> needed for VPN added like this:
> 
> ip route add 192.168.1.0/24 via 1.2.3.4 src 192.168.2.1
> 
> There are two problems with it:
> 
> a) if ADSL link is down when above command is executed, the route command will
> fail (ppp0 is down, so there's no 1.2.3.4)
> 
> b) if ADSL link is up when above command is executed, but it goes down (and up
> again) later, the route is removed from kernel routing tables
> 
> So, if there are any problems with ADSL link, I need to manually reset my VPN

> Aleksandar Milivojevic

The network scripts are prepared for this. Create a file called
/etc/sysconfig/network-scripts/route-<devicename> with content
"192.168.1.0/24 via 1.2.3.4 src 192.168.2.1" (the ip route add is
executed by the network script automatically). You can read about that
in /usr/share/doc/initscripts*/sysconfig.txt.

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp 
Serendipity 17:27:11 up 15:30, 19 users, 0.10, 0.08, 0.06 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.centos.org/pipermail/centos/attachments/20050805/51c6b55c/attachment.bin

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux