static routes
There are several different ways to setup static routing in RedHat Linux systems. Below are three different ways to setup persistent static routes.
1)Edit the file /etc/sysconfig/network-scripts/route-<eth#> and add the following lines
GATEWAY0=<gateway address> NETMASK0=<network netmask> ADDRESS0=<network address> GATEWAY1=<gateway address> NETMASK1=<network netmask> ADDRESS1=<network address>
Example would be, file /etc/sysconfig/network-scripts/route-eth0 GATEWAY0=192.168.0.1 NETMASK0=255.240.0.0 ADDRESS0=172.16.0.0 GATEWAY1=192.168.0.1 NETMASK1=255.0.0.0 ADDRESS1=10.0.0.0
2)Edit the file /etc/sysconfig/network-scripts/route-<eth#>
<ADDRESS>/<MASK BITS> via <GATEWAY> dev <eth#>
Example would be, file /etc/sysconfig/network-scrips/route-eth0 172.16.0.0/12 via 192.168.0.1 dev eth0 10.0.0.0/8 via 192.168.0.1 dev eth0
3)Static Routes file. Edit the file /etc/sysconfig/static-routes
any net <NETWORK> netmask <NETMASK> gw <GATEWAY> <DEV>
Example would be, file /etc/sysconfig/static-routes any net 172.16.0.0 netmask 255.240.0.0 gw 192.168.0.1 eth0 any net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.1 eth0