Static vs Dynamic routing

1. What is Routing?

  • Definition:
    Routing is the process of determining the best path for data packets to travel across networks.
  • Types of Routing:
    • Static Routing: Manually configured routes.
    • Dynamic Routing: Automatically updated routes using protocols.

2. Static Routing

  • Definition:
    A routing method where routes are manually added to the routing table by an administrator.
  • Key Characteristics:
    • Manual Configuration: Routes must be added and updated manually.
    • No Overhead: Requires no extra CPU or bandwidth for route discovery.
    • Fixed Paths: Routes do not change unless manually updated.
    • Best for Small Networks: Ideal for simple, predictable networks.
  • Advantages:
    1. Simple to implement in small networks.
    2. No additional resources (CPU, memory, or bandwidth) required.
    3. Provides more control to administrators.
  • Disadvantages:
    1. Time-consuming to configure and maintain in large networks.
    2. Not scalable for dynamic or large networks.
    3. No automatic failover; manual intervention is needed if a route goes down.
  • Example Command:
    In Cisco routers: ip route <destination> <subnet mask> <next-hop>

3. Dynamic Routing

  • Definition:
    A routing method where routes are automatically learned and updated by routers using routing protocols.
  • Key Characteristics:
    • Automatic Updates: Adapts to changes in the network topology.
    • Uses Routing Protocols: Examples include RIP, OSPF, EIGRP, and BGP.
    • Resource Overhead: Requires CPU and bandwidth to exchange routing information.
    • Best for Large Networks: Handles complex, dynamic networks efficiently.
  • Advantages:
    1. Automatically adjusts to network changes (e.g., link failure).
    2. Scalable for large and complex networks.
    3. Reduces administrative workload.
  • Disadvantages:
    1. Consumes CPU, memory, and bandwidth for route calculations.
    2. Requires initial configuration of protocols.
    3. May introduce slight delays in route convergence after changes.
  • Common Dynamic Routing Protocols:
    • Distance Vector: RIP (Routing Information Protocol).
    • Link-State: OSPF (Open Shortest Path First).
    • Hybrid: EIGRP (Enhanced Interior Gateway Routing Protocol).
    • Path Vector: BGP (Border Gateway Protocol).

4. Key Differences Between Static and Dynamic Routing

FeatureStatic RoutingDynamic Routing
ConfigurationManualAutomatic
ScalabilityLimited, best for small networksHighly scalable for large networks
AdaptabilityDoes not adapt to topology changesAutomatically adjusts to changes
Resource UsageNo additional CPU or bandwidth requiredRequires CPU, memory, and bandwidth
Failure RecoveryManual intervention neededAutomatic route updates
Ease of UseEasy for small networksEasy for large, dynamic networks
Protocol RequirementNoneRequires routing protocols

5. Routing Table

  • Definition:
    A data table stored in routers that lists the routes to particular network destinations.
  • Static Routes: Added manually.
  • Dynamic Routes: Added by routing protocols.

6. Static Routing Example

  • A small company with two routers:
    • Router A (192.168.1.0/24) needs to connect to Router B (192.168.2.0/24).
    • Static Route Configuration on Router A: ip route 192.168.2.0 255.255.255.0 10.0.0.2
    • This route ensures all traffic destined for 192.168.2.0/24 goes via 10.0.0.2 (Router B).

7. Dynamic Routing Protocols Overview

  • RIP (Routing Information Protocol): Uses hop count as a metric, simple but slow.
  • OSPF (Open Shortest Path First): Uses link-state routing, faster and more efficient.
  • EIGRP: Combines distance vector and link-state features, Cisco proprietary.
  • BGP (Border Gateway Protocol): Used for routing between ISPs and large networks.

8. Mnemonics to Remember

  • Static: “Set in Stone” → Fixed routes, no auto-updates.
  • Dynamic: “Dynamic Dance” → Always changing, adapts to the network.

9. Exam Focus

  • Know when to use Static vs Dynamic Routing.
  • Understand the pros/cons of both methods.
  • Be familiar with common Dynamic Routing Protocols like RIP, OSPF, and BGP.
  • Learn the commands for adding static routes.

10. Quick Summary

Use Dynamic Routing for large, complex, or constantly changing networks.

Use Static Routing for small, simple, or predictable networks.