Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the proper way to add a static route in Centos 5 that will persist rebooting?

I tired adding an route-eth0 file in /etc/sysconfig/network-scripts that contains a route , but after ./etc/init.d/network restart that route is not present and there were no errors during the restart of the service.

share|improve this question
what does route-eth0 look like? – Mike Jul 11 '11 at 16:26
What did you put in route-eth0? – Massimo Jul 11 '11 at 16:26
There are many version of Centos 5.....Is this a problem in Centos 5.6? – mdpc Jul 11 '11 at 16:47
up vote 4 down vote accepted

That's indeed the right place to add it (if the route is actually reachable via eth0), as documented here:

share|improve this answer
Wrong interface, so the destination gateway was not reachable via that interface. – Kyle Brandt Jul 11 '11 at 16:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.