Installing and Administering Internet Services
374 Chapter8
Configuring gated
Specifying Route Preference
Specifying Route Preference
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” on page
370.)
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 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.