1

I am adding this line to add a route Route add –net 0.0.0.0 netmask 0.0.0.0 gw 95.98.108.14

However, when I restart the machine, the route is gone and I had to insert it again.

How can I make it persistent. I am on Red Hat 6.5 Santiago

2

You can just add your comman to be executed on the startup of the machine , or make your route persistant, in order to do that your need to edit /etc/sysconfig/network-scripts/route-eth0 file to define static routes for eth0 interface. This configuration will be persistent even after the system is rebooted.

 example:
 # route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.1 dev eth0

 will be:

 GATEWAY0=192.168.10.1 
 NETMASK0=255.255.255.0 
 ADDRESS0=192.168.100.0

 GATEWAY1=10.64.34.1 
 NETMASK1= 255.255.255.240 
 ADDRESS1=10.64.34.10

 # service network restart

more info here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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