Networking - Routing: The Basics

Routing is the process of determining the path that data packets take from a source device to a destination device across networks. Routers make these decisions using routing tables, which list available paths. Routing can be classified into static and dynamic methods.


1. Static Routing

Definition:
Static routing is a routing method in which network administrators manually configure routes in a router’s routing table. These routes do not change unless the administrator modifies them.

Key Features:

  • Routes are manually entered using router configuration commands.

  • Best for small or stable networks where paths rarely change.

  • No automatic adaptation to network failures or topology changes.

Advantages:

  1. Simplicity: Easy to configure in small networks.

  2. Predictability: The path taken by packets is fixed and known.

  3. Low Resource Usage: Does not require CPU or memory for routing algorithms.

Disadvantages:

  1. Lack of Scalability: Difficult to maintain in large networks with frequent changes.

  2. No Fault Tolerance: If a link fails, packets cannot be rerouted automatically.

  3. Manual Updates Required: Network changes must be manually reflected in the routing table.

Example Scenario:
A small office network with a single router connecting to the internet may use a static route:

  • ip route 0.0.0.0 0.0.0.0 192.168.1.1
    Here, all unknown traffic is sent to the ISP router at 192.168.1.1.


2. Dynamic Routing

Definition:
Dynamic routing uses protocols to automatically discover network paths and maintain up-to-date routing tables. Routers exchange information about network topology and adapt to changes in real time.

Key Features:

  • Uses routing protocols like RIP, OSPF, EIGRP, BGP.

  • Automatically recalculates routes when network changes occur (link failure, new networks, etc.).

  • Maintains multiple possible paths to optimize routing.

Advantages:

  1. Automatic Updates: Changes in the network topology are detected and routing tables updated automatically.

  2. Scalability: Works well in large, complex networks.

  3. Fault Tolerance: If a path fails, routers find alternative routes without manual intervention.

Disadvantages:

  1. Complexity: Requires knowledge of routing protocols and configurations.

  2. Resource Usage: Consumes more CPU, memory, and bandwidth for routing updates.

  3. Possible Instability: Incorrect configurations or rapid changes can cause routing loops or convergence delays.

Example Scenario:
In a large enterprise with multiple offices connected via WAN links:

  • Routers use OSPF to automatically share topology information.

  • If a link between two offices fails, traffic is dynamically rerouted over an alternate path without administrator intervention.


Comparison Table: Static vs. Dynamic Routing

Feature Static Routing Dynamic Routing
Configuration Manual Automatic via routing protocols
Scalability Limited High
Adaptability No Yes
Resource Usage Low Higher (CPU, memory, bandwidth)
Fault Tolerance None Automatic rerouting
Best For Small, stable networks Large, changing networks

Summary

  • Static routing is simple, predictable, and resource-efficient, but inflexible and not fault-tolerant.

  • Dynamic routing is adaptive, scalable, and fault-tolerant, making it ideal for modern networks, though it requires more resources and configuration expertise.

In practice, many networks use a hybrid approach, with static routes for fixed paths (like default gateways) and dynamic routing for complex, changing networks.