Technical data

Gateway Routing Daemon (GATED) Configuration Reference
A.6 Defining Preferences and Routing
May select routes from the same exterior gateway protocol (EGP) learned
from different peers or autonomous systems.
The GATED daemon selects a route based on the following preference criteria:
The route with the best (numerically smallest) preference is selected.
If the two routes have the same preference, the route with the best
(numerically smallest)
preference2
is selected.
A route from an IGP is selected over a route from an EGP. The least preferred
is a route learned indirectly by an IGP from an EGP.
If autonomous system (AS) path information is available, it is used to help
determine the most preferred route as follows:
A route with an AS path is selected over one without an AS path.
If the AS paths and origins are identical, the route with the lower metric
is selected.
A route with an AS path origin of IGP is preferred over a route with
an AS path origin of EGP. The least preferred is an AS path with an
unknown origin.
A route with a shorter AS path is preferred.
If both routes are from the same protocol and AS, the one with the lowest
metric is selected.
The route with the lowest numeric next-hop address is used.
A.6.1 Assigning Preferences
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.
Table A–2 lists each type of route, the statement (or clause within statements)
that sets preference for the route, and the default preference for each type of
route.
Note that a statement that is narrow in scope has a higher precedence given to
its preference value, but affects a smaller set of routes.
Table A–2 Default Preference Values
Preference Defined by Statement Default
Direct connected networks interface 0
OSPF routes ospf 10
Internally generated default gendefault 20
Redirects redirect 30
Routes learned through route socket kernel 40
Static routes from config static 60
ANS SPF (SLSP) routes slsp 70
HELLO routes hello 90
(continued on next page)
Gateway Routing Daemon (GATED) Configuration Reference A–5