Operating System - HP-UX
1833750 Members
2457 Online
110063 Solutions
New Discussion

static routes: in netconf or in gated.conf?

 
SOLVED
Go to solution
Balz Mueller
Occasional Advisor

static routes: in netconf or in gated.conf?

We have to add static routes to our Systems (HP-UX11.11).

My understanding is:
- first there ist /etc/rc.ocnfig.d/netconf
Here you add static routes, configure your lancards etc.
- if you need OSPF: you activate it by setting GATED=1 in /etc/rc.ocnfig.d/netconf (and configure /etc/gated.conf correctly)

Now there are static routes in netconf and in gated.conf - which one wins?
10 REPLIES 10
Basheer_2
Trusted Contributor

Re: static routes: in netconf or in gated.conf?

I put them in netconf
James George_1
Trusted Contributor

Re: static routes: in netconf or in gated.conf?

add your routes in /etc/rc.config.d/netconf

James
forum is for techies .....heaven is for those who are born again !!
skt_skt
Honored Contributor

Re: static routes: in netconf or in gated.conf?

man gated.conf
look at the assighning prefrence for the routes. Those sounds like netconf is preferred over ospf


direct connected networks interface 0
OSPF routes ospf 10
whiteknight
Honored Contributor

Re: static routes: in netconf or in gated.conf?

Hi

it is in /etc/rc.config.d/netconf

Example:

ROUTE_DESTINATION [0]
ROUTE_GATEWAY [0]
ROUTE_MASK [0]
ROUTE_ARGS [0]
ROUTE_COUNT [0]

WK
Problem never ends, you must know how to fix it
whiteknight
Honored Contributor
Solution

Re: static routes: in netconf or in gated.conf?

Example: if you have 2 set of routes

In the netconf file, two sets of route variables need to be defined.

ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=15.1.1.1
ROUTE_ARGS[0]=
ROUTE_MASK[0]=
ROUTE_COUNT[0]=1

ROUTE_DESTINATION[1]="net 192.1.1"
ROUTE_GATEWAY[1]=15.1.1.2
ROUTE_ARGS[1]=
ROUTE_MASK[1]=255.255.255.0
ROUTE_COUNT[1]=1

WK
Problem never ends, you must know how to fix it
Balz Mueller
Occasional Advisor

Re: static routes: in netconf or in gated.conf?

right, I will not add static route in gated.conf


About the format:
If I have to add a route to a single host: is there a difference between

ROUTE_DESTINATION[1]="net 192.1.1"
...
ROUTE_MASK[1]=255.255.255.255

and

ROUTE_DESTINATION[1]="host 192.1.1"
...
ROUTE_MASK[1]=255.255.255.255
Balz Mueller
Occasional Advisor

Re: static routes: in netconf or in gated.conf?

oh, yes, as I am asking:

are the quotas needed in every line or not?
whiteknight
Honored Contributor

Re: static routes: in netconf or in gated.conf?

Balz,

Quotes not required for each line.
if you have route

only this entry will require
ROUTE_DESTINATION[1]="net 192.1.1"

WK
Problem never ends, you must know how to fix it
Balz Mueller
Occasional Advisor

Re: static routes: in netconf or in gated.conf?

Thanks, WK. - what about host/net?
whiteknight
Honored Contributor

Re: static routes: in netconf or in gated.conf?

Balz

Not required, you may want to send us the netconf file once you edited the netconf to confirm ;-)

WK
Problem never ends, you must know how to fix it