The Logic of Path Selection
Deconstructing Enterprise Routing Protocols
1. The Hierarchy of Trust: Administrative Distance
A router might receive the same path information from multiple protocols. How does it decide which one to believe? It uses Administrative Distance (AD).
Lower is better. If OSPF says to go left and a static route says to go right, the router goes right.
2. IGP: Intelligence Within the Walls
Interior Gateway Protocols are designed for speed and reliability within your own network.
OSPF: The Link-State Master
OSPF (Open Shortest Path First) uses the Dijkstra Algorithm. Every router has a complete "map" of the entire network. If a link goes down, the map is updated, and the router recalculates the shortest path using bandwidth as a cost.
EIGRP: The Hybrid Legend
Originally a Cisco proprietary protocol, EIGRP uses DUAL (Diffusing Update Algorithm). It is faster than OSPF in specific scenarios because it keeps "feasible successors" (backup routes) pre-calculated and ready for instant use.
3. BGP: The Protocol that Runs the World
BGP is a Path-Vector protocol. It doesn't care about bandwidth. It cares about Policy. BGP is how ISPs talk to each other.
The BGP Decision Process (Simplified)
- Weight: Highest is preferred (Local to the router).
- Local Preference: Highest is preferred (Local to the Autonomous System).
- AS-Path: Shortest (fewest number of AS hops).
- Origin: IGP is preferred over EGP.
- MED: Lowest is preferred (Multi-Exit Discriminator).
Convergence Dynamics Latency
Protocol Comparison: OSPF
4. Redundancy & First Hop Protocols
Routing isn't just about cross-country paths; it's about the "Last Mile." HSRP (Hot Standby Router Protocol) and VRRP (Virtual Router Redundancy Protocol) allow two physical routers to share a single "Virtual IP". If one dies, the other takes over in milliseconds, and the end-users never notice.
5. Routing for Security: ACLs and VRFs
Modern routing includes Virtual Routing and Forwarding (VRF). This allows a single router to maintain multiple independent routing tables. It's like having separate physical routers for your Guest Wi-Fi and your Management network, all sharing the same CPU.
6. The Shift to SD-WAN
We are moving away from "Command Line Routing" toward SD-WAN. SD-WAN builds an overlay on top of the physical internet, dynamically switching traffic between MPLS, LTE, and Broadband based on real-time latency and packet loss.
Conclusion: The Map is the Territory
Understanding routing is understanding the flow of information in our society. From the simple logic of a home router to the massive BGP tables of Cloudflare and Google, the principles of metrics, trust, and path selection are what keep the digital world turning.
Frequently Asked Questions
Can I run OSPF across the internet?
Technically, yes (over a VPN), but you wouldn't want to. OSPF is "chatty" and doesn't scale to the millions of routes that BGP handles. Use the right tool for the job.
What is a "Default Route" (0.0.0.0/0)?
It is the route of last resort. If a router has no specific instructions for a destination, it sends it to the default gateway.
Is switching faster than routing?
In the past, yes. Switches use specialized hardware (ASICs) to move frames. However, modern Layer 3 switches route at "wire-speed", making the speed difference practically negligible in many environments.