OSPF & EIGRP

Link-state vs distance-vector algorithms, OSPF areas and DR/BDR election, EIGRP DUAL algorithm, and enterprise routing tradeoffs.

Overview

Overview OSPF (Open Shortest Path First) and EIGRP (Enhanced Interior Gateway Routing Protocol) are the two dominant interior gateway protocols (IGPs) used within enterprise and service provider networks. While BGP handles inter-AS routing, IGPs handle routing within a single autonomous system.

OSPF is an open-standard link-state protocol defined in RFC 2328. Each router maintains a complete map of the network topology (the Link State Database or LSDB) and runs Dijkstra's SPF algorithm to compute the shortest path tree. OSPF is organized into areas — the backbone area 0 is required, with all other areas connecting to it. This hierarchy limits the size of the LSDB and reduces SPF computation overhead. OSPF is widely used in enterprise networks, service provider cores, and is the IGP of choice for large-scale deployments.

EIGRP is a Cisco-proprietary (later partially open-sourced) advanced distance-vector protocol. Unlike classical distance-vector protocols (like RIP) that simply share routing tables, EIGRP uses the DUAL (Diffusing Update Algorithm) to maintain loop-free paths and provides instant convergence using pre-computed feasible successor routes. EIGRP is unequal-cost load balancing capable and has lower overhead than OSPF in stable networks.

In cloud and SRE contexts, OSPF appears in on-premises enterprise networks, SD-WAN underlay routing, and sometimes within large VPN environments. EIGRP appears in Cisco-centric enterprise environments. Understanding convergence behavior, neighbor relationships, and failure recovery is critical when dealing with network outages and SRE incident response.

Key concepts

Link-State vs Distance-Vector
Link-state protocols (OSPF, IS-IS) flood topology information to all routers. Each router builds a complete network map and computes its own shortest paths using SPF. Distance-vector protocols (RIP, EIGRP) share computed routing tables with neighbors. Distance-vector is simpler but slower to converge and more prone to loops.
OSPF DR/BDR Election
On multi-access networks (Ethernet segments with multiple routers), OSPF elects a Designated Router (DR) and Backup Designated Router (BDR) to reduce LSA flooding overhead. All other routers (DROther) form adjacencies only with DR and BDR, not with each other. DR is elected based on highest OSPF priority (default 1, range 0-255), then highest router ID. A priority of 0 disqualifies a router from DR/BDR election.
OSPF Areas
Area 0 (backbone) is required. All non-backbone areas must connect to area 0 (directly or via virtual link). Area Border Routers (ABRs) connect areas and summarize routes between them. Stub areas block external LSAs (Type 5). Totally stubby areas block both external and inter-area LSAs, receiving only a default route.
DUAL Algorithm (EIGRP)
DUAL computes loop-free paths by maintaining a Feasibility Condition: a neighbor's reported distance (RD) to a destination must be less than the local best distance (FD) to use it as a feasible successor. Feasible successors are pre-computed backup paths. When the primary path fails, EIGRP promotes a feasible successor instantly without running Bellman-Ford.
Administrative Distance
When multiple routing protocols provide routes to the same destination, the router uses Administrative Distance (AD) to choose between them. Lower AD wins. Directly connected: 0, Static: 1, EIGRP summary: 5, eBGP: 20, EIGRP internal: 90, OSPF: 110, IS-IS: 115, RIP: 120, iBGP: 200.

When to use it

  • Designing enterprise campus or branch office routing with OSPF multi-area hierarchy
  • Troubleshooting convergence issues after a link failure in an enterprise network
  • Evaluating IGP choices for an SD-WAN underlay or MPLS backbone
  • Understanding how on-premises routing affects hybrid cloud failover behavior
  • Responding to SRE incidents involving routing convergence delays

Interview questions

  • Describe the OSPF neighbor adjacency formation process and what causes routers to get stuck in each state.
  • How does EIGRP achieve fast convergence compared to OSPF, and when would EIGRP converge faster or slower?

Sign up free to read the full topic

More Networking topics

Start free on Cariara · Coding problems · System design studio