Adding static routes
To add static routes that will be preserved after reboot, follow How do I configure static routes in Red Hat Enterprise Linux version 3?
This should work for at least RHEL 3, 4, and 5.
In this example, I want to route traffic for network 10.226.223.0/24 using the gateway 220.127.116.11.
- Add a route for the current session.
# route add -net 10.226.223.0/24 gw 18.104.22.168
- Create an /etc/sysconfig/network-scripts/route-eth0 file to preserve this static route across reboots.
GATEWAY0=22.214.171.124 NETMASK0=255.255.255.0 ADDRESS0=10.226.223.0