0

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.

Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448

1 Answers1

4

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

Massimo
  • 70,200
  • 57
  • 200
  • 323