Re: Centos 6 - Persistant static routes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, 12 Mar 2015 12:43:27 -0500, Robert Moskowitz <rgm@xxxxxxxxxxxxxxx> wrote:

I know how to use 'ip' to set up a static route, e.g.:

ip route add 192.168.128.0/17 via 40.53.24.3 dev eth0

But if you reboot or restart network, you loose this. Thus you have to make it persistant. I found:

http://www.cyberciti.biz/tips/configuring-static-routes-in-debian-or-red-hat-linux-systems.html

where it says to add to ifcfg-eth0:

192.168.128.0/17 via 40.53.24.3


Create the file /etc/sysconfig/network-scripts/route-eth0

Add the following for each static route, incrementing the numeric for each:

ADDRESS0=192.168.128.0
NETMASK0=255.255.128.0
GATEWAY0=40.53.24.3

But this did not work after the interface was restarted. So what is the proper to set up persistant static routes?


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux