GateD should assign preferences to all incoming routes; if there is no
more-specific information in the configuration file, a set of
compiled-in default preferences are used so that there is a
"preference of last resort"--all routes accepted by import
policy should have a preference value assigned, but the proper assignment
of preferences is up to the protocol coder, as of the time of this writing.
(There is more information about
preferences in GateD available.)
The GateD distribution includes a set of default preference values
which are available to routing protocol programmers for use; as of this
writing, not all of the values listed below are actually used in the
code (as symbols; the values themselves #define'd symbols which are not found in any
of the source files). Currently, the default preferences are found in the rt_table.h
file of the GateD distribution; as of this writing, the default preferences
are:
/*
* Preferences of the various route types
*/
#define RTPREF_KERNEL_TEMP 0 /* For managing the forwarding table */
#define RTPREF_DIRECT 0 /* Routes to interfaces */
#define RTPREF_OSPF 10 /* OSPF Internal route */
#define RTPREF_ISIS_L1 15 /* IS-IS level 1 route */
#define RTPREF_ISIS_L2 18 /* IS-IS level 2 route */
#define RTPREF_SLSP 19 /* NSFnet backbone SPF */
#define RTPREF_DEFAULT 20 /* defaultgateway and EGP default */
#define RTPREF_REDIRECT 30 /* redirects */
#define RTPREF_KERNEL 40 /* learned via route socket */
#define RTPREF_SNMP 50 /* route installed by network management */
#define RTPREF_STATIC 60 /* Static routes */
#define RTPREF_IGRP 80 /* Cisco IGRP */
#define RTPREF_HELLO 90 /* DCN Hello */
#define RTPREF_RIP 100 /* Berkeley RIP */
#define RTPREF_DIRECT_AGGREGATE 110 /* P2P interface aggregate routes */
#define RTPREF_DIRECT_DOWN 120 /* Routes to interfaces that are down */
#define RTPREF_AGGREGATE 130 /* Aggregate default preference */
#define RTPREF_OSPF_ASE 150 /* OSPF External route */
#define RTPREF_IDPR 160 /* InterDomain Policy Routing */
#define RTPREF_BGP_EXT 170 /* Border Gateway Protocol - external peer */
#define RTPREF_IDRP_INT 180 /* IDRP - internal peer */
#define RTPREF_IDRP_EXT 190 /* IDRP - external peer */
#define RTPREF_EGP 200 /* Exterior Gateway Protocol */
#define RTPREF_KERNEL_REMNANT 254 /* Routes in kernel at startup */
What do the above numbers mean? In viewing them, and referring to this explanation of GateD preferences, it is clear that, since GateD uses lower preference values to indicate more desirable or better routes, the default preferences express the following ideas about routing:
gated process--routes which are, therefore,
prior to any new information
learned via the routing protocols which GateD will start up and prior to the routing
policies described in the GateD configuration file--are the worst possible routes.
#define routes" of routing, for those familiar
with the C programming language--are better routes than those learned via an EGP.
direct <\ IGP/Static <\ Aggregate <\ EGP <\ "leftovers"
direct > IGP/Static > Aggregate > EGP > "leftovers"