Routing Protocols

Routing Protocols

Overview

This document covers the types and characteristics of dynamic routing protocols. You'll learn about the operating principles of major routing protocols such as RIP, OSPF, and BGP, and understand the appropriate environments for each protocol.

Difficulty: ⭐⭐⭐ Estimated Learning Time: 3-4 hours Prerequisites: 08_Routing_Basics.md


Table of Contents

  1. Classification of Routing Protocols
  2. Distance Vector vs Link State
  3. RIP (Routing Information Protocol)
  4. OSPF (Open Shortest Path First)
  5. BGP (Border Gateway Protocol)
  6. AS (Autonomous System)
  7. Practice Problems
  8. Next Steps
  9. References

1. Classification of Routing Protocols

1.1 IGP vs EGP

Routing protocols are classified into IGP and EGP based on their scope of use.

                    Routing Protocol Classification

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          Internet                                β”‚
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚      AS 100      β”‚   EGP    β”‚      AS 200      β”‚            β”‚
β”‚  β”‚                  │◄────────►│                  β”‚            β”‚
β”‚  β”‚    (e.g., KT)    β”‚   BGP    β”‚   (e.g., SKT)    β”‚            β”‚
β”‚  β”‚                  β”‚          β”‚                  β”‚            β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”  β”‚          β”‚  β”Œβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”  β”‚            β”‚
β”‚  β”‚  β”‚ R1 │─│ R2 β”‚  β”‚          β”‚  β”‚ R3 │─│ R4 β”‚  β”‚            β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”˜  β”‚          β”‚  β””β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”˜  β”‚            β”‚
β”‚  β”‚       IGP       β”‚          β”‚       IGP       β”‚            β”‚
β”‚  β”‚   (OSPF/RIP)    β”‚          β”‚   (OSPF/RIP)    β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Aspect IGP (Interior Gateway Protocol) EGP (Exterior Gateway Protocol)
Scope Within AS Between ASes
Purpose Optimal path in internal network External network connection policy
Protocols RIP, OSPF, EIGRP, IS-IS BGP
Metrics Hop count, bandwidth, delay, etc. Path Attributes

1.2 Classification by Algorithm

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Routing Algorithm Classification               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚      Distance Vector      β”‚           Link State                β”‚
β”‚                           β”‚                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ RIP                     β”‚ β€’ OSPF                              β”‚
β”‚ β€’ EIGRP (Hybrid)          β”‚ β€’ IS-IS                             β”‚
β”‚                           β”‚                                     β”‚
β”‚ Features:                 β”‚ Features:                           β”‚
β”‚ - Exchange info with      β”‚ - Understand entire topology        β”‚
β”‚   neighbors               β”‚ - Dijkstra algorithm                β”‚
β”‚ - Bellman-Ford algorithm  β”‚ - Complex, more resources           β”‚
β”‚ - Simple, fewer resources β”‚ - Fast convergence                  β”‚
β”‚ - Slow convergence        β”‚                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Path Vector                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ BGP                                                           β”‚
β”‚                                                                  β”‚
β”‚ Features:                                                       β”‚
β”‚ - Transmits AS path information                                 β”‚
β”‚ - Policy-based routing                                          β”‚
β”‚ - Used in Internet backbone                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

1.3 Classful vs Classless

Aspect Classful Classless
Subnet Mask Not transmitted Transmitted together
VLSM Support X O
CIDR Support X O
Protocols RIPv1, IGRP RIPv2, OSPF, EIGRP, BGP

2.1 Distance Vector

"Trust the information my neighbors tell me"

                    Distance Vector Operation

Initial State:
    R1 ─── R2 ─── R3 ─── R4
   [A]    [ ]    [ ]    [D]

Step 1: Advertise routing table to neighbors
    R1: "Distance to A is 0"  ──►  R2
    R4: "Distance to D is 0"  ──►  R3

Step 2: Received info + 1 (hop count)
    R2: "Distance to A is 1" (via R1)
    R3: "Distance to D is 1" (via R4)

Step 3: Advertise again to neighbors
    R2: "Distance to A is 1"  ──►  R3
    R3: "Distance to D is 1"  ──►  R2

Step 4: Final Convergence
    R1: A(0), D(3)
    R2: A(1), D(2)
    R3: A(2), D(1)
    R4: A(3), D(0)

