Chapter 9. Dynamic Routing Protocols—Interior Gateway Protocols
This chapter forms the heart of this book and represents my original impulse to write about UNIX routing.
It is almost impossible to tame and reliably operate rapidly changing environments and topologies solely with the use of static routes. This especially is an issue in Internet service provider (ISP) networks with large numbers of dynamically created routes via PPP-connections from dial or Digital Subscriber Line (DSL) customers. However, the main purpose of dynamic routing is providing high availability in case of node or link failures. Dynamic routing protocols were designed to adapt to topology changes and distribute routing information within an autonomous system, based on an underlying algorithm.
This chapter discusses the two families of Interior Gateway Routing Protocols (IGRPs) and provides extensive lab scenarios using Routing Information Protocol (RIP), Open Shortest Path First (OSPF), and a quick introduction to Intermediate System-to-Intermediate System (IS-IS), which most likely is rather exotic or even alien to UNIX and even some network folks. Based on the insight of the previous chapter, this chapter extends the view to how dynamic routing protocols populate the kernel routing table and takes a closer look at making proper choices for deployment based on essential characteristics of these protocols as well as service and topology requirements. This chapter also introduces the concept of areas—virtual segmentations of network realms—a specialty of link-state routing protocols. Special topics such as route exports and redistribution, Equal-Cost Multi-Path (ECMP) issues, and traffic-engineering extensions conclude the chapter.
Interaction with the UNIX Routing Table
As mentioned in Chapter 8, "Static Routing Concepts," dynamic routing protocol implementations use administrative distance (preference) for internal comparison and weighting. Based on these criteria, the UNIX Forwarding Information Base (FIB) is populated with the result of the internal comparison. The UNIX FIB has no knowledge of administrative distances; only metrics are relevant for forwarding table lookups. Depending on the configuration, these routes are removed or retained after shutdown of the routing daemon(s). From this point of view, the kernel interface resembles a routing protocol by itself and is treated similarly, especially during system startup and redistribution of kernel routes.
Classification of Dynamic Routing Protocols
Dynamic routing protocols are based on an algorithm, such as Bellman-Ford-Fulkerson, Dijkstra SPF (Shortest Path First), or the Enhanced Interior Gateway Routing Protocol (EIGRP) DUAL (Diffuse Update Algorithm). Based on these algorithms, dynamic IGPs can be classified in link-state and distance-vector protocols.
NOTE
The Border Gateway Protocol (BGP) discussed in the next chapter represents a path-vector protocol essentially based on a distance-vector approach as well.
The main task of these protocols is path determination and calculation. With multiple paths to a destination prefix, the protocol makes intrinsic decisions based on metrics/cost/preference assigned to routes. Such a label is a measure of preference within a particular routing protocol. It can be simple, such as hop count for RIP, or a composite metric such as with EIGRP based on load, reliability, delay, and bandwidth, or cost based in a generic way such as with OSPF.
Link-State Protocols
Link-state protocols such as OSPF are cost-based, and the cost is usually derived from the link bandwidth. When a protocol has a stable view of the topology, it is referred to as having converged or achieved equilibrium. Do not confuse this view with the notion of converged networks meaning voice, video, data, and storage over one consolidated IP infrastructure.
The task of computing shortest paths in a network is a mathematical problem tackled with graph theory. You will read more about that in the section "Introduction to Link-State Routing Protocols" later in this chapter. Nevertheless, one cannot argue that link-state protocols are superior in every aspect per se.
Distance-Vector Protocols
Distance-vector protocols usually broadcast full table updates. Deviation from this case is referred to as an asynchronous, triggered, flash, or incremental update.
Note the following:
The name distance vector is derived from the fact that routes are advertised as vectors of (distance, direction), where distance is defined in terms of a metric and direction is defined in terms of the next-hop router.[1]
For loop prevention, simple split horizon or split horizon with poisoned reverse is used in distance-vector protocols. A thorough discussion of loop detection, prevention, and termination goes beyond the scope of this book. I recommend Jeff Doyle's two volumes of Routing TCP/IP (Cisco Press; 1998 and 2001, respectively) for further information.