home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeTCP/IP Network AdministrationSearch this book

7.6. Gateway Routing Daemon

Routing software development for general-purpose Unix systems is limited. Most sites use Unix systems only for simple routing tasks for which RIP is usually adequate. Large and complex routing applications, which require advanced routing protocols, are handled by dedicated router hardware that is optimized specifically for routing. Many of the advanced routing protocols are only available for Unix systems in gated. gated combines several different routing protocols in a single software package.

Additionally, gated provides other features that are usually associated only with dedicated routers:

  • Systems can run more than one routing protocol. gated combines the routing information learned from different protocols and selects the "best" routes.

  • Routes learned through an interior routing protocol can be announced via an exterior routing protocol, which allows the reachability information announced externally to adjust dynamically to changing interior routes.

  • Routing policies can be implemented to control what routes are accepted and what routes are advertised.

  • All protocols are configured from a single file (/etc/gated.conf) using a single consistent syntax for the configuration commands.

  • gated is constantly being upgraded. Using gated ensures that you're running the most up-to-date routing software.

7.6.1. gated's Preference Value

There are two sides to every routing protocol implementation. One side, the external side, exchanges routing information with remote systems. The other side, the internal side, uses the information received from the remote systems to update the routing table. For example, when OSPF exchanges Hello packets to discover a neighbor, it is an external protocol function. When OSPF adds a route to the routing table, it is an internal function.

The external protocol functions implemented in gated are the same as those in other implementations of the protocols. However, the internal side of gated is unique for Unix systems. Internally, gated processes routing information from different routing protocols, each of which has its own metric for determining the best route, and combines that information to update the routing table. Before gated was written, if a Unix system ran multiple routing protocols, each would write routes into the routing table without knowledge of the others' actions. The route found in the table was the last one written -- not necessarily the best route.

With multiple routing protocols and multiple network interfaces, it is possible for a system to receive routes to the same destination from different protocols. gated compares these routes and attempts to select the best one. However, the metrics used by different protocols are not directly comparable. Each routing protocol has its own metric. It might be a hop count, the delay on the route, or an arbitrary value set by the administrator. gated needs more than that protocol's metric to select the best route. It uses its own value to prefer routes from one protocol or interface over another. This value is called preference.

Preference values help gated combine routing information from several different sources into a single routing table. Table 7-1 lists the sources from which gated receives routes and the default preference given to each source. Preference values range from 0 to 255, with the lowest number indicating the most preferred route. From this table you can see that gated prefers a route learned from OSPF over the same route learned from BGP.

Table 7-1. Default preference values

Route type

Default preference

direct route

0

OSPF

10

IS-IS Level 1

15

IS-IS Level 2

18

Internally generated default

20

ICMP redirect

30

Routes learned from the route socket

40

static route

60

SLSP routes

70

RIP

100

Point-to-Point interface routes

110

Routes through a downed interface

120

Aggregate and generate routes

130

OSPF ASE routes

150

BGP

170

EGP

200

Preference can be set in several different configuration statements. It can be used to prefer routes from one network interface over another, from one protocol over another, or from one remote gateway over another. Preference values are not transmitted or modified by the protocols. Preference is used only in the configuration file. In the next section we'll look at the gated configuration file (/etc/gated.conf) and the configuration commands it contains.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.