Advantages: - Simple implementation - Low CPU/memory usage - Suitable for small networks

Disadvantages: - Slow convergence - Potential for routing loops - Hop count limitation (RIP: 15)

"I understand the entire network myself"

                    Link State Operation

Network Topology:
         10          5           15
    R1 ────── R2 ────── R3 ────── R4
     β”‚                            β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  20

Step 1: Each router generates LSA (Link State Advertisement)
    R1's LSA: "R1 connected: R2(cost 10), R4(cost 20)"
    R2's LSA: "R2 connected: R1(cost 10), R3(cost 5)"
    ...

Step 2: Flood LSAs to all routers
    All routers maintain identical LSDB (Link State Database)

Step 3: Calculate shortest path with Dijkstra algorithm
    R1 β†’ R4 paths:
    - R1 β†’ R4 direct: cost 20
    - R1 β†’ R2 β†’ R3 β†’ R4: cost 10+5+15 = 30
    Selected: Direct path (cost 20)

SPF (Shortest Path First) Tree Example:

R1's SPF Tree:

                R1 (root)
               /   \
         (10) /     \ (20)
             /       \
           R2        R4
           |
      (5)  |
           |
          R3
           |
     (15)  |
           |
          R4 (duplicate - higher cost, ignored)

Advantages: - Fast convergence - Accurate topology information - No routing loops - VLSM/CIDR support

Disadvantages: - High CPU/memory requirements - Complex configuration - Initial flooding consumes bandwidth

2.3 Comparison Summary

Feature Distance Vector Link State
Information Shared Routing table Link state (topology)
Algorithm Bellman-Ford Dijkstra
Updates Periodic (complete) On change (changes only)
Convergence Speed Slow Fast
Resources Low High
Scalability Low High
Representative Protocols RIP, EIGRP OSPF, IS-IS

3. RIP (Routing Information Protocol)

3.1 RIP Overview

RIP is the oldest distance vector routing protocol, simple but limited.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       RIP Features                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β€’ Metric: Hop Count                                            β”‚
β”‚  β€’ Maximum Hops: 15 (16 = unreachable)                          β”‚
β”‚  β€’ Update Interval: 30 seconds                                  β”‚
β”‚  β€’ Administrative Distance (AD): 120                            β”‚
β”‚  β€’ Port: UDP 520                                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3.2 RIP Version Comparison

Feature RIPv1 RIPv2
Class Classful Classless
Subnet Mask Not transmitted Transmitted
VLSM Not supported Supported
CIDR Not supported Supported
Authentication None Supported (MD5)
Transmission Broadcast Multicast (224.0.0.9)

3.3 RIP Operation Process

RIP Routing Update Example

Network Configuration:
    Network A          Network B          Network C
   10.0.0.0/24        10.1.0.0/24        10.2.0.0/24
       β”‚                  β”‚                  β”‚
    β”Œβ”€β”€β”΄β”€β”€β”            β”Œβ”€β”€β”΄β”€β”€β”            β”Œβ”€β”€β”΄β”€β”€β”
    β”‚ R1  │────────────│ R2  │────────────│ R3  β”‚
    β””β”€β”€β”€β”€β”€β”˜            β””β”€β”€β”€β”€β”€β”˜            β””β”€β”€β”€β”€β”€β”˜

Initial Routing Table:

R1:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Network        β”‚ Hops β”‚ Next Hop  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 10.0.0.0/24    β”‚ 0    β”‚ Direct    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

After 30 seconds (R2 receives updates from R1 and R3):

R2:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Network        β”‚ Hops β”‚ Next Hop  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 10.0.0.0/24    β”‚ 1    β”‚ R1        β”‚
β”‚ 10.1.0.0/24    β”‚ 0    β”‚ Direct    β”‚
β”‚ 10.2.0.0/24    β”‚ 1    β”‚ R3        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

After 60 seconds (convergence complete):

R1:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Network        β”‚ Hops β”‚ Next Hop  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 10.0.0.0/24    β”‚ 0    β”‚ Direct    β”‚
β”‚ 10.1.0.0/24    β”‚ 1    β”‚ R2        β”‚
β”‚ 10.2.0.0/24    β”‚ 2    β”‚ R2        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3.4 RIP Timers

Timer Value Description
Update 30s Routing update transmission interval
Invalid 180s Time until route marked invalid
Holddown 180s Time to prevent route changes
Flush 240s Time to delete from routing table

