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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s