You are here

Adding static routes to CENTOS

Let's say the interface is eth0, you would create file perhaps using nano like this:

nano /etc/sysconfig/network-scripts/route-eth0

Then add your network/subnet and the gateway/router (example):

10.0.1.0/24 via 10.10.10.1

where 10.10.10.1 is the router and the 10.0.1.0/24 is the network/subnet

Then restart the network using
service network restart

Good luck!