3.5 RIP Loop Prevention Mechanisms

1. Split Horizon
   - Don't advertise route back through interface it was learned

       R1 ──────── R2
       β”‚
   "Learned 10.0.0.0 from R1,
    won't advertise 10.0.0.0 back to R1"

2. Route Poisoning
   - Advertise down routes with metric 16

   R1: "10.0.0.0 is down"
   R1 β†’ R2: "10.0.0.0 metric=16 (unreachable)"

3. Holddown Timer
   - After route goes down, refuse new routes for period
   - Prevents propagation of incorrect information

4. Triggered Update
   - Send update immediately when change occurs
   - Fast convergence without waiting 30 seconds

3.6 RIP Configuration Examples

Cisco Router:

Router(config)# router rip
Router(config-router)# version 2
Router(config-router)# network 10.0.0.0
Router(config-router)# network 192.168.1.0
Router(config-router)# no auto-summary

Linux (Quagga/FRR):

router rip
 version 2
 network 10.0.0.0/8
 network 192.168.1.0/24
 no auto-summary

4. OSPF (Open Shortest Path First)

4.1 OSPF Overview

OSPF is the most widely used link state routing protocol.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       OSPF Features                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β€’ Metric: Cost = Reference Bandwidth / Interface Bandwidth     β”‚
β”‚  β€’ Reference Bandwidth: Default 100 Mbps                        β”‚
β”‚  β€’ Administrative Distance (AD): 110                            β”‚
β”‚  β€’ Protocol: IP Protocol 89                                     β”‚
β”‚  β€’ Multicast: 224.0.0.5 (AllSPFRouters)                        β”‚
β”‚               224.0.0.6 (AllDRouters)                           β”‚
β”‚  β€’ Area-based hierarchical structure                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4.2 OSPF Cost Calculation

OSPF Cost = Reference Bandwidth (100 Mbps) / Interface Bandwidth

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Interface Type      β”‚ Bandwidth     β”‚ OSPF Cost  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Serial (T1)         β”‚ 1.544 Mbps    β”‚ 64         β”‚
β”‚ Ethernet            β”‚ 10 Mbps       β”‚ 10         β”‚
β”‚ Fast Ethernet       β”‚ 100 Mbps      β”‚ 1          β”‚
β”‚ Gigabit Ethernet    β”‚ 1000 Mbps     β”‚ 1 (default)β”‚
β”‚ 10 Gigabit Ethernet β”‚ 10000 Mbps    β”‚ 1 (default)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β€» For Gig+, reference bandwidth adjustment needed (e.g., 10000 Mbps)

4.3 OSPF Areas

                    OSPF Area Structure

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                                  β”‚
β”‚                         Area 0                                   β”‚
β”‚                      (Backbone)                                  β”‚
β”‚                                                                  β”‚
β”‚            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      β”‚
β”‚            β”‚                             β”‚                      β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”             β”‚
β”‚    β”‚   ABR    β”‚    β”‚   ABR   β”‚    β”‚     ABR      β”‚             β”‚
β”‚    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚         β”‚               β”‚                 β”‚                      β”‚
β”‚    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚    β”‚ Area 1  β”‚    β”‚ Area 2  β”‚    β”‚   Area 3    β”‚              β”‚
β”‚    β”‚         β”‚    β”‚         β”‚    β”‚             β”‚              β”‚
β”‚    β”‚ R1──R2  β”‚    β”‚ R3──R4  β”‚    β”‚  R5──R6     β”‚              β”‚
β”‚    β”‚         β”‚    β”‚         β”‚    β”‚             β”‚              β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

ABR: Area Border Router

Purpose of Areas: - Reduce LSDB size - Limit SPF calculation scope - Reduce routing updates - Improve network stability

Area Types:

Area Type Description
Backbone (Area 0) Central area, connects all areas
Standard Area Regular area
Stub Area Blocks external routes, uses default route
Totally Stubby Blocks external + other area routes
NSSA Allows limited external routes

