The quick download:
Dynamic routing protocols make large, resilient networks possible by automating path selection and failure recovery.
-
Dynamic routing eliminates the manual overhead and error risk of static configurations by allowing routers to exchange path information and automatically reroute traffic when failures occur.
-
Interior gateway protocols (OSPF, EIGRP, IS-IS) handle routing within an autonomous system, while BGP manages routing between autonomous systems across the Internet.
-
Metrics and administrative distance work together to ensure routers select the best path, even when multiple protocols are running simultaneously.
-
Invest time in understanding the fundamentals of protocols before choosing between distance-vector and link-state approaches for your environment.
The Guide to Dynamic Routing Protocols
Dynamic routing protocols automatically exchange routing information between routers. They let network topologies adjust to changing conditions and maintain efficient, redundant routing without manual intervention. They’re also invaluable for network management, administration, and configuration because they require relatively low administrative overhead to handle highly complex routing scenarios. Compared with statically configuring routing in a topology, implementing dynamic routing protocols vastly improves network scalability.
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. The most widely used today, including RIPv2, EIGRP, OSPF, IS-IS, and BGP, are covered in the chapters below.
Understanding how these protocols work is essential for teams monitoring network health and routing performance. LogicMonitor surfaces BGP peering health, network path performance, and routing protocol status in one view, giving teams the context to catch routing issues before they reach end users.
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
You manually configure a static route on the routing device.
This routing information is fixed in the routing table, so it doesn’t change when there’s 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 has its limitations, which is why dynamic routing was developed.
For example, static routing uses minimal CPU and memory resources, since no algorithms are run to determine the next hop. On small networks with two or three routers, there are few options for which route-specific packets should take. Implementing static routing is more than sufficient in such cases and is often simpler to implement.
However, as networks grow and potential paths to specific destinations become more numerous, static routing becomes more unwieldy to administer. Even a minor change in the network topology will require a major reconfiguration of all routers, making such configurations prone to errors. In the event of a network failure, static routing doesn’t dynamically reroute traffic, reducing network reliability.
The advantages and disadvantages of static routing are summarized in the following table:
| Advantages | Disadvantages |
|---|---|
| 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 the same | Prone to configuration errors |
Dynamic routing
Dynamic routing is a mechanism by which routers exchange routing information 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 these shortcomings: the need for human involvement to route traffic around failures, the errors introduced when typing route information, and the limited scale of the few routes one person can track in a text file. These benefits come at the expense of requiring significant computing power in routers and the need to train network administrators who specialize in taming routing algorithms.
Routing protocol fundamentals
Dynamic routing uses routing protocols that exchange routing information among 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’s 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: 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). 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.
The term “exterior gateway protocol” shouldn’t be confused with the specific protocol of the same name, the Exterior Gateway Protocol (EGP). EGP is itself one example of an exterior gateway protocol, alongside its successor, BGP.
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 in use today is Border Gateway Protocol (BGP), the de facto standard inter-domain routing protocol on the Internet. BGP is 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) | Interior | Distance Vector |
| Enhanced Interior Gateway Routing Protocol (EIGRP) | Interior | Distance Vector |
| Open Shortest Path First (OSPF) | Interior | Link-State |
| Intermediate System to Intermediate System (IS-IS) | Interior | Link-State |
| Border Gateway Protocol (BGP) | Exterior | Path-Vector |
RIPv2 and EIGRP had predecessors that are no longer supported in current software releases.
Metrics
The primary purpose of a routing protocol is to find the best path to a destination. It isn’t 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 paths are known to the router through the same routing protocol), the router uses the routing protocol’s metrics to select the best path.
Different routing protocols use different ways to calculate metrics. The metric calculated by one routing protocol can’t be compared with that 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 the hop count as a metric, which is how many routers exist between the router and the remote network.
OSPF, 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.
BGP works differently from IGPs. Instead of managing routing within a single autonomous system, it exchanges routing and reachability information between ASes. BGP determines the best path by evaluating a series of attributes and expresses that path as a list of ASes to traverse to reach the destination network.
Administrative distance
When a router has two paths learned from different routing protocols, it can’t directly compare them using metrics because each protocol calculates them differently.
In this case, the router uses administrative distance (AD) to determine which is the best path. The AD can be seen as the trustworthiness of the information source, and a lower value is better. It ranges from 0 to 255, with 0 indicating connected routes and 255 indicating unreachable routes. Each vendor assigns values to routing protocols that may differ from those assigned by other vendors.
Route redistribution and summarization
Although it’s preferable to use a single routing protocol in a network, this isn’t always possible. Reasons may include mergers of entities or routing devices that don’t 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 a router takes routes it learned through one protocol and advertises them in another. To perform route redistribution, the router must run both routing protocols, and those routes must be present in its routing table.
As networks scale, routing updates can grow large, increasing device resource usage and bandwidth consumption. Route summarization helps to alleviate these problems.
Route summarization creates a single route that’s less specific than its component routes and includes multiple destination networks. For example, 10.0.0.0/16 is the summary route for 10.0.0.0/24 and 10.0.1.0/24.
Whenever route summarization happens, by default, the routers behave this way:
- The router assigns the summary route the same metric as the lowest-metric component route.
- The component routes aren’t advertised.
- The summary isn’t advertised if there’s no component route present in the routing table.
Understand your network from user to code with LogicMonitor.
Gain user-to-code visibility across your network, and give your team the context to act on routing issues before they reach users.
FAQs
What’s the difference between distance vector and link-state routing protocols?
Distance vector protocols (like RIPv2 and EIGRP) make routing decisions based on information from directly connected neighbors without knowing the full network topology. Link-state protocols (like OSPF and IS-IS) build a complete map of the network, which allows them to calculate the shortest path to each destination more accurately. Link-state protocols converge faster but require more CPU and memory.
When should I use static routing instead of dynamic routing?
Static routing works well in small networks with two or three routers where paths are predictable and rarely change. It uses fewer resources and is simpler to configure. Once your network grows beyond a handful of routers or needs automatic failover, dynamic routing protocols provide the scalability and resilience that static configurations can’t match.
Why does BGP use a different metric system than interior gateway protocols?
BGP operates between autonomous systems, where the goal is to route traffic across organizational boundaries on the Internet. Instead of using simple metrics like hop count or link cost, BGP evaluates a series of path attributes (including AS path length, local preference, and origin type) to determine the best route. This approach reflects the policy-driven nature of inter-domain routing, where business relationships and routing policies matter as much as raw performance.
What is route redistribution, and when is it needed?
Route redistribution is the process of sharing routes learned by one routing protocol into another. It’s needed when your network runs multiple routing protocols, which can happen after mergers, when different teams manage different parts of the infrastructure, or when specific protocols are chosen for specific purposes (such as OSPF internally and BGP for external connectivity). The router performing redistribution must run both protocols and have the routes in its routing table.




