Adding Static routes in RHEL 5.x/RHEL 6.x

For Adding static routes in CentOS or RHEL , the ip route command comes very handy :

For example if you want to use the different network interface to reach out to some isolated network then use the ip route add command:


ip route add 192.168.74.52 via 192.168.70.1 dev eth1

You can Verify by running route -n command

Similarly, for reaching out to a different network use , as listed in example below:

ip route add 172.24.224.0/24  via 172.22.98.1 dev eth1

Advertisements