Dynamic routing protocols


Dynamic routing protocols, as their name suggests, are used to dynamically exchange routing information between routers. Their implementation allows network topologies to dynamically adjust to changing network conditions, and to ensure that efficient and redundant routing continues in spite of any changes. In addition, they are invaluable to the management, administration, and configuration of networks as relatively low administrative overhead is required to configure highly complex routing scenarios. Compared to statically configuring routing in topology, the implementation of dynamic routing protocols vastly improves the scalability of networks.

The first dynamic routing protocol was the Exterior Gateway Protocol (EGP), introduced in 1982 by Eric C. Rosen. Since then, many more advanced protocols have been developed and have matured over the years, protocols that we will cover extensively in this series of articles.

Overview of Routing and Routing Tables

Routers are responsible for receiving IP packets, deciding where to send them, and then sending them toward their destinations. This process is called IP forwarding or routing.

To accomplish this task, the router examines the routing table to determine the interface through which the packet will be sent. The routing table resides in each router’s memory; it contains information about the directly connected network and routes that it knows statically or learns dynamically.

Static Routing

A static route is routing information that is manually configured on the routing device.

As the name says, this kind of routing information is fixed in the routing table, so it does not change when there is a networking event or a change to the network.

Advantages and Limitations

There are some advantages to static routing, and it can and should be used in some scenarios. However, static routing does have its limitations, and this is why dynamic routing was developed.  

For example, static routing uses very little CPU and memory resources, since no algorithms are run to determine the next hop. On small networks, where there are two or three routers, there are very few options for what route-specific packets should take. Implementing static routing is more than sufficient in such cases, and is often simpler to implement.

However, as networks get larger, and potential paths to specific destinations become more numerous, static routing becomes more unwieldy to administrate. Even a minor change in the network topology will require a major reconfiguration of all routers in a network, which makes such configurations prone to errors. In the event of a network failure, static routing does not dynamically reroute traffic, so the reliability of the network is reduced.

The advantages and disadvantages of static routing are summarized in the following table:

Minimal CPU and memory resource usage
Configuration complexity in large networks
Easy implementation in small networks
In case of failure, manual intervention is required to reroute traffic
Predictability because the next-hop is always the same.
Prone to configuration errors

Dynamic Routing

Dynamic routing is a mechanism through which routing information is exchanged between routers to determine the optimal path between network devices. A routing protocol is used to identify and announce network paths.

Dynamic routing protocols were designed to address the previously mentioned shortcomings of static routing such as the need for human involvement to route traffic around failures, the human mistakes made when typing route information, and the scaling limit of the few routes one person can track in a text file. These benefits come at the expense of requiring significant computing power in the routers, and the need for training network administrators who specialize in taming routing algorithms. 


Routing Protocol Fundamentals

Dynamic routing involves the use of routing protocols that exchange routing information between routing devices. Routing protocols perform these functions:

  • Discovery of remote networks
  • Best path calculation to remote networks
  • Updating the routing table
  • Recalculating a new best path in the case of failure of the current best path

There is less administrative overhead when using routing protocols than static routing. However, running a routing protocol requires extra CPU and memory resources. 

The routing protocols can be compared using these characteristics:

  • Scalability: How large a network can be if a particular routing protocol is used
  • Convergence Speed: How fast routers exchange routing information and achieve a state of consistent information
  • Complexity: Describes the level of knowledge required to implement and operate the particular routing protocol
  • Resource Usage: The CPU and memory resources required to run the protocol

Types of Routing Protocols

The dynamic routing protocols fall into one of two categories: interior gateway protocols (IGPs) and exterior gateway protocols (EGPs). Generally speaking, an interior gateway protocol operates within a particular Autonomous System (AS), while an exterior gateway protocol operates between ASes. An autonomous system is a set of routers under a common administration with common routing policies.