4.4 OSPF Router Types

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     OSPF Router Roles                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Internal Router  β”‚ Operates within single area                  β”‚
β”‚                  β”‚                                              β”‚
β”‚ ABR              β”‚ Area Border Router                           β”‚
β”‚                  β”‚ Connected to multiple areas, exchanges       β”‚
β”‚                  β”‚ routing info between areas                   β”‚
β”‚                  β”‚                                              β”‚
β”‚ ASBR             β”‚ AS Boundary Router                           β”‚
β”‚                  β”‚ Connected to external routing domain         β”‚
β”‚                  β”‚                                              β”‚
β”‚ Backbone Router  β”‚ Router in Area 0                            β”‚
β”‚                  β”‚                                              β”‚
β”‚ DR               β”‚ Designated Router                            β”‚
β”‚                  β”‚ Representative router on multi-access networkβ”‚
β”‚                  β”‚                                              β”‚
β”‚ BDR              β”‚ Backup Designated Router                     β”‚
β”‚                  β”‚ DR backup                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4.5 OSPF Packet Types

Type Name Description
1 Hello Neighbor discovery and relationship maintenance
2 DBD (Database Description) Exchange LSDB summary information
3 LSR (Link State Request) Request specific LSA
4 LSU (Link State Update) Transmit LSA
5 LSAck LSA receipt acknowledgment

4.6 OSPF Neighbor States

OSPF Neighbor Relationship Establishment

Down β†’ Init β†’ 2-Way β†’ ExStart β†’ Exchange β†’ Loading β†’ Full

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Down      : Initial state, no Hello received                   β”‚
β”‚  Init      : Hello received, bidirectional not confirmed        β”‚
β”‚  2-Way     : Bidirectional communication confirmed (DR/BDR elect)β”‚
β”‚  ExStart   : Master/Slave decision, sequence number exchange    β”‚
β”‚  Exchange  : Exchange LSDB summary via DBD packets              β”‚
β”‚  Loading   : Request and receive missing LSAs via LSR/LSU       β”‚
β”‚  Full      : LSDB synchronized, neighbor relationship establishedβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4.7 OSPF Configuration Examples

Cisco Router:

Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0 0.255.255.255 area 0
Router(config-router)# network 192.168.1.0 0.0.0.255 area 1

Linux (FRR):

router ospf
 network 10.0.0.0/8 area 0.0.0.0
 network 192.168.1.0/24 area 0.0.0.1

5. BGP (Border Gateway Protocol)

5.1 BGP Overview

BGP is the path vector protocol used for inter-AS routing on the Internet backbone.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       BGP Features                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β€’ Type: Path Vector protocol                                   β”‚
β”‚  β€’ Purpose: Inter-AS routing (EGP)                              β”‚
β”‚  β€’ Port: TCP 179                                                β”‚
β”‚  β€’ Administrative Distance: eBGP=20, iBGP=200                   β”‚
β”‚  β€’ Path Selection: Policy-based (Path Attributes)               β”‚
β”‚  β€’ Current Version: BGP-4                                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

5.2 eBGP vs iBGP

                    eBGP and iBGP

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚       AS 100         β”‚        β”‚       AS 200         β”‚
β”‚                      β”‚        β”‚                      β”‚
β”‚   R1 ◄──── iBGP ────► R2 ◄── eBGP ──► R3 ◄── iBGP ──► R4
β”‚                      β”‚        β”‚                      β”‚
β”‚  (Within same AS)    β”‚        β”‚  (Within same AS)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                                    β”‚
        └──────────── eBGP β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 (Between different ASes)

eBGP (External BGP):
- Connection between different ASes
- AD: 20 (high trust)
- Typically directly connected

iBGP (Internal BGP):
- Connection between BGP routers in same AS
- AD: 200 (low trust)
- Requires full mesh or Route Reflector

5.3 BGP Path Attributes

Attribute Type Description
AS_PATH Well-known Mandatory List of ASes path traversed
NEXT_HOP Well-known Mandatory Next hop IP address
ORIGIN Well-known Mandatory Route origin (IGP/EGP/Incomplete)
LOCAL_PREF Well-known Discretionary Local preference (iBGP use)
MED Optional Non-transitive Multi-Exit Discriminator
COMMUNITY Optional Transitive Route grouping tag

5.4 BGP Path Selection Process

BGP Best Path Selection Algorithm

1. Weight (higher preferred) - Cisco proprietary
2. LOCAL_PREF (higher preferred)
3. Locally Originated (prefer self-generated routes)
4. AS_PATH (shorter preferred)
5. ORIGIN (IGP > EGP > Incomplete)
6. MED (lower preferred)
7. eBGP over iBGP
8. IGP metric (cost to next hop)
9. Oldest route
10. Router ID (lower preferred)
11. Neighbor IP (lower preferred)

