On Jul 11, 2007, at 3:11 PM, John Oliver wrote:
So... what is the correct way to keep persistent routes in Red Hat-ish Linux?
As you suspected, you do need to use /etc/sysconfig/static-routes, but the lines need to have a specific format:
any net <destnet> netmask <netmask> gw <gateway> i.e.: # route to 172.19.2.0 through my gateway any net 172.19.2.0 netmask 255.255.255.0 gw 172.19.1.254At least, that's the read I get from looking for "static-routes" in / etc/init.d/network and picking apart how /etc/sysconfig/static-routes is read. The network init script reads those lines, drops the ^any, and generates the command:
route add -net <destnet> netmask <netmask> gw <gateway>The "other" way is to create /etc/sysconfig/network-scripts/route- <iface> (where <iface> is "eth0" or something else), containing:
GATEWAY0=<gateway> ADDRESS0=<network> NETMASK0=<netmask>Increment the number postfix of the variable for additional routes. See http://kbase.redhat.com/faq/FAQ_79_2561.shtm for details on this (changed as of RHEL3).
Gregory -- Gregory K. Ruiz-Ade <[EMAIL PROTECTED]> OpenPGP Key ID: EAF4844B keyserver: pgpkeys.mit.edu
PGP.sig
Description: This is a digitally signed message part
-- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
