Operating System - Linux
1832095 Members
3035 Online
110038 Solutions
New Discussion

Re: how to retain modify to routing table

 
SOLVED
Go to solution
Mauro Gatti
Valued Contributor

how to retain modify to routing table

when I start my linux box RH 7.3) I do some changes to routing table (using route add/delete command) but when i reboot my system I lost these modifies!
How could I save them permanently?
Thank You
Ubi maior, minor cessat!
2 REPLIES 2
Tony Contratto
Respected Contributor
Solution

Re: how to retain modify to routing table

Hi Mauro,

The following is taken from:
http://www.redhat.com/support/resources/howto/sysconfig.html

--
/etc/sysconfig/static-routes
Contains lines of the form:
device net network netmask netmask gw gateway

device is the device name for which to have the route brought up.
--

Tony
got root?
Magic_Wand
Advisor

Re: how to retain modify to routing table

You can also put the "route add/delete" statements in a script and place them in the /etc/rc2.d directory.

Make sure you start the script name with a capital "S" --> S999RouteAdd.

Also don't forget to chmod +x it.
================================
SELECT * FROM users WHERE clue > 0