Lesson 1 of 5

Routing Protocol Comparison

Lab Objectives

  • Compare the operational differences between RIP, EIGRP, OSPF, and BGP — administrative distance, metric calculation, and typical use-cases.
  • Configure a small example EIGRP and OSPF setup on the base topology to illustrate AD and metric behavior.
  • Verify routes and interpret routing table entries to determine which protocol is preferred.

ASCII Topology (BASE LAB TOPOLOGY — exact IPs on every interface)

                    [Internet]
                    203.0.113.1
                         |
                      R1 (Gateway)
                 Gi0/0: 10.10.10.1
                 Gi0/1: 10.10.20.1
                 Gi0/2: 10.10.30.1
                  /     |     \
                R2      R3      R4
  Gi0/0: 10.10.10.2   Gi0/1:10.10.20.2  Gi0/0: 10.10.30.2
  Gi0/1: 10.10.40.1
             /  \      |      /
           S1    S2    S3    S4
          /  \    |   /  \   /  \
        PC1  PC2 PC3 PC4  PC5 PC6

IP Scheme (exact):

  • 10.10.10.0/24 — R1-R2 link (R1 Gi0/0: 10.10.10.1, R2 Gi0/0: 10.10.10.2)
  • 10.10.20.0/24 — R1-R3 link (R1 Gi0/1: 10.10.20.1, R3 Gi0/1: 10.10.20.2)
  • 10.10.30.0/24 — R1-R4 link (R1 Gi0/2: 10.10.30.1, R4 Gi0/0: 10.10.30.2)
  • 10.10.40.0/24 — R2-S1 link (R2 Gi0/1: 10.10.40.1)
  • 192.168.1.0/24 — VLAN 10 (Sales)
  • 192.168.2.0/24 — VLAN 20 (Engineering)
  • 192.168.3.0/24 — VLAN 30 (Management)
  • 203.0.113.0/24 — Public/Internet simulation

Tip: Think of routing protocols like different courier services. Each has a way of calculating "cost" (metric) and a reputation score (Administrative Distance). Lower AD = higher trust; lower metric = preferred path within that protocol.

Lab Tasks (Try It Yourself First!)

Complete these tasks WITHOUT looking at the solution below. Use ? and show commands to figure it out.

Task 1: Configure EIGRP between R1 and R2

On R1 and R2, enable EIGRP process AS 111 and advertise the directly connected networks on those routers: the 10.10.10.0/24 link and R2's 10.10.40.0/24 network.

Task 2: Configure OSPF between R1, R3, and R4

On R1, R3 and R4 enable OSPF process 1. Advertise each point-to-point link (10.10.20.0/24 and 10.10.30.0/24) into area 0 and set a fixed router-id on R1 and R3.

Task 3: Observe routing preference and metrics

Inspect the routing table on R1 and R2. Identify which routes are chosen when networks are known by multiple protocols, and list the Administrative Distance and metric used by each chosen route.

Think About It: Why would a network operator prefer OSPF in a data center but EIGRP in a small campus? Consider convergence behavior, metric granularity, and scaling.


Lab Solution

Task 1 Solution: Configure EIGRP between R1 and R2

What we are doing: Enable EIGRP AS 111 on R1 and R2 so they exchange routes for 10.10.10.0/24 and 10.10.40.0/24. EIGRP will build neighbor adjacencies on the shared 10.10.10.0 segment and advertise R2's LAN 10.10.40.0.

! On R1
router eigrp 111
 network 10.10.10.0
! On R2
router eigrp 111
 network 10.10.10.0
 network 10.10.40.0

What just happened:

  • router eigrp 111 — starts EIGRP with autonomous system number 111. EIGRP neighbors only form when AS numbers match.
  • network 10.10.10.0 / network 10.10.40.0 — tells the EIGRP process which interfaces/networks to advertise. EIGRP will bring up adjacency on interfaces whose IPs match these networks.

Verify:

! On R1 (expected output)
show ip route
R1# show ip route
Codes: C - connected, S - static, D - EIGRP, O - OSPF

C    10.10.10.0/24 is directly connected, GigabitEthernet0/0
D    10.10.40.0/24 [90/2172416] via 10.10.10.2, 00:00:12, GigabitEthernet0/0
  • The D route shows EIGRP learned route to 10.10.40.0 with AD 90 and an EIGRP composite metric (here shown as 2172416).

Why this matters: EIGRP uses bandwidth, delay (and by default composite metric) to select the best path. Administrative Distance 90 makes it more trusted than OSPF (110) and RIP (120).

Task 2 Solution: Configure OSPF between R1, R3, and R4

What we are doing: Enable OSPF process 1 on R1, R3 and R4, advertise the point-to-point links into area 0 and set router-ids so OSPF neighbors can identify themselves.

! On R1
router ospf 1
 router-id 0.0.0.1
 network 10.10.20.0 0.0.0.255 area 0
 network 10.10.30.0 0.0.0.255 area 0

! On R3
router ospf 1
 router-id 0.0.0.3
 network 10.10.20.0 0.0.0.255 area 0

