Skip to main content
Cisco CCNA Prep – Complete Beginner to Intermediate Guide
CHAPTER 09 Intermediate

Static and Dynamic Routing

Updated: May 16, 2026
25 min read

# CHAPTER 9

Static and Dynamic Routing

1. Introduction

In the previous chapter, we learned that a router makes decisions by looking at its Routing Table. But how do the routes get into the table in the first place? When you plug a router into the wall, it only knows about the cables physically connected to it. It has no idea the rest of the world exists. To build the map, network engineers must use either Static Routing (typing the map by hand) or Dynamic Routing (letting the routers talk to each other and build the map themselves). In this chapter, we will contrast the rigidity of Static Routes with the automated brilliance of dynamic protocols like OSPF, and we will explore how a router breaks a tie using Administrative Distance.

2. Learning Objectives

By the end of this chapter, you will be able to:
  • Explain the syntax and use cases for Static Routing.
  • Define the Default Static Route (0.0.0.0/0).
  • Understand the automated mechanisms of Dynamic Routing Protocols.
  • Differentiate between Distance Vector (RIP) and Link-State (OSPF) protocols.
  • Define Administrative Distance (AD) and its role in routing decisions.

3. Beginner-friendly Explanations

The Paper Map vs. GPS (Static vs. Dynamic):
  • Static Routing is a printed Paper Map. A human (the engineer) writes down the exact directions: "To get to New York, take Highway 5." It is fast, requires zero battery power, and is incredibly secure. But, if a bridge collapses on Highway 5, the Paper Map does not update. You will drive into the river.
  • Dynamic Routing is Google Maps (GPS). The routers actively talk to each other. They say: "Highway 5 is clear!" If the bridge collapses, the routers instantly alert each other, delete Highway 5 from their tables, and dynamically calculate a new path via Highway 10. It requires more CPU power, but it adapts to disasters automatically.

4. Static Routing Basics

In a small office with only one router connecting to the ISP, dynamic routing is overkill. The engineer will simply type a manual Static Route.

The Command Syntax: ip route [Destination Network] [Subnet Mask] [Next-Hop IP] *Example:* ip route 10.0.50.0 255.255.255.0 192.168.1.2 *(Translation: To reach the 10.0.50.0 network, send the packet to the router sitting at 192.168.1.2).*

