[CentOS] Is there a way to save the routing table permanently?

Fri Aug 22 18:50:09 UTC 2008
Florin Andrei <florin at andrei.myip.org>

Les Mikesell wrote:
> Florin Andrei wrote:
>> It would be very nice if the init.d script would allow the sysadmin to 
>> do something like "service network saveroutes". I always thought that 
>> would be a neat feature.
> Routes only work when you can reach the next hop.  That is,  if you try 
> to add a route through an interface that is not up, the command will 
> fail and the route will not be added.  If you want a route to be added 
> when an interface comes up, there is already a place to do that. 
> However, as others have pointed out you shouldn't expect multiple 
> concurrent default routes to do something useful - but if you have 
> multiple interfaces you can configure them both to add default routes 
> and bring only one up at a time.

I wasn't thinking that far. I was just considering the fairly common 
situation when you add a few static routes manually, to fix routing 
problems, and you realize that's the configuration you want to keep. And 
then it would be nice if the init.d script would just freeze the current 
static routes for you.

Florin Andrei