Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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:

http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-networkscripts-static-routes.html

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

Your Answer

 
discard

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.