Persistent Routes not work and so confused!

I can’t seem to find the current correct method for adding persistent routes.

I can add the route via SSH CLI and it works. This command from the CLI works (xx are to mask the ip addresses not actually entered)
route add -net xx.xx.xx.xx netmask gw 192.168.xx.xx eth3
The server connects to our provider but when I try to make it persistent I just can’t get it to work.

Server with 3 Nic connections two for internal one to our voip provider.
Lan eth0 phones, Lan eth1 local inter-server connection, WAN (voip provider) eth3

I’ve tried following the instructions here
and also the ones here

but neither seems to work.

I’ve tried creating and adding the route to “route-eth0” and also “route-eth3” files in the “/etc/sysconfig/network-scripts/” individually with network restarts/reboots in-between but it just doesn’t work.

Some help would be GREATLY appreciate.
First question is the persistent route suppose to all be entered into “route-eth0” or into the specific interface that it’s suppose to route through, in my case eth3, or does it even make a difference?

Next what is the format for adding this route to the file since neither of the ones that I’ve found seem to work.

Any guidance would be appreciate.

Please tell us a little more about the big picture. Based on what you’ve posted so far, your default route would be through eth3 and would be capable of reaching your provider. Why do you need a static route?

I don’t know why your persistent route isn’t working, but you should see a file
that should get called during startup to add the routes.

You could run it manually
/etc/sysconfig/network-scripts/ifup-routes eth3
and see whether it adds your route. If not, find out why. If yes, find out why it is not running at startup, or why when it runs at startup the environment is different in a way that makes it fail.

If you can’t easily fix this, just add the route command to some file that runs at startup.

hi everybody,

i have exact the same problem like Angelica describes.

is there any solution for that very strange behaviour?

Does my response apply to your case? If not, explain in more detail what you have observed.

Assuming that you’re running the FreePBX Distro, your question is really an operating system question and not a FreePBX or Asterisk question.

The FreePBX distro uses a fork of CentOS. My understanding is that the fork is identical to CentOS, and was done solely to avoid restrictions that the CentOS folks added that would have prevented FreePBX from being distributed on a single ISO that included both CentOS and the rest of the products required for FreePBX to function.

For that reason, I believe that you’re far more likely to find someone who can answer that question in a forum dedicated to CentOS or RHEL than you will here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.