Note that the term “exterior gateway protocol” should not be confused with the specific protocol of the same name, the Exterior Gateway Protocol (EGP). Somewhat confusingly, the Exterior Gateway Protocol is just one example of an exterior gateway protocol, as is BGP, its successor.

Interior gateway protocols can be further categorized into distance vector protocols and link-state protocols based on their operation:

  • A router using a distance vector routing protocol is unaware of the network topology. It knows only about its directly connected networks and the remote networks it can reach via its neighbors. 
  • Link-state protocols are more complex: routers using them are aware of the network topology.

The only exterior gateway protocol used today is Border Gateway Protocol (BGP), which is the de-facto standard inter-domain routing protocol used in the Internet. BGP is what is known as a path-vector protocol. Its predecessor, EGP is no longer in use, and is considered obsolete.

The most commonly used routing protocols are shown in the table below.

Protocol Name
Interior or Exterior Gateway Protocol?
Distance Vector or Link-State Protocol?
Routing Information Protocol (RIPv2)
Distance Vector
Enhanced Interior Gateway Routing Protocol (EIGRP)
Distance Vector
Open Shortest Path First (OSPF)
Intermediate System to Intermediate System (IS-IS)
Border Gateway Protocol (BGP)

RIPv2 and EIGRP had predecessors that are no longer supported in current software releases.


As mentioned before, the primary purpose of a routing protocol is to find the best path to a destination. It is not unusual for a router to have multiple paths to a destination learned through a single routing protocol, so the paths need to be compared to find the best path.

When the source of information for multiple paths is the same — all the paths are known to the router through the same routing protocol — the router uses the metrics calculated by the routing protocol to find the best path.

Different routing protocols use different ways to calculate metrics. The metric calculated by one routing protocol cannot be compared to the metric calculated by another. Different routing protocols might not choose the same best path because of how they calculate their metrics.

Some protocols use just a single variable to calculate metrics, while others may use a combination of several. For instance, RIPv2, which is a distance-vector routing protocol, uses as a metric the hop count, which is how many routers exist between the router and the remote network. 

In contrast, OSPF, which is a link-state routing protocol, uses cost as a metric, which, by default, is tied to the bandwidth of the interface through which the remote destination can be reached.  

Furthermore, unlike IGPs, BGP exchanges routing and reachability information between ASes. The best path is determined based on a series of attributes that are examined, and the best path is denoted as a list of ASes that must be traversed to reach the intended destination network. 

Administrative Distance

We just saw that routers decide which is the best path when choosing among several paths learned from the same routing protocol. However, what happens when the router has two paths, each from a different routing protocol? The router cannot use a metric to compare the two routes because each routing protocol calculates the metric differently.

In this case, the router uses administrative distance (AD) to determine which is the best path. The AD can be seen as the trustiness of the source of information, and a lower value is a better value. It ranges from 0 and 255, with 0 being for the connected routes and 255 for unreachable routes. Each vendor has values assigned to the routing protocols, which might or might not be identical to the values assigned by other vendors.

Route Redistribution and Summarization

Although it is preferable to use a single routing protocol in the network, this is not always possible. Reasons may include mergers of entities or routing devices that do not support a given routing protocol, or the implementation of different protocols for different purposes. For example, OSPF may be used within an AS, and BGP may be used between ASes.

Route redistribution occurs when the routes learned through one protocol are advertised in another routing protocol on one or more routers. To perform route redistribution, the router must run both routing protocols, and the routes must be in the routing table.

When we have extensively large networks, routing updates can become considerably large, contributing to increased device resource usage as well as bandwidth consumption for the routing updates themselves.  Route summarization helps to alleviate these problems.

Route summarization creates a single route that is less specific than its component routes, and includes within it multiple destination networks. For example, is the summary route for and

Whenever route summarization happens, by default, the routers behave this way:

  • The component routes are not advertised.
  • The summary is not advertised if there is no component route present in the routing table.
  • The summary route is assigned the same metric as the currently lowest metric component route.