Setting Static Routes at Boot Time
Michael Kearey
mutk at iprimus.com.au
Wed Jan 21 07:21:45 UTC 2004
Paul R. Ganci wrote:
> In RH7.3 I used the file /etc/sysconfig/static-routes to setup a single
> static route I needed. It seems that this file is now ignored in Fedora.
> I did a Google search and did not come up with any entry which helped me
> identify the replacement file and its contents format. Can someone
> please point me in the direction of the proper file and its format that
> I need in order to setup my one route? Or is the proper methodology to
> use the route add command in a init script?
>
> Thanks.
>
Have a a look at /usr/share/doc/initscripts-7.42.2/sysconfig.txt, it
has documentation of how to use the initscripts.
From the sysconfig.txt file:
/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.
So, to add a route out of eth1, for network 198.168.3.0/24 create a
file /etc/sysconfig/network-scripts/route-eth1, that contains
192.168.3.0/24 dev eth1
Cheers,
Michael
More information about the fedora-list
mailing list