[plug] Adding a permanent route on a RH5.2 box

Anthony J. Breeds-Taurima tony at cantech.net.au
Tue Mar 23 12:28:37 WST 1999


On Tue, 23 Mar 1999, Michael Hunt wrote:

> Hiya,
> 
> I have set up a DHCP server on my box at home and have added the route as
> stated in the doco for DHCP. However when I bounce the box the route is lost
> and clients don't get IP addressees. How can I make this permanent ? I
> gather that it has to go into an rc file but which one ? My distro is RedHat
> 5.2 running kernel 2.0.36  (Gotta put in that Debian box real soon !!!!)

basicaly ... you need to create a file called "/etc/sysconfig/static-routes"
this file has one route per line BUT it is in a backward format :(
Each line reads:

DEVICE <Route Args>

ie if the route command you use is 

route add -net 1.2.3.0 netmask 255.255.255.0 gw a.b.d.d metric 1 eth0

the appropriate static-routes entry is
eth0 net 1.2.3.0 netmask 255.255.255.0 gw a.b.d.d metric 1
     ^
     | Note the lack of the '-' chracter.
HTH

once you have edited the file try: 

/etc/rc.d/init.d/network retstart; route

If your route is there then you've done it right.

Yours Tony.



More information about the plug mailing list