3.1 Routing
3.1.3 Distance vector routing
Two Functional Classes of Dynamic Routing Protocols

Routing protocols can be classified in many ways, including by many of their operational characteristics such as their field of use, the number of redundant routes to each supported destination, and so on. This curriculum classifies them by the way that they discover and calculate routes. However, it is still useful to reference routing protocols by their field of use. In other words, categorize them by the role that they perform in an internetwork. There are two functional classes of dynamic routing protocols, for example: Interior Gateway Protocols (IGPs) and Exterior Gateway Protocols (EGPs).

Perhaps the easiest way to explain this is that IGPs are used within autonomous systems, such as intranets, whereas EGPs are used between autonomous systems. Consequently, the Border Gateway Protocol (BGP), an EGP, is a protocol used to calculate routes across the Internet. The Internet, from a routing perspective, is nothing more than a backbone transport for a global collection of privately owned and operated autonomous systems.

In routing based on distance-vector algorithms, also sometimes called Bellman-Ford algorithms, the algorithms periodically pass copies of their routing tables to their immediate network neighbors. Each recipient adds a distance vector (its own distance "value") for each route to the table and forwards it on to its immediate neighbors. This process occurs in an omnidirectional manner among immediately neighboring routers. This step-by-step process results in each router learning about other routers and developing a cumulative perspective of network "distances."

The cumulative table is then used to update each router's routing tables. When completed, each router has learned information about the "distances" to networked resources. It does not learn anything specific about other routers, or the network's actual topology.

Drawbacks to Distance-Vector Routing

Under certain circumstances, distance-vector routing can actually create routing problems. A failure or other change in the network, for example, requires some time for the routers to converge on a new understanding of the network's topology. During the convergence process, the network may be vulnerable to inconsistent routing, and even infinite loops. Safeguards can contain many of these risks, but the fact remains that the network's performance is at risk during the convergence process. Therefore, older distance-vector protocols that are slow to converge may not be appropriate for large, complex WANs.

Even in smaller networks, distance-vector routing protocols may be problematic at worst, or suboptimal at best. This is because the simplicity that is this genre's strength can also be a source of weakness. Figure presents an internetwork with specific geographic locations.

In this example, Network 1 is in New York, Network 2 is in Seattle, Network 3 is in Philadelphia, and Network 4 is in Minneapolis. The distance-vector routing protocol uses a statically assigned cost of 1 for each hop, regardless of the distance of the link or even its bandwidth. Figure summarizes the number of hops to each of the destination network numbers. Notice that the routers do not have to create separate entries in their routing tables for every known end system. They can do so, but instead usually summarize routes. Route summarization is the truncation of the host portion of an IP address; only the network address is stored. In theory, the same path can be used to get to all the hosts or end systems on any given network. Therefore, nothing is gained by creating separate entries for each host address.

In any internetwork with redundant routes, it is better to use a distance-vector protocol than to use static routes. Distance-vector routing protocols can automatically detect and correct failures in the network. Unfortunately, they aren't perfect; for example consider the routing table entries for Gateway Router A. This is the New York gateway. From its perspective, the Minneapolis gateway is two hops away, regardless of whether it goes through Philadelphia or Seattle. In other words, this router would be indifferent to accessing Minneapolis through either Philadelphia or Seattle.

If all the variables in the network were held constant (including such things as traffic levels, the bandwidth of each link, and even transmission technology), the geographically shortest path would incur the least amount of propagation delay. Therefore, logic dictates taking the shorter route, through Philadelphia. In reality, such logic is beyond the capabilities of simple distance-vector protocols. Distance-vector protocols aren't exactly limited by this because propagation delay is often the least significant of the factors driving the performance of a route. Bandwidth and traffic levels can both have much more noticeable effects on the performance of a network.

What's Distance-Vector Routing Good For?

Generally speaking, distance-vector protocols are very simple protocols that are easy to configure, maintain, and use. Consequently, they prove quite useful in very small networks that have few, if any, redundant paths and no stringent network performance requirements. The epitome of the distance-vector routing protocol is Routing Information Protocol (RIP). RIP uses a single distance metric (hop count) to determine the best next path to take for any given packet. RIP has been widely used for decades, and has only recently warranted updating.