Operating System - HP-UX
1827066 Members
4161 Online
109713 Solutions
New Discussion

Making a static route permanent

 
SOLVED
Go to solution
Derek Brown
Frequent Advisor

Making a static route permanent

Hi... can anyone help on this one please.

I uccessfully created a static route for an interface card on a server using :

# route add -host 10.141.90.7 10.221.54.5 0

but it disappeared at some point... maybe after a reboot.

Is there a startup file where this information can be entered so it is there permanently ?

Many thanks
6 REPLIES 6
Geoff Wild
Honored Contributor

Re: Making a static route permanent

/etc/rc.config.d/netconf

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rick Garland
Honored Contributor

Re: Making a static route permanent

In the /etc/rc.config.d/netconf file.

Following the same syntax/config setup as the config for the LAN with subscript [0] but increment the subscript.
A. Clay Stephenson
Acclaimed Contributor

Re: Making a static route permanent

Edit /etc/rc.config.d/netconf.

There will almost certainly be a section that looks something like this for the default route.

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=10.1.0.1
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

duplicate these lines and create
ROUTE_DESTINATION[N],ROUTE_MASK[N],...ROUTE_ARGS[N] entries where N is the next available value.
If it ain't broke, I can fix that.
Sandman!
Honored Contributor
Solution

Re: Making a static route permanent

Derek,

After adding the route at the command line, edit the /etc/rc.config.d/netconf file to make them permanent. vi /etc/rc.config.d/netconf and modify the following variables:

ROUTE_DESTINATION
ROUTE_MASK
ROUTE_GATEWAY
ROUTE_COUNT
ROUTE_ARGS

cheers!
Raj D.
Honored Contributor

Re: Making a static route permanent

Hi Derek,

Check /etc/rc.config.d/netconf for the permanenet route entries..like this

ROUTE_DESTINATION[1]="net 109.15.228.64"
ROUTE_MASK[1]=255.255.255.192
ROUTE_GATEWAY[1]=229.31.39.3
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Derek Brown
Frequent Advisor

Re: Making a static route permanent

thanks.. excellent replies