I've been trying to understand what's the correct way to add a static route on a CentOS 6.x machine.
In some forums they say to create a file named route-dev_name
(for example route-eth0) with the relevant route and place it in /etc/sysconfig/network-scripts
, in some forums they say the file should be named static-routes
, in both cases I'm unable to set a static route. It seems like in some CentOS releases it works only when naming the file route-dev_name
and in some it only works when naming the file static-routes
..
Can anyone please assist me?
This is the content of my route file:
192.168.20.0/24 via 192.168.20.253 dev eth0
Thanks in advance