Skip to main content

Day 24: Dynamic Routing

CCNA 200-301 Study Guide: IP Connectivity

1.0 Introduction

IP Connectivity is the mechanism that enables communication between devices on different network segments. It is the core function of Layer 3 devices (routers and multilayer switches). In the CCNA 200-301 exam, this domain accounts for 25% of the total score.

2.0 Foundational Routing Methods: Static vs. Dynamic

The choice between static and dynamic routing impacts scalability, resiliency, and administrative overhead.

Feature

Static Routing

Dynamic Routing

Configuration

Manually defined by an administrator.

Automatically learned from neighbors.

Adaptability

Fixed; requires manual intervention if a link fails.

Automatically recalculates paths during topology changes.

Scalability

Low; impractical for large networks.

High; manages thousands of routes efficiently.

Resources

Low CPU/RAM requirements.

Requires CPU/RAM to run protocol algorithms.

Best Use Case

Stub networks or Default Gateways.

Large enterprise core/distribution layers.

3.0 Deconstructing Dynamic Routing Protocols

Dynamic protocols are classified by their Scope (where they run) and their Algorithm (how they calculate math).

3.1 Classification by Scope

  • Interior Gateway Protocol (IGP): Used within a single Autonomous System (AS).

    • Examples: OSPF, EIGRP, RIP, IS-IS.

  • Exterior Gateway Protocol (EGP): Used to connect different Autonomous Systems.

    • Example: BGP (The protocol of the Internet).

3.2 Classification by Algorithm

  • Distance Vector: "Routing by rumor." Routers only know what neighbors tell them.

    • Examples: RIP (Metric: Hop Count), EIGRP (Advanced Distance Vector).

  • Link State: Every router has a complete map of the topology.

    • Examples: OSPF, IS-IS (Metric: Cost/Bandwidth).

  • Path Vector: Specific to BGP; uses AS-Path information to prevent loops.

4.0 The Router's Path Selection Logic

When a router learns multiple paths to the same destination, it uses a strict three-step hierarchy to choose the best route for the Routing Table.

Step 1: Longest Prefix Match (LPM)

The router prefers the most specific route (the longest subnet mask). This rule overrides everything else.

  • Example: A packet destined for 10.1.1.5 matches both 10.0.0.0/8 and 10.1.1.0/24.

  • Winner: 10.1.1.0/24 because $24 > 8$.

Step 2: Administrative Distance (AD)

If prefix lengths are identical, the router chooses the most "trustworthy" source.

Route Source

Default AD

Connected

0

Static

1

EIGRP (Internal)

90

OSPF

110

RIP

120

Step 3: Metric

If the prefix length and AD are identical, the router chooses the path with the lowest cost (metric) calculated by the protocol.

5.0 Advanced Routing Concepts

5.1 Floating Static Routes

A Floating Static Route is a backup route with a manually configured AD higher than the primary dynamic protocol.

  • Primary: OSPF (AD 110)

  • Backup: Static Route (AD 111)

  • Logic: The static route "floats" (stays out of the table) until the OSPF route fails.

  • Command: ip route 10.0.2.0 255.255.255.0 192.168.1.1 111

5.2 Equal-Cost Multi-Path (ECMP)

If multiple paths have the same Prefix Length, same AD, and same Metric, the router installs all of them and load-balances traffic across them.

6.0 Essential Command Reference

6.1 Verification

Command

Purpose

show ip route

View the IPv4 routing table.

traceroute <ip>

Trace the hop-by-hop path to a destination.

show ip protocols

Verify dynamic routing protocol parameters and AD.

6.2 Configuration

  • Standard Static Route:
    ip route <network> <mask> <next-hop-ip>

  • Default Route (Gateway of Last Resort):
    ip route 0.0.0.0 0.0.0.0 <next-hop-ip>

  • Loopback Interface (Stable Management IP):
    interface Loopback0

7.0 TL;DR Summary

  1. Selection Logic: Longest Match $\rightarrow$ Lowest AD $\rightarrow$ Lowest Metric.

  2. Distance Vector protocols see neighbors; Link State protocols see the whole map.

  3. Floating Static Routes are created by increasing the AD of a static route to exceed the dynamic protocol's AD.

  4. BGP is the only EGP; it is a Path Vector protocol.