[WBEL-users] Persistent Routes
Kirby Bohling
kbohling@birddog.com
Fri, 11 Jun 2004 14:32:46 -0500
On Fri, Jun 11, 2004 at 02:51:55PM -0400, Jesús García González wrote:
> Hello,
>
>
>
> Is adding a route command line in /etc/rc.local the only way to make a
> route persistent through boots?
In older versions of RedHat there was a way to do this via:
/etc/sysconfig/static-routes.
Reading the whitebox scripts, it looks like this the script you need
to read:
/etc/sysconfig/networking-scripts/ifup-routes
It looks like in /etc/sysconfig/networking-scripts/route-eth0 is
roughly the name you want (it looks like you can use either the
interface name you'd use for ifup, or the "nickname", which I've
never come across before).
Googling came up with thread from this mailing list from Nov 2003:
http://beau.org/pipermail/whitebox-devel/2003-November/000019.html
http://beau.org/pipermail/whitebox-devel/2003-November/000020.html
I'm sure the RHEL documentation has good information on this.
Here's the best information I can glean from RHEL doc's in the 2
minutes I skimmed them for:
https://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/ref-guide/ch-networkscripts.html
https://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/ref-guide/s1-networkscripts-resources.html
The last link basically says that you should read:
/usr/share/doc/initscripts-<version>/sysconfig.txt
/usr/share/doc/iproute-<version>/ip-cref.ps
If you read the first file the best documentation is this snippit:
--- Start Here ---
/etc/sysconfig/network-scripts/route-<interface-name>
Contains lines that are arguments to "/sbin/ip route add"
For example:
192.168.2.0/24 dev ppp0
adds a network route to the 192.168.2.0 network through ppp0.
--- Stop Here ---
Thanks,
Kirby