<html> <!-- Public Release 3 $Id: pref.html,v 1.2 1997/07/17 22:40:07 chopps Exp $ ------------------------------------------------------------------------ Copyright (c) 1996, 1997 The Regents of the University of Michigan All Rights Reserved Royalty-free licenses to redistribute GateD Release 3 in whole or in part may be obtained by writing to: Merit GateDaemon Project 4251 Plymouth Road, Suite C Ann Arbor, MI 48105 THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF THE UNIVERSITY OF MICHIGAN AND MERIT DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR THAT OPERATION WILL BE UNINTERRUPTED OR ERROR FREE. The Regents of the University of Michigan and Merit shall not be liable for any special, indirect, incidental or consequential damages with respect to any claim by Licensee or any third party arising from use of the software. GateDaemon was originated and developed through release 3.0 by Cornell University and its collaborators. Please forward bug fixes, enhancements and questions to the gated mailing list: gated-people@gated.merit.edu. ------------------------------------------------------------------------ Copyright (c) 1990,1991,1992,1993,1994,1995 by Cornell University. All rights reserved. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. GateD is based on Kirton's EGP, UC Berkeley's routing daemon (routed), and DCN's HELLO routing Protocol. Development of GateD has been supported in part by the National Science Foundation. ------------------------------------------------------------------------ Portions of this software may fall under the following copyrights: Copyright (c) 1988 Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the University of California, Berkeley. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. --> <head> <TITLE>GateD Configuration Guide - Preference</TITLE> </head> <body> <H1>Preference</H1> <P>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 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 <STRONG>igp</STRONG>, this is accomplished automatically by the protocol based on metric. Preference may be used to select routes from the same <STRONG>egp</STRONG> 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. (See <A HREF="glossary.html#preference">Glossary: Preference</A>.) 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. Some protocols implement a second preference (preference2), sometimes refered to as a tie-breaker. <H3>Selecting a route</H3> <P><UL> <LI> The route with the best (numerically smallest) preference is prefered. <LI> If the two routes have the same preference, the route with the best (numerically smallest) preference2 (also known as a tie-breaker) is prefered. <LI> A route learned from a <STRONG>igp</STRONG> is prefered to a route learned from an <STRONG>egp</STRONG>. Least prefered is a route learned indirectly by an <strong>igp</strong> from an <strong>egp</strong>. <LI> If AS path information is available it is used to help determine the most prefered route. <UL> <LI> A route with an AS path is prefered over one without and AS path <LI> If the AS paths and origins are identical, the route with the lower metric is prefered. <LI> A route with an AS path origin of <STRONG>igp</STRONG> is prefered over a route with an AS path origin of <STRONG>egp</STRONG>. Least prefered is an AS path with an <STRONG>unknown</STRONG> origin. <LI> A route with a shorter AS path is prefered. </UL> <LI> If both routes are from the same protocol and AS, the one with the lowest metric is prefered. <LI> The route with the lowest numeric next-hop address is used. </UL> <H3>Assigning preferences</H3> <P> 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. <P> The following table 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 preference, and shows the types of routes to which each statement applies. The default preference for each type of route is listed, and the table notes 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. <P><PRE> <STRONG>Preference Of</STRONG> <STRONG>Defined by Statement</STRONG> <STRONG>Default</STRONG> direct connnected networks interface 0 OSPF routes ospf 10 IS-IS level 1 routes isis level 1 15 IS-IS level 2 routes isis level 2 18 internally generated default gendefault 20 redirects redirect 30 routes learned via route socket kernel 40 static routes from config static 60 ANS SPF (SLSP) routes slsp 70 HELLO routes hello 90 RIP routes rip 100 point-to-point interface 110 routes to interfaces that are down interfaces 120 aggregate/generate routes aggregate/generate 130 OSPF AS external routes ospf 150 BGP routes bgp 170 EGP egp 200 </PRE> <HR> <H2>Sample Preference Specifications</H2> <PRE> interfaces { interface 138.66.12.2 preference 10 ; } ; rip yes { preference 90 ; } ; import proto rip gateway 138.66.12.1 preference 75 ; </PRE> <P>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 128.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. <hr> Last updated 1994/03/16 21:38:35. <p><ADDRESS>gated@gated.cornell.edu</ADDRESS> </body> </html>