# Introduction to the Border Gateway Patrol

• Print
This chapter is from the book

## Distance Vector, Link State, and Path Vector

Routing protocols are effectively distributed database systems. They propagate information about the topology of the network among the routers within the network. Each router in the network then uses this distributed database to determine the best loop free path through the network to reach any given destination. There are two fundamental ways to distribute the data through a network:

• By distributing vectors, each router in the network advertises the destinations it can reach, along with some information which can be used to determine the best path to each reachable destination. A router can determine the best vector (path) by examining the destinations reachable through each adjacent router or neighbor, combined with some additional information, such as the metric, which indicates the desirability of that path. There are two types of vector-based protocols: distance vector and path vector.

• By distributing the state of the links attached to the routers; each router floods (or advertises to all other routers in the network, whether directly adjacent or not), the state of each link to which it is attached. This information is used independently by each router within the routing domain to build a tree representing a topology of the network (called a shortest path tree). Routing protocols that distribute the state of attached links are called link state algorithms.

Each of these data distribution methods is generally tied to a specific method of finding the best path to any given destination within the network. The sections below provide a quick overview (or review) of each of these types of routing protocols. Remember that a primary goal of routing protocol design is that they must be capable of determining loop free paths through the network. Generally, routing protocols assume that the best (or shortest) path through the network is also loop free.

As each router builds a complete database of the link state information as advertised by every other router within the network, it uses an algorithm, called the shortest path first algorithm, to build a tree with itself as the center of that tree. The shortest path to each reachable destination within the network is found by traversing the tree. The most common shortest path first algorithm is the Dijkstra algorithm.

### Distance Vector

Routers running distance vector algorithms advertise the vector (path) and distance (metric) for each destination reachable within the network to adjacent (directly connected) peers. This information is placed in a local database as it is received, and some algorithm is used to determine which path is the best path to each reachable destination. Once the best path is determined, these best paths are advertised to each directly connected adjacent router.

Two common algorithms used for determining the best path are Bellman-Ford, which is used by the Routing Information Protocol (RIP and RIPv2), and the Diffusing Update Algorithm (DUAL), used by the Enhanced Interior Gateway Protocol (EIGRP).

### Path Vector

A path vector protocol does not rely on the cost of reaching a given destination to determine whether each path available is loop free or not. Instead, path vector protocols rely on analysis of the path to reach the destination to learn if it is loop free or not. Figure 1-2 illustrates this concept.

Figure 1-2: Simple illustration of path vector protocol operation

A path vector protocol guarantees loop free paths through the network by recording each hop the routing advertisement traverses through the network. In this case, router A advertises reachability to the 10.1.1.0/24 network to router B. When router B receives this information, it adds itself to the path, and advertises it to router C. Router C adds itself to the path, and advertises to router D that the 10.1.1.0/24 network is reachable in this direction.