HPlogo Installing and Administering Internet Services: HP 9000 Networking > Chapter 8 Configuring gated

Specifying Route Preference

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

gated maintains a routing table that consists of 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”.)

The gated routing pool can therefore contain multiple routes to a single destination. Where multiple routes exist, the route chosen by gated is determined by the following (in order of precedence):

  1. 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 8-4 “Default Preference Values of Routes” shows the default preference values of various types of routes.

  2. If multiple routes use the same protocol and have the same preference value, the route with the lowest metric/cost is chosen.

  3. If metric/cost is the same, the router with the lowest IP address is chosen.

Table 8-4 Default Preference Values of Routes

Route Type

Preference

/etc/gated.config Configuration

Interface routes

0

Can be changed with interface statement in Interface class.

OSPF inter- and intra-areas

10

Cannot be changed.

Internal default

20

Generated by BGP or EGP when routing information is learned from a peer.

ICMP Redirect

30

Can be changed with redirect statement in Protocol class.

SNMP

50

Can be changed in SNMP statement in Protocol class.

Static Routes

60

Can be changed in static statement in Static class.

RIP

100

Can be changed with import statement in Control class.

Point-to-point interface

110

Can be changed with interface statement in Interface class.

"Down" interface

120

Can be changed with interface statement in Interface class.

OSPF ASE

150

Can be changed in defaults statement in OSPF protocol definition and with import statement in Control class.

BGP

170

Can be changed with import statement in Control class.

EGP

200

Can be changed with import statement in Control class.

Kernel remnant

254

These are static routes that have been retained in the kernel after gated is stopped. Preference value cannot be configured.

 

There are several places in the /etc/gated.conf file where preference can be defined:

  • In the static route definition in the Static class. This preference definition sets the preference for static routes. (See “Customizing Routes”.) If this option is not set, the preference values for static routes is 60.

  • In interface statement options in the Interface class. This preference definition sets the preference for routes to this interface. (Type man 4 gated.conf at the HP-UX prompt.) If this option is not set, the preference value is 0.

  • In a defaults statement in the OSPF protocol configuration. This preference definition specifies the preference value of ASE routes that are imported into OSPF. See “AS External Routes (AS Boundary Routers Only)”. ASE routes are imported into OSPF with a default preference of 150.

  • In an import statement in the Control class of the /etc/gated.conf file. This preference definition overrides any preference defined in the defaults section of the OSPF protocol configuration. See “AS External Routes (AS Boundary Routers Only)” and “Importing and Exporting Routes”.

© 2000 Hewlett-Packard Development Company, L.P.