Setting Static Routes at Boot Time

John Stroud bear at amberorder.com
Wed Jan 21 07:24:20 UTC 2004


On Tue, 2004-01-20 at 22:51, 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.
> 
> -- 
> Paul (ganci at nurdog.com)

The files that seem to be holding static route info are in
/etc/sysconfig/networking/devices/route-<if>
and in
/etc/sysconfig/networking/profiles/<profilename>/route-<if>

<if> = interface, ie, route-eth0, route-ppp0, etc.

I believe if you edit the copy in the profiles directory, it will copy
up to the working config when the network reloads or restarts.

Here is my route file, /etc/sysconfig/networking/devices/route-eth0, but
edited in /etc/sysconfig/networking/profiles/default/route-eth0:

GATEWAY1=192.168.100.1
NETMASK1=255.255.255.255
ADDRESS1=111.111.111.111
GATEWAY0=192.168.100.1
NETMASK0=255.255.255.255
ADDRESS0=211.111.111.111

I set it up using the GUI network config script in Gnome, but afaik, if
you edit the profile copy, and reload/restart network, you'll get the
same results. 

-- 
John S.





More information about the fedora-list mailing list