Getting Started with Dynamic Routing: Let the Routers Do the Work

If you’ve ever wondered how routers know where to send data even across large and complex networks, that’s where dynamic routing comes in.
In this blog, I’ll share what I’ve learned about dynamic routing, how it works, and the different types of routing protocols like RIP, EIGRP, OSPF, and BGP. I’ll also explain concepts like administrative distance, routing metrics, and even floating static routes all in a way that’s beginner-friendly and easy to follow.
I’m not a professional. I’m just learning this myself and sharing what makes sense to me along the way. So if you’re also new to networking, I hope this helps you get a clearer picture of how routers actually “think” when choosing paths.
Let’s get started.
Dynamic routing is when routers automatically share routing information with each other. Instead of us telling them exactly where to send traffic (like we do in static routing), they learn and adjust routes on their own based on the network’s current state.
Let’s say you have three routers: R1, R2, and R3. If you configure dynamic routing, R1 can automatically learn how to reach networks connected to R2 and R3 without you needing to manually add any ip route
commands. If a link goes down, the routers can also find a new path by themselves. That’s one of the big advantages: it adapts.
There are different protocols that handle this learning process, like RIP, EIGRP, and OSPF. Each one has its own way of working, but the main goal is the same. Automate the routing updates and help routers make smart decisions.
How Do Routers Find the Path by Themselves?
Routers running dynamic routing protocols exchange information with their neighboring routers. They don’t just send out one update and forget about it, they keep communicating regularly to stay updated on any changes in the network.
Each protocol has its own way of deciding which path is “best,” depending on what it considers important. For example:
RIP (Routing Information Protocol) uses hop count. The fewer the hops (or routers to pass through), the better.
EIGRP (Enhanced Interior Gateway Routing Protocol) uses a mix of things like bandwidth and delay to calculate the best path.
OSPF (Open Shortest Path First) uses something called cost, which is based on the speed of the links.
Let’s say Router 1 wants to send data to a network behind Router 4. It doesn't know the way at first, so it asks its neighbors (Routers 2 and 3). Those neighbors share what they know, and eventually, Router 1 learns the full path. If a link breaks somewhere, routers talk again and find a new way.
You don’t have to tell them where to go. They figure it out, update their routing tables, and handle things for you.
So now that we know routers can figure out paths on their own, the next question is: how exactly do they do it?
That’s where dynamic routing protocols come in. These are the rules routers follow to share information and decide the best route. But not all routing protocols are the same. There are two main categories: IGP and EGP.
IGP (Interior Gateway Protocol)
IGP is used for routing within a single organization or network like inside your company’s network. It helps routers within the same network talk to each other.
Some common IGP protocols are:
RIP (Routing Information Protocol) – simple and uses hop count.
EIGRP (Enhanced Interior Gateway Routing Protocol) – Cisco’s advanced protocol that’s fast and efficient.
OSPF (Open Shortest Path First) – open standard, widely used, and great for large networks.
EGP (Exterior Gateway Protocol)
EGP is used to connect between different networks like one company’s network to another over the internet. The most common and only protocol used for this is:
- BGP (Border Gateway Protocol) – the backbone of the internet. It helps large networks (like ISPs or big companies) decide how to route data between each other.
Image above shows orange as IGP and purple as EGP.
Types of Dynamic Routing Protocols (Based on How They Work)
Dynamic routing protocols don’t all use the same method to find the best path. Each one follows a specific algorithm or set of rules to calculate the most efficient route. These are grouped into three main types:
1. Distance Vector (Used by RIP and EIGRP)
This type is like asking your neighbor for directions. Routers share their routing tables with directly connected neighbors. They don’t know the whole picture, just what their neighbors tell them.
RIP uses hop count to choose the best path.
EIGRP, though more advanced, still falls under this category but adds more metrics like bandwidth and delay.
2. Link State (Used by OSPF and IS-IS)
Link state works differently. Instead of just asking neighbors, routers create a full map of the network and then calculate the best path using that map.
- OSPF and IS-IS flood link information throughout the network so every router knows the entire topology.
3. Path Vector (Used by BGP)
This type is used by EGP, specifically BGP. It’s like planning a trip by looking at the full route history. BGP shares not only the destination but also the path taken to get there. This helps avoid routing loops between large networks, like ISPs or different organizations connected to the internet.
Distance Vector Routing Protocols
Alright, let’s now focus on the Distance Vector routing protocols. These were some of the first dynamic routing methods used in networks, and they’re still important to understand today especially if you’re just getting started.
The idea behind Distance Vector is simple: each router sends its entire routing table to its directly connected neighbors. It doesn’t know the full network map, it just trusts what its neighbors say. Think of it like getting directions from someone who only knows part of the route, and you just keep asking the next person along the way.
There are two main routing protocols that use this method:
RIP (Routing Information Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
Let’s go through each of them to see how they work, what they’re good at, and where they fall short.
RIP (Routing Information Protocol)
RIP is one of the oldest routing protocols still in use. It’s simple, which makes it easy to learn, but that simplicity also comes with limitations.
How it Works:
RIP uses hop count as its only metric. A hop is basically one router the data has to pass through. The fewer the hops, the better the path at least according to RIP.
Each router sends out its routing table every 30 seconds to its neighbors. The neighbor updates its own table based on what it hears and passes that along. This continues throughout the network.
Key Features:
Maximum hop count is 15 – anything beyond that is considered unreachable.
Updates sent every 30 seconds – which can lead to slower convergence.
Classful by default – doesn’t support VLSM unless you use RIP version 2.
Easy to configure – great for small networks or lab practice.
Example:
If R1 knows how to reach Network A in 1 hop and tells R2, R2 now knows how to reach Network A in 2 hops. R2 then tells R3, and R3 now sees Network A as 3 hops away. Simple and straightforward.
Downsides:
Not very efficient in large networks.
Slower to recover if something goes wrong (slow convergence).
Doesn’t factor in bandwidth, delay, or any advanced metrics; just hops.
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP is Cisco’s own routing protocol, and while it’s based on the Distance Vector method, it’s often referred to as an advanced Distance Vector or even a hybrid protocol because it borrows ideas from both Distance Vector and Link State.
It’s more efficient, more reliable, and much faster than RIP perfect for medium to large networks (as long as you’re using Cisco devices).
How it Works:
Unlike RIP, EIGRP doesn’t blindly send its entire routing table every 30 seconds. Instead, it uses something called DUAL (Diffusing Update Algorithm) to calculate the best path and only sends updates when something changes.
EIGRP uses multiple metrics to calculate the best route, including:
Bandwidth
Delay
Load
Reliability
By default, only bandwidth and delay are used to calculate the best path (called the metric).
Key Features:
Faster convergence than RIP.
Supports VLSM and CIDR.
Uses Hello packets to keep track of neighbor routers.
Unequal cost load balancing – EIGRP can use multiple paths with different metrics.
Classless protocol – no issues with subnetting.
Example:
Let’s say R1 is connected to R2 and R3. If R1 wants to reach Network A, and both R2 and R3 know how to get there, EIGRP looks at the path with better bandwidth and lower delay not just the one with fewer hops. It’s like using Waze instead of just counting how many streets to turn.
Downsides:
Cisco proprietary – unless you're using modern versions where it’s been opened up, you’ll need Cisco devices.
Slightly more complex to configure than RIP, but still manageable if you take it step by step.
Why is Distance Vector Called “Routing by Rumor”?
You might hear people say that Distance Vector protocols use “routing by rumor.” That’s not just a catchy phrase, it actually sums up how these protocols work.
In Distance Vector routing, routers don’t see the full picture of the network. Instead, they rely on what their neighbors tell them. One router shares its routing table with the next, that router updates its own table and passes it along again. It’s kind of like hearing something from a friend of a friend. You’re trusting the info without really knowing if it’s still true or not.
This can work in small networks, but it also means routers might have outdated or incorrect info especially if something changes in the network. That’s why Distance Vector protocols are simple but not always reliable in bigger or more dynamic environments.
Link State Routing Protocol
Now that we’ve covered Distance Vector protocols and how they rely on "routing by rumor," let’s shift gears and look at a smarter, more detailed approach: Link State routing protocols.
Instead of depending on what neighbors say, Link State routers build their own map of the entire network. They gather information from all routers, calculate the best path using that map, and keep it up to date. It’s like getting a full GPS view instead of just following verbal directions.
The two main Link State protocols you’ll often hear about are:
OSPF (Open Shortest Path First)
IS-IS (Intermediate System to Intermediate System)
Let’s break them down and see how this type of routing works.
OSPF (Open Shortest Path First)
OSPF is an open-standard routing protocol, meaning it’s not owned by any one company so it works on almost all routers, not just Cisco. It’s designed for large and complex networks that need fast, reliable, and scalable routing.
How It Works:
Unlike Distance Vector protocols, OSPF doesn’t rely on neighbors to tell it what the network looks like. Instead, each OSPF router discovers its connected links and shares that information with all other routers in the same area through something called LSAs (Link State Advertisements).
Once every router has the same map, they each run an algorithm called Dijkstra’s SPF (Shortest Path First) to figure out the best path to every destination. And they do this independently; no rumors, no guessing.
Key Features:
Faster convergence – routers quickly react to changes in the network.
Uses cost as its metric – based on link bandwidth.
Divides networks into areas – which keeps things organized and reduces overhead.
Classless – fully supports VLSM and CIDR.
Only sends updates when there’s a change, not every 30 seconds like RIP.
Example:
Imagine a network with 10 routers. Each OSPF router will send out link-state information about its directly connected links. All 10 routers receive the same info and calculate the shortest path to every other network. If one link goes down, only that change is shared and all routers recalculate based on the updated map.
Downsides:
Slightly more complex to set up than RIP or even EIGRP.
Requires understanding of areas, neighbor relationships, and network types.
Can be overkill for small networks.
IS-IS (Intermediate System to Intermediate System)
IS-IS is another Link State routing protocol that works a lot like OSPF. It’s not as common in small networks or home labs, but it’s widely used by large enterprises and internet service providers (ISPs) because of how scalable and flexible it is.
How It Works:
Just like OSPF, IS-IS routers exchange link-state information with each other. They also build a full map of the network and use the Shortest Path First (SPF) algorithm to calculate the best paths.
The biggest difference? IS-IS was originally designed for use with OSI networking instead of IP. But over time, it was adapted to work with IP networks too and it’s stayed popular in large-scale environments.
Key Features:
Uses areas to organize the network, just like OSPF.
Very scalable – handles huge networks well.
Flexible with addressing – doesn’t rely on IP like OSPF does.
More commonly used by ISPs than by small to mid-sized businesses.
Downsides:
Not as beginner-friendly as OSPF.
Less documentation and examples for home lab users.
Mainly seen in carrier-grade networks.
Equal-Cost Multi-Path (ECMP)
So what happens if a router learns two or more routes to the same destination, using the same routing protocol, and both routes have equal cost? The answer is pretty straightforward: the router can actually use both.
This is called Equal-Cost Multi-Path (ECMP). Instead of picking just one path, the router installs all of the equal-cost routes into its routing table. This allows it to load-balance traffic across those paths, which can help improve performance and prevent any single link from getting overloaded.
The way this load balancing works can vary:
Some routers do it per-packet, where each packet may take a different path.
Others do it per-destination or per-flow, meaning all packets from the same source to the same destination stick to one path to keep things in order.
Most routing protocols like RIP, EIGRP, OSPF, and even BGP support ECMP:
RIP supports up to 4 equal-cost paths by default.
EIGRP also supports ECMP and even allows unequal-cost load balancing using a feature called
variance
.OSPF and BGP can load balance too, depending on the platform and configuration.
Just keep in mind that this only works if the metric is exactly the same for each route. If one path has a better metric, the router will prefer that one and ignore the rest unless you configure it otherwise.
Each IGP routing protocol has its own way of calculating the “best” path and that decision is based on something called a metric.
IGP Metrics Comparison
IGP Protocol | Metric Used | How It’s Calculated |
RIP | Hop Count | Counts the number of routers a packet must pass through. The fewer hops, the better. Max is 15. |
EIGRP | Composite Metric (Bandwidth + Delay) | Uses bandwidth and delay by default. Lower bandwidth and higher delay = higher metric. Can also factor in load and reliability. |
OSPF | Cost | Based on bandwidth of the outgoing interface. Higher bandwidth = lower cost. Default formula: Cost = 100,000,000 / Bandwidth in bps |
IS-IS | Cost | Manually assigned or uses default values. Not based on bandwidth unless configured that way. |
This table should give you a quick idea of how each IGP thinks when choosing the best path. Some use automatic calculations based on link quality, while others like IS-IS give you more control with manual cost settings.
Administrative Distance (AD)
So we’ve seen how routing protocols choose the best path using metrics, but what if a router learns the same route from two different routing protocols? How does it decide which one to trust?
That’s where Administrative Distance (AD) comes in.
AD is like a trust rating for routing sources. Each routing protocol is assigned a default AD value, and the lower the number, the more trusted it is. When a router sees the same route from multiple sources, it picks the one with the lowest AD and ignores the rest.
Administrative Distance (AD) Values
Route Source / Protocol | AD Value | Explanation |
Directly Connected | 0 | Most trusted. The network is directly attached to the router. |
Static Route (next-hop IP) | 1 | Manually configured route to a next-hop IP. |
EIGRP (internal) | 90 | Learned from another EIGRP router within the same AS. |
OSPF | 110 | Link-state routing protocol with fast convergence. |
IS-IS | 115 | Similar to OSPF, used in larger networks. |
RIP | 120 | Basic distance vector protocol using hop count. |
EIGRP (external) | 170 | Routes redistributed into EIGRP from other protocols. |
BGP (external) | 20 | Routes learned from outside the AS. Very trusted. |
BGP (internal) | 200 | Routes learned from within the same AS. Less preferred. |
Static Route (to an interface) | 0 or 1 | If configured with just an interface, may be treated as directly connected. |
Unusable Route | 255 | Not used. The router will reject this route. |
You can think of AD as the router’s way of saying, “I’ll pick the route from the source I trust most.” Lower AD wins.
Now that you know what Administrative Distance is and how routers use it to choose between different routing sources, here’s something useful: you can actually change the AD manually.
By default, routers stick to the standard AD values we covered earlier but sometimes you might want to adjust them. For example, maybe you want the router to prefer a static route over EIGRP, or make a backup route less preferred without removing it entirely.
Let’s look at how you can change the AD for both static routes and routing protocols.
Changing Administrative Distance (AD)
There are two common situations where you might want to manually change the AD:
To make one route more preferred than another
To set up a backup (or fallback) route, also called a floating static route
Let’s start with the basics.
Changing AD for Static Routes
When you configure a static route, you can add an optional number at the end. That’s the administrative distance.
Example:
ip route 192.168.1.0 255.255.255.0 10.0.0.2 5
In this case, the static route to 192.168.1.0/24
via 10.0.0.2
has an AD of 5, which is still more preferred than most dynamic protocols like OSPF (AD 110) or RIP (AD 120). If you leave the AD out, it defaults to 1.
Floating Static Routes (Backup Routes)
Now here’s where it gets interesting.
Let’s say you have a primary route learned via EIGRP (AD 90), but you want a static backup route that only kicks in if the EIGRP route disappears. You can do that by setting the static route’s AD higher than EIGRP’s, so the router won’t use it unless the primary route goes down.
Example of a floating static route:
ip route 192.168.1.0 255.255.255.0 10.0.0.2 200
This static route has an AD of 200, which is higher than EIGRP (90), OSPF (110), and even RIP (120). That means it will just “float” in the background until no other better route exists. Once the dynamic route fails or disappears, the router installs this backup route in the table.
Changing AD for Dynamic Routing Protocols
Some routing protocols also let you change the AD for specific routes or neighbors. For example, in EIGRP or OSPF, you can tweak AD values under certain conditions, especially when redistributing routes.
But most of the time, when people say “change the AD,” they’re talking about static routes and floating backups which are very useful in real-world networks.
Floating Static Routes
Now that we've seen how to change the administrative distance, let’s talk more about a practical and powerful use case for it: floating static routes.
What is a Floating Static Route?
A floating static route is a backup route that only gets used if the primary route becomes unavailable. It's called “floating” because it stays out of the routing table until it’s needed.
This works by giving the static route a higher AD than the primary route (which is usually learned through a dynamic routing protocol like EIGRP or OSPF). As long as the dynamic route is present, the router ignores the floating static route. But if the dynamic route goes down, the static one "floats up" and takes over.
Why is it Useful?
Floating static routes are a simple and effective way to build redundancy into your network without relying on more complex failover tools. They’re commonly used when:
You want a manual backup path in case of link failure
You have a secondary internet connection (like DSL or LTE) and only want to use it when the primary is down
You’re connecting branch offices and need basic fault tolerance
How to Configure a Floating Static Route
The configuration is almost the same as a normal static route, you just add a higher administrative distance at the end.
Example:
ip route 192.168.2.0 255.255.255.0 10.0.12.2 200
In this case:
192.168.2.0/24
is the destination network10.0.12.2
is the next-hop IP200
is the AD, which makes this a backup route
If a route to 192.168.2.0/24
with a lower AD (like EIGRP’s 90 or OSPF’s 110) exists, this static route won’t be used. But the moment that route disappears, this one takes over automatically no extra commands or failover setup needed.
How It Works in Action
Let’s say R1 normally reaches 192.168.2.0/24
through OSPF. If that route fails due to a link going down or neighbor loss, OSPF removes it from the routing table. At that point, the floating static route becomes the next best option, and R1 starts forwarding traffic through it.
It’s a clean, quiet failover that doesn’t require dynamic recalculations or manual intervention.
Wrapping It Up
And that’s the basics of Dynamic Routing.
We started by understanding how routers can automatically learn and update routes using dynamic protocols without manual configuration. Then we explored the two major types: IGP for internal routing and EGP for external, like between ISPs. We also broke down the different routing protocol types like Distance Vector, Link State, and Path Vector, along with examples like RIP, EIGRP, OSPF, and BGP.
From there, we looked at how routers make routing decisions using metrics and administrative distance, and wrapped it up by learning how to configure floating static routes for simple backup path setups.
Dynamic routing might seem like a lot at first, but once you understand how routers pick paths and react to changes, it starts to make sense. You don’t need to memorize everything right away, just get familiar with how it all works and build from there.
I'm not a professional, just someone learning and sharing along the way. If you found this helpful, feel free to stick around. I’ll be posting more topics soon as I go deeper into routing, switching, and beyond.
Thanks for reading, and don’t stop learning!
Subscribe to my newsletter
Read articles from Pits directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
