As of Red Hat 8.0, Red Hat has changed the way in which non-default static routes are initialized and added to the routing table on startup. Since this process is not documented, I've made a few notes here.

Traditionally, static routes were added in /etc/sysconfig/static-routes, in the form:

iface type dest-addr netmask netmask gw gateway-addr ...

such as this example, taken from a real system:

eth0 net 192.168.170.0 netmask 255.255.255.0 gw 192.168.168.1

This would cause the startup scripts to execute a command like this

route add -type dest-addr netmask netmask gw gateway-addr ... iface

Notice the ellipsis at the end of the line there - this means that other options for the route add command can be specified in static-routes, which is particularly useful for specifying metrics - something that is quite common in moderately complex intranets. Other options, such as maximum segment size, initial window size and initial round-trip time, may also be useful.

In Red Hat 8.0, attempts to add interface-specific routes in static-routes will fail. Instead, static routes must be specified as multiple variables in multiple files in /etc/sysconfig/networking/devices. For example, a static route for the eth0 device must be specified in a file called eth0.route, like this:

ADDRESS0=192.168.170.0
NETMASK0=255.255.255.0
GATEWAY0=192.168.168.1

No other variables are supported, although additional routes can be specified as ADDRESS1, NETMASK1, etc. Clearly, this means that metrics and other parameters cannot be set at this point.

Way to go, Red Hat. More complexity, with less functionality. . . Sigh . . .
Page last updated: 06/Mar/2003 Back to Home Copyright © 1987-2010 Les Bell and Associates Pty Ltd. All rights reserved. webmaster@lesbell.com.au

...........................