The Default Route: The most common static route in the world is the Default Route, pointed at the ISP. ip route 0.0.0.0 0.0.0.0 203.0.113.1 *(Translation: If you don't know where a packet goes, send it to the ISP).*

5. Dynamic Routing Protocols (OSPF)

In an enterprise with 50 routers, typing static routes by hand is impossible. You enable a Dynamic Routing Protocol. For the CCNA, the most important protocol is OSPF (Open Shortest Path First).
  1. 1. Hello Packets: When you turn OSPF on, the router shouts "Hello!" out of its cables to find neighbor routers.
  1. 2. The Database: The routers trade maps with each other. Every router builds a complete, identical mathematical map of the entire building.
  1. 3. The SPF Algorithm: The router runs a complex algorithm to calculate the "Shortest Path" to every destination based on bandwidth. A 10-Gigabit fiber cable is chosen over a 1-Megabit copper cable.
  1. 4. Convergence: When all routers agree on the map, the network is "Converged."

6. Administrative Distance (The Tie-Breaker)

What if the router is configured with a Static Route to 10.0.5.0, but OSPF *also* finds a dynamic route to 10.0.5.0? The router has two conflicting sets of directions. Which one does it trust?

It uses Administrative Distance (AD). AD is a measure of "Trustworthiness." The lower the number, the more trusted it is.

  • Directly Connected: AD = 0 (Absolute Trust)
  • Static Route: AD = 1 (A human typed it, highly trusted)
  • OSPF: AD = 110 (A math equation calculated it, moderately trusted)
  • RIP: AD = 120 (Old protocol, less trusted)

*In our scenario, the router will choose the Static Route because an AD of 1 beats an AD of 110.*

7. Routing Protocol Comparisons

  • Distance Vector (e.g., RIP): Old and dumb. It only knows how many "Hops" (routers) are in the way. It will choose a path crossing 2 slow routers over a path crossing 3 incredibly fast fiber-optic routers. It is obsolete.
  • Link-State (e.g., OSPF): Modern and intelligent. It builds a full topological map and calculates the cost of the path based on actual physical bandwidth speed.

8. Best Practices

  • Floating Static Routes: You can manipulate Administrative Distance for backups. You configure OSPF (AD 110) as your primary routing protocol. You also write a Static Route, but you manually change its AD to 200. Because 200 is worse than 110, the static route is hidden. But if OSPF crashes, the AD 110 route disappears, and the AD 200 Static Route automatically "floats" into the routing table to save the network!

9. Common Mistakes

  • Asymmetric Routing: A junior admin creates a Static Route on Router A pointing to Router B. The traffic flows perfectly. But the return traffic from Router B uses OSPF, which calculates a path through Router C. The traffic takes two different physical paths. This is called Asymmetric Routing, and it will instantly cause corporate Firewalls to block the connection because they cannot see both sides of the conversation.

10. Mini Project: Read a Routing Table

If you open a Cisco router's terminal and type show ip route, you will see codes on the left side of the screen.
  • C - 192.168.1.0/24 (Connected: This network is physically plugged into me).
  • S* - 0.0.0.0/0 (Static/Default: A human typed this route).
  • O - 10.5.5.0/24 [110/65] (OSPF: Learned dynamically. The 110 is the AD, the 65 is the bandwidth cost).
*By reading these codes, you instantly know how the router built its brain.*

11. Practice Exercises

  1. 1. Explain the operational difference between Static Routing and Dynamic Routing in terms of fault tolerance (adapting to a broken cable).
  1. 2. Why does a network router implicitly trust a Static Route more than a route learned via OSPF?

12. MCQs with Answers

Question 1

Which of the following Cisco routing mechanisms is utilized as a tie-breaker to determine the most "trustworthy" path when a router learns about the exact same destination network from two different routing protocols?

Question 2

In a small branch office with only one physical router connecting to the Internet Service Provider, which routing methodology is the most efficient and standard practice to implement?

13. Interview Questions

  • Q: Explain the concept of Administrative Distance. If a router has a Static Route (AD 1) and an OSPF route (AD 110) to the same /24 subnet, which path will be injected into the routing table and why?
  • Q: Differentiate between a Distance Vector protocol (like RIP) and a Link-State protocol (like OSPF) regarding how they calculate the "best" path.
  • Q: What is a "Floating Static Route," and how is it utilized to provide a backup path in an enterprise network design?

14. FAQs

Q: Do I need to learn RIP for the CCNA? A: Barely. Cisco officially removed deep RIP configuration from the modern CCNA because it is obsolete in the real world. However, you must still understand what it is (a Distance Vector protocol) and its Administrative Distance (120) for theoretical comparison against OSPF.

15. Summary

In Chapter 9, we explored the mechanisms that populate the routing table. We contrasted the manual, rigid security of Static Routes against the automated, fault-tolerant brilliance of Dynamic Routing Protocols like OSPF. We learned that OSPF utilizes Link-State bandwidth calculations to map the network, ensuring the fastest physical path is chosen. Crucially, we mastered the hierarchy of Administrative Distance (AD), understanding how the router acts as a judge, mathematically prioritizing directly connected networks and static configurations over dynamically learned algorithms.

16. Next Chapter Recommendation

You understand the theory of switching and routing. It is time to touch the actual hardware. Proceed to Chapter 10: Cisco IOS and CLI Basics.

Finish this Chapter

Save your progress on your learning path and prepare for coding interview challenges.

Discussion

Join the discussion

Log in or create a free account to participate.

Sort: ·