! On R4
router ospf 1
 router-id 0.0.0.4
 network 10.10.30.0 0.0.0.255 area 0

What just happened:

  • router ospf 1 — starts OSPF process 1.
  • router-id — sets a fixed OSPF Router ID; used to uniquely identify routers in LSAs. Useful in troubleshooting and predictable behavior.
  • network ... area 0 — tells OSPF which interfaces to enable OSPF on and assigns them to area 0. OSPF will form adjacencies and exchange LSAs for those networks.

Verify:

! On R1 (expected output)
show ip ospf neighbor
R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
0.0.0.3          1    FULL/DR         00:00:38    10.10.20.2      GigabitEthernet0/1
0.0.0.4          1    FULL/DR         00:00:34    10.10.30.2      GigabitEthernet0/2
  • FULL indicates full adjacency. OSPF Hello interval defaults apply (10s on broadcast networks unless changed).

Task 3 Solution: Observe routing preference and metrics

What we are doing: Inspect routing tables and protocol information to identify chosen routes and their ADs/metrics.

! On R1
show ip route
show ip protocols

What just happened / Expected output (examples):

R1# show ip route
Codes: C - connected, S - static, D - EIGRP, O - OSPF

C    10.10.10.0/24 is directly connected, GigabitEthernet0/0
O    10.10.20.0/24 [110/11] via 10.10.20.2, 00:00:12, GigabitEthernet0/1
O    10.10.30.0/24 [110/11] via 10.10.30.2, 00:00:12, GigabitEthernet0/2
D    10.10.40.0/24 [90/2172416] via 10.10.10.2, 00:00:12, GigabitEthernet0/0

R1# show ip protocols
R1# show ip protocols
Routing Protocol is "ospf 1"
  Router ID 0.0.0.1
  Network 10.10.20.0 0.0.0.255 area 0
  Network 10.10.30.0 0.0.0.255 area 0

Routing Protocol is "eigrp 111"
  AS number 111
  Networks:
    10.10.10.0
  • The table shows OSPF routes for 10.10.20.0/24 and 10.10.30.0/24 with AD 110 and OSPF metric (cost) of 11.
  • EIGRP route for 10.10.40.0/24 has AD 90 and composite metric.

Key facts (first introduced in bold):

  • Administrative Distance (AD): Ranks trust of routing sources. Typical defaults — Connected 0, Static 1, EIGRP (internal) 90, OSPF 110, RIP 120, External EIGRP 170, iBGP 200, eBGP 20.
  • Metric: How each protocol picks best path inside itself:
    • RIP: hop count (max 15), simple and old, good for tiny networks.
    • EIGRP: composite of bandwidth and delay (fast, supports unequal-cost load sharing), suitable for Cisco-heavy campuses.
    • OSPF: cost based primarily on interface bandwidth, scales well in hierarchical designs and data centers.
    • BGP: path-vector with many attributes (AS-PATH, LOCAL_PREF, MED) — used for Internet and large-scale inter-domain routing.

Troubleshooting Scenario

Scenario: OSPF neighbor on R1 and R3 does not reach FULL

Symptom: show ip ospf neighbor on R1 shows only R4 as FULL; R3 is stuck in 2WAY or EXSTART. Your task: Find and fix the issue. Hint: Check router-ids and area configuration; also ensure IP addressing and wildcard masks match the intended interface.

Solution:

  • Problem often caused by mismatched area assignment or a missing network statement on R3 for 10.10.20.0.
  • Fix on R3:
! On R3
router ospf 1
 network 10.10.20.0 0.0.0.255 area 0
  • Verify:
R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
0.0.0.3          1    FULL/DR         00:00:38    10.10.20.2      GigabitEthernet0/1
  • Explanation: OSPF only forms adjacencies on interfaces enabled in the OSPF process (via network statements). If R3's interface isn't in OSPF, no neighbor adjacency will fully form.

Verification Checklist

  • EIGRP neighbors formed between R1 and R2 (show ip eigrp neighbors)
  • OSPF neighbors FULL between R1-R3 and R1-R4 (show ip ospf neighbor)
  • Routing table on R1 shows OSPF routes for 10.10.20.0/24 and 10.10.30.0/24 and EIGRP route for 10.10.40.0/24 (show ip route)

Common Mistakes

SymptomCauseFix
OSPF adjacency stuck in 2WAYMismatched area or missing network statementAdd correct network ... area 0 and ensure IP subnet matches
EIGRP routes not appearingAS mismatch or missing network commandVerify router eigrp <AS> on both routers and network statements
Route from one protocol preferred unexpectedlyAdministrative Distance orderingUnderstand AD; change AD or use redistribution/policy if intentional
OSPF routers have duplicate router-idsRouter-ID conflict leads to LSA issuesSet unique router-id manually on each OSPF router

Challenge Task

Extend the topology by advertising the Internet prefix 203.0.113.0/24 on R1 into both OSPF and EIGRP (without redistribution). Make remote routers prefer the egress to Internet via R1's link but demonstrate how AD would influence selection if the prefix were redistributed. No step-by-step — configure and explain your decisions.