Distance Vector Operations

Distance Vector Operations


  • Compare and contrast methods of routing and routing protocols

To recap, distance vector routing protocols are legacy routing protocols that help routing devices determine the networks that are present in a topology. Using a routing algorithm, known as the Bellman-Ford algorithm, distance vector routing protocols periodically broadcast routing updates consisting of the routing table to directly connected neighbors on adjacent data links, regardless of whether a change has occurred in the topology. When those devices receive that update, they compare it with their existing routing table information. If the distance vector metric for an entry in the routing update is greater (higher) than a current entry in the routing table, it is discarded. If the metric is equal or less, it is added to the routing table with an updated metric to include the path to the advertising neighbor. This entry eventually is passed to the next routing device where the process occurs over again.

Many routing protocols, when the metrics on more than one route received by an update are equal, put both entries in the routing table and perform load balancing (transferring packets over both alternate paths).

Because these neighbors base their decisions on information that is not learned firsthand, distance vector routing protocol operations are often referred to as routing by rumor. In addition, each router in a distance vector routing topology has the same responsibility and function as the next router. In other words, distance vector routers contain flat relationships with each other.

Distance vector routing protocols use the Bellman-Ford algorithm by broadcasting the entire routing table to directly connected neighbors regardless of whether a topology change occurs or not. The information in the update is added and recalculated before being sent to other neighbors.

Consider the example shown in Figure 11.1, which uses a classful distance vector routing protocol such as RIP version 1. Each router contains its directly connected networks in its routing table. Because the routing protocol is classful, the subnetted network has a

Fixed-Length Subnet Mask (FLSM) design. In addition, the routing table entries contain the metric (hop count for this particular example) indicated by “0” because they are all connected. This is also followed by the interface that packets will exit to reach those networks. Without the use of static routes or routing protocols, the routers can never reach the networks that lie
beyond their neighbor routers.

Distance Vector Operationsfig11.1

After you configure and enable a distance vector routing protocol, it advertises the networks in the routing table to its adjacent neighbors. For example, Router A broadcasts a routing update containing the network as well as the network to Router B. As soon as Router B receives that update, it compares the entries in its routing table with the information
learned from Router A. Router B already knows about as a directly connected network, so it disregards that entry because the directly connected network has a lower administrative distance than the routing protocol.

Because the network is new information, it adds that to its routing table with an updated metric of 1. The network is one hop away through Router A. Similarly, when that entry is advertised to Routers C and D, the metric is updated again to 2 because it is two hops away (through Router B and then Router A). Likewise, Routers A, C, and D receive an update from Router B containing two new networks that will be added to their routing table as two hops away.

This process continues until each router has an accurate depiction of all the networks in the domain, as shown in Figure 11.2. In other words, the network will be converged. Despite having achieved full convergence, the routes will still advertise their routing table to their neighbors periodically, even if there isn’t a change in the topology.

Distance Vector Operationsfig11.2

Routing Loops

One of the major concerns with routing protocols is the possible occurrence of a routing loop. Routing loops are hard to find these days because routing protocols have implemented many measures to mitigate them, but it is still important to examine the plausible historic events that necessitated the need for such measures. Additionally, there still is a slim possibility that these
loops can occur regardless of the countermeasures in place.

To demonstrate a routing loop scenario, I will use the existing converged topology and introduce a link failure on Router A, as illustrated in Figure 11.3. Notice that the routing table in Router A changed to reflect only the remaining connected interface left since its serial link failed. Because the next hop to the protocol-learned networks is down, those entries are removed too. Likewise, Router B removes the connected interface as well as the network entry for because that link and consequently the next hop to that network is down.

Imagine in this scenario that Router D sends its periodic update to Router B before Router B can advertise the topology change in its update. When Router B receives the update, it compares the information with its own routing table as distance vector routing protocols typically do. The new subnet information learned in the routing update is added to the routing table.

In this unfortunate case, Router B learns (again) about the and the networks and believes they can be reached through Router D (despite Router D originally having learned those routes via Router B). What’s more, Router B adds its metric to get to Router D to reach the networks that don’t even exist, as shown in Figure 11.4.

Distance Vector Operationsfig11.4

Router B continues to update its neighbor routers periodically with the entries in its routing table. Unfortunately, the unreachable networks appear to be moving away because the hop count inevitably increases with each update from Router B and Router D for infinity. All the while, poor Router C also is fed false information about these networks from Router B and also has to keep adjusting its metrics as shown in Figure 11.5.

Distance Vector Operationsfig11.3

Distance Vector Operationsfig11.5

With all three routers containing false information regarding those networks, any packets destined for the and the network are sent to Router D, who in turn, sends them right back to Router B, and so on. These packets will continue to bounce back and forth in the routing loop until the time to live field in the IP packets expire or the link becomes so
saturated, traffic cannot flow between the two routers.

About the author


Leave a Comment