Example:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Route A: AS_PATH = 100 200 300, LOCAL_PREF = 100  β”‚
β”‚ Route B: AS_PATH = 400 500, LOCAL_PREF = 200      β”‚
β”‚                                                     β”‚
β”‚ Selected: Route B (higher LOCAL_PREF)              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

5.5 BGP Message Types

Message Description
OPEN BGP session establishment, parameter exchange
UPDATE Advertise/withdraw route information
KEEPALIVE Connection maintenance check (60 second interval)
NOTIFICATION Error notification, session termination

5.6 BGP States

BGP State Transition

Idle β†’ Connect β†’ OpenSent β†’ OpenConfirm β†’ Established

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Idle        : Initial state, start TCP connection              β”‚
β”‚  Connect     : Waiting for TCP connection                       β”‚
β”‚  Active      : TCP connection retry (if Connect fails)          β”‚
β”‚  OpenSent    : OPEN message sent, waiting for response          β”‚
β”‚  OpenConfirm : OPEN message received, waiting for KEEPALIVE     β”‚
β”‚  Established : BGP session established, route exchange starts   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

5.7 BGP Configuration Examples

Cisco Router (eBGP):

Router(config)# router bgp 100
Router(config-router)# neighbor 203.0.113.1 remote-as 200
Router(config-router)# network 10.0.0.0 mask 255.0.0.0

Linux (FRR):

router bgp 100
 neighbor 203.0.113.1 remote-as 200
 address-family ipv4 unicast
  network 10.0.0.0/8
 exit-address-family

6. AS (Autonomous System)

6.1 What is AS?

An AS (Autonomous System) is a collection of networks under a single administrative domain with common routing policy.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    AS (Autonomous System)                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  Definition:                                                    β”‚
β”‚  - Collection of IP networks and routers managed by single org  β”‚
β”‚  - Follows common routing policy                                β”‚
β”‚  - Identified by unique AS number (ASN)                         β”‚
β”‚                                                                  β”‚
β”‚  Examples:                                                      β”‚
β”‚  - ISPs (KT, SKT, LGU+)                                        β”‚
β”‚  - Large enterprises                                            β”‚
β”‚  - Cloud providers (AWS, GCP, Azure)                            β”‚
β”‚  - Content providers (Netflix, Google)                          β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

6.2 AS Numbers (ASN)

Range Type Description
1 - 64,495 Public 2-byte Usable on Internet
64,496 - 64,511 Documentation For RFC document examples
64,512 - 65,534 Private 2-byte Internal use
65,535 Reserved Not usable
1 - 4,199,999,999 Public 4-byte Extended AS numbers
4,200,000,000 - 4,294,967,294 Private 4-byte Internal use

Famous AS Number Examples:

ASN Organization
AS7018 AT&T
AS15169 Google
AS16509 Amazon
AS32934 Facebook
AS4766 KT
AS9318 SKT

6.3 Inter-AS Relationships

                    AS Peering Relationships

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                                  β”‚
β”‚  1. Transit:                                                    β”‚
β”‚     - Large ISP provides Internet connectivity to smaller ISP   β”‚
β”‚     - Paid relationship                                         β”‚
β”‚                                                                  β”‚
β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                                 β”‚
β”‚     β”‚ Tier 1  β”‚  ← Payment                                      β”‚
β”‚     β”‚   ISP   β”‚                                                 β”‚
β”‚     β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜                                                 β”‚
β”‚          β”‚ Transit                                               β”‚
β”‚     β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”                                                 β”‚
β”‚     β”‚ Tier 2  β”‚                                                 β”‚
β”‚     β”‚   ISP   β”‚                                                 β”‚
β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                                 β”‚
β”‚                                                                  β”‚
β”‚  2. Peering:                                                    β”‚
β”‚     - Free traffic exchange between peer ISPs                   β”‚
β”‚     - Connection at IXP (Internet Exchange Point)               β”‚
β”‚                                                                  β”‚
β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   Free Exchange   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚     β”‚  AS A   │◄─────────────────►│  AS B   β”‚                  β”‚
β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     (Peering)     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

