HP-UX Routing Services Administrator's Guide HP-UX 11i v2, HP-UX 11i v3 (B2355-91153, November 2011)
configuration file, type man 4 gated.conf at the HP-UX prompt. See “Troubleshooting gated”
(page 49) for more information on tracing options.
Specifying Route Preference
gated maintains a routing table that consists of the route information learned from OSPF and from
other active routing protocols, such as RIP or EGP. You can also configure static routes in the
/etc/gated.conf file with one or more static clauses (see “Installing Static Routes” (page 45)
for more information).
The gated routing pool can therefore contain multiple routes to a single destination. When multiple
routes exist, the route chosen by gated is determined by the following (in order of precedence):
• The preference value associated with the route. The preference value is a number in
the range from 0 (most preferred) to 255 (least preferred). Routes from different sources have
different default preference values. For example, OSPF routes within a given AS have a
preference value of 10. Table 4 shows the default preference values of various types of routes.
• If multiple routes use the same protocol and have the same preference value, the route with
the lowest metric or cost is chosen.
• If metric or cost is the same, the router with the lowest IP address is chosen.
Table 4 Default Preference Values of Routes
/etc/gated.config ConfigurationPreferenceRoute Type
Can be changed with interface statement in Interface class.0Interface routes
Cannot be changed.10OSPF inter- and intra-areas
Generated by BGP or EGP when routing information is learned
from a peer.
20Internal default
Can be changed with redirect statement in Protocol class.30ICMP Redirect
Can be changed in SNMP statement in Protocol class.50SNMP
Can be changed in static statement in Static class.60Static routes
Can be changed with import statement in Control class.100RIP
Can be changed with interface statement in Interface class.110Point-to-point interface
Can be changed with interface statement in Interface class.120“Down” interface
Can be changed in defaults statement in OSPF protocol
definition and with import statement in Control class.
150OSPF ASE
Can be changed with import statement in Control class.170BGP
Can be changed with import statement in Control class.200EGP
These are the static routes that are retained in the kernel after
gated is stopped. Preference value cannot be configured.
254Kernel remnant
You can define preference in the /etc/gated.conf file configuration file in the following
instances:
• In the static route definition in the Static class. This preference definition sets the preference
for static routes. (See “Customizing Routes” (page 44) for more information.) If this option is
not set, the preference values for static routes is 60.
• In the interface statement options in the Interface class. This preference definition sets the
preference for routes to this interface. If this option is not set, the preference value is 0. For
more information, type man 4 gated.conf at the HP-UX prompt.
46 Configuring gated