I am adding this line to add a route
Route add –net 0.0.0.0 netmask 0.0.0.0 gw 188.8.131.52
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
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