6.4 Internet Hierarchy

                    Internet AS Hierarchy

                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚   Tier 1    β”‚  ← Can reach entire Internet
                     β”‚ (Global ISP)β”‚    No need to buy transit
                     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚             β”‚             β”‚
         β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
         β”‚ Tier 2  β”‚  β”‚ Tier 2  β”‚  β”‚ Tier 2  β”‚  ← Regional ISP
         β”‚         β”‚  β”‚         β”‚  β”‚         β”‚    Buy transit
         β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜    from Tier 1
              β”‚             β”‚             β”‚
         β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
         β”‚ Tier 3  β”‚  β”‚ Tier 3  β”‚  β”‚ Tier 3  β”‚  ← Local ISP
         β”‚         β”‚  β”‚         β”‚  β”‚         β”‚    End-user
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    services

Tier 1 Examples: AT&T, NTT, Cogent, Lumen
Tier 2 Examples: Large regional ISPs
Tier 3 Examples: Small regional ISPs, cable operators

7. Practice Problems

Problem 1: Protocol Feature Matching

Match the following features with their corresponding protocol.

Features:
a) Maximum hop count 15
b) Uses Dijkstra algorithm
c) Used for inter-AS routing
d) Sends complete routing table every 30 seconds
e) Area-based hierarchical structure
f) Uses TCP port 179

Protocols: RIP, OSPF, BGP

Problem 2: OSPF Cost Calculation

Calculate the total OSPF cost for the following path when reference bandwidth is 100 Mbps.

R1 ──(FastEthernet)── R2 ──(Serial T1)── R3 ──(GigabitEthernet)── R4
        100 Mbps           1.544 Mbps          1000 Mbps

Problem 3: BGP Path Selection

Which of the following two BGP routes will be selected?

Route A:
- AS_PATH: 100 200 300
- LOCAL_PREF: 150
- MED: 100

Route B:
- AS_PATH: 400 500
- LOCAL_PREF: 150
- MED: 50

Problem 4: Routing Protocol Selection

Select the appropriate routing protocol for each scenario and explain why.

a) Small office with 10 routers b) Large enterprise network with 500 routers c) Connection between two ISPs d) Branch office network with single path


Answers

Problem 1 Answers

  • a) Maximum hop count 15 β†’ RIP
  • b) Dijkstra algorithm β†’ OSPF
  • c) Inter-AS routing β†’ BGP
  • d) 30 second table broadcast β†’ RIP
  • e) Area-based structure β†’ OSPF
  • f) TCP 179 β†’ BGP

Problem 2 Answer

FastEthernet: 100 / 100 = 1
Serial T1:    100 / 1.544 = 64 (rounded)
GigabitEthernet: 100 / 1000 = 1 (minimum 1)

Total cost = 1 + 64 + 1 = 66

Problem 3 Answer

Route B selected

Analysis: 1. LOCAL_PREF: Both 150 (tie) 2. AS_PATH length: Route A = 3, Route B = 2 β†’ Route B selected for shorter AS_PATH

(MED only used for comparing routes from same neighbor AS)

Problem 4 Answers

a) Small office (10 routers): RIP or Static Routing - Suitable for simple networks - Easy configuration and management

b) Large enterprise (500 routers): OSPF - Fast convergence - Scalability via area division - VLSM/CIDR support

c) ISP interconnection: BGP - Standard for inter-AS routing - Policy-based path control

d) Single path branch: Static Routing (+ default route) - Dynamic routing unnecessary - Resource saving


8. Next Steps

Once you understand routing protocols, move on to the transport layer.

Next Lesson

  1. Configure OSPF in GNS3/Packet Tracer
  2. Analyze routing tables with show ip route
  3. Check Internet routes with BGP Looking Glass

9. References

RFC Documents

  • RFC 2453 - RIP Version 2
  • RFC 2328 - OSPF Version 2
  • RFC 4271 - BGP-4
  • RFC 1930 - AS Operation Guidelines

Useful Tools

# BGP route lookup
# BGP Looking Glass: https://lg.he.net/

# AS information lookup
whois -h whois.radb.net AS15169

# Path tracing
traceroute -A google.com    # Show AS numbers (Linux)
mtr google.com              # Real-time trace

Learning Resources

Simulators

  • GNS3 - Uses actual router images
  • Cisco Packet Tracer - Free learning simulator
  • EVE-NG - Virtual network lab

Document Information - Last Updated: 2024 - Difficulty: ⭐⭐⭐ - Estimated Learning Time: 3-4 hours

to navigate between lessons