DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring Internet Protocol (IP) routing

gated preferences and route selection

Preference is the value gated uses to order preference of routes from one protocol or peer over another. Preference can be set in the gated configuration files in several different configuration statements. Preference can be set based on one network interface over another, from one protocol over another, or from one remote gateway over another. Preference may not be used to control the selection of routes within an ``interior gateway protocol'' (igp), this is accomplished automatically by the protocol based on metric. Preference may be used to select routes from the same ``exterior gateway protocol'' (egp) learned from different peers or autonomous systems. Each route has only one preference value associated with it, even though preference can be set at many places in the configuration file. Simply, the last or most specific preference value set for a route is the value used.

The preference value is an arbitrarily assigned value used to determine the order of routes to the same destination in a single routing database. The active route is chosen by the lowest preference value.

gated route selection criteria

gated uses the following to select a best route:

Assigning preferences in gated

A default preference is assigned to each source from which gated receives routes. Preference values range from 0 to 255 with the lowest number indicating the most preferred route.

``Default preferences set by gated'', summarizes the default preference values for routes learned in various ways. The table lists the statements (some of these are clauses within statements) that set the preference and shows the types of routes to which each statement applies. The default preference for each type of route is listed. Comparison of default preferences in the table shows preference precedence between protocols. The narrower the scope of the statement, the higher precedence its preference value is given, but the smaller the set of routes it affects.

Default preferences set by gated

Preference of Defined by statement Default
directly connected networks interface 0
OSPF routes ospf 10
internally generated default gendefault 20
redirects redirect 30
static routes from config static 60
RIP routes rip 100
point-to-point interface   110
routes to interfaces that are down interfaces 120
OSPF AS external routes ospf 150
BGP routes bgp 170
EGP egp 200

Following are some sample preference specifications.

   interfaces {
           interface 138.66.12.2 preference 10 ;
   } ;
   rip yes {
       preference 90 ;
   } ;
   import proto rip gateway 138.66.12.1 preference 75 ;
In these statements, the preference applicable to routes learned via RIP from gateway 138.66.12.1 is 75. The last preference applicable to routes learned via RIP from gateway 138.66.12.1 is defined in the accept statement. The preference applicable to other RIP routes is found in the rip statement. The preference set on the interface statement applies only to the route to that interface.
Next topic: gated directive statements
Previous topic: Statements of the gated configuration file

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003