1828471 Members
2903 Online
109978 Solutions
New Discussion

Permanent route on linux

 
SOLVED
Go to solution
Sigurður Hannesson
Frequent Advisor

Permanent route on linux

Which file should I edit in the purpose of saving routes permanently?
OS: Red Hat Enterprise Linux ES release 3 (Taroon Update 5)
Kernel: 2.4.21-32.ELsmp
4 REPLIES 4
Ivan Ferreira
Honored Contributor

Re: Permanent route on linux

Hi, the file is in /etc/sysconfig/network-scripts, see:


http://www.akadia.com/services/redhat_static_routes.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Permanent route on linux

Shalom,

You can add GATEWAY commands to each entry in /etc/sysconfig/network-scripts/ifcfg- files.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Court Campbell
Honored Contributor
Solution

Re: Permanent route on linux

you could either create a route file for each interface, e.g.,

/etc/sysconfig/network-scripts/route-eth0

and put entries in it like this in the file:

192.168.0.0/24 via 10.10.50.1

or you can add route add commands to /etc/rc.local.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: Permanent route on linux

If you assign me at least 2 points, you will see my hat magically change.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"