5.1 Enterprise Routing Principles: Distance Vector vs. Link-State, EIGRP, and OSPF
Key Takeaways
Longest Prefix Match (LPM) is the foremost route evaluation rule in routing tables, always taking precedence over Administrative Distance and metric.
Administrative Distance (AD) arbitrates between conflicting routing sources advertising the exact same IP prefix; lower AD values are preferred.
Distance vector protocols route by rumor with limited topological visibility, whereas link-state protocols construct a synchronized link-state database (LSDB) and execute Dijkstra's Shortest Path First (SPF) algorithm.
EIGRP utilizes the Diffusing Update Algorithm (DUAL) to guarantee instantaneous, loop-free backup path failover whenever a Feasible Successor satisfies the Feasibility Condition (Reported Distance < Feasible Distance).
Classic EIGRP composite metric defaults to weighting bandwidth and delay (K1=1, K3=1), while setting load, reliability, and MTU weights to zero (K2=K4=K5=0).
Enterprise Routing Principles: Distance Vector vs. Link-State, EIGRP, and OSPF
Enterprise IP routing forms the bedrock of campus, data center, and wide-area network communications. Routers build forwarding paths by exchanging reachability information through Interior Gateway Protocols (IGPs). To optimize network convergence, avoid forwarding loops, and make deterministic traffic engineering decisions, network engineers must master the foundational algorithms, protocol structures, and route selection criteria that govern modern enterprise routing engines.
The Route Selection Hierarchy
When a router receives a packet, its forwarding plane inspects the destination IP address and queries the routing table (Routing Information Base, or RIB) to locate the best exit interface and next hop. If multiple routing protocols or static sources provide reachability data, the routing engine evaluates paths using a strict three-tiered decision hierarchy:
+-------------------------------------------------------------+
| 1. LONGEST PREFIX MATCH (LPM) |
| Evaluates subnet mask length (/32 down to /0). |
| Always takes absolute precedence over all other criteria.|
+-------------------------------------------------------------+
|
v
+-------------------------------------------------------------+
| 2. ADMINISTRATIVE DISTANCE (AD) |
| Evaluated ONLY when identical prefix/mask entries exist. |
| Prefers the routing source with the lowest AD value. |
+-------------------------------------------------------------+
|
v
+-------------------------------------------------------------+
| 3. PROTOCOL METRIC |
| Evaluated within the SAME protocol and prefix. |
| Lowest metric (cost, composite, hop count) is installed. |
+-------------------------------------------------------------+
1. Longest Prefix Match (LPM)
The router compares the destination IP address against all routing entries bit-by-bit from left to right. The entry with the most matching leading bits (the longest prefix length or most specific subnet mask) wins unconditionally. For instance, a /28 route is chosen over a /24 or /16 route regardless of which protocol installed them or what their administrative distance values are.
2. Administrative Distance (AD)
Administrative Distance is a local trustworthiness rating assigned to each routing information source. If two different routing protocols (or a static route and an IGP) advertise the exact same IP prefix and prefix length (e.g., both advertise 10.10.10.0/24), the router installs the prefix from the source with the lower AD value into the forwarding table.
3. Metric Comparison
If a single routing protocol learns multiple paths to the exact same prefix with identical subnet masks, it compares the protocol-specific metrics (such as OSPF cost or EIGRP composite metric). The path with the lowest metric is installed. If metrics are identical, Equal-Cost Multi-Path (ECMP) load balancing occurs across the matching paths.
Administrative Distance Hierarchy
Cisco IOS assigns default Administrative Distance values across routing mechanisms, ranked from most trusted (lowest number) to untrusted (highest number):
| Route Source | Default AD | Architectural Role & Context |
|---|---|---|
| Directly Connected | 0 | Physical or logical interface with an assigned IP in an 'up/up' state |
| Static Route | 1 | Manually entered route pointing to a next-hop IP or egress interface |
| eBGP (External BGP) | 20 | Peering sessions between distinct Autonomous Systems |
| EIGRP (Internal) | 90 | Routes originated and discovered within the same EIGRP AS |
| OSPF | 110 | Open standard link-state routing protocol |
| IS-IS | 115 | Link-state protocol operating at Layer 2 (used extensively in service providers) |
| RIP (v1 / v2) | 120 | Legacy distance vector protocol utilizing hop count |
| EIGRP (External) | 170 | Routes redistributed into EIGRP from external sources (e.g., OSPF, static) |
| iBGP (Internal BGP) | 200 | BGP peering sessions within the same Autonomous System |
| Unusable / Unknown | 255 | Route is discarded and cannot be installed in the routing table |
Floating Static Routes: By manually configuring a static route with an administrative distance higher than the active IGP (e.g.,
ip route 10.0.0.0 255.0.0.0 192.0.2.1 115to back up OSPF at AD 110), the static route remains dormant in configuration until the primary IGP route fails, offering deterministic backup connectivity.
Interior Gateway Protocol (IGP) Architectural Comparison
Interior Gateway Protocols operate within a single autonomous domain and fall into three primary architectural classes: traditional Distance Vector, Link-State, and Advanced (Hybrid) Distance Vector.
| Architectural Attribute | Distance Vector (RIPv2) | Advanced Distance Vector (EIGRP) | Link-State (OSPFv2 / OSPFv3) |
|---|---|---|---|
| Underlying Algorithm | Bellman-Ford | Diffusing Update Algorithm (DUAL) | Dijkstra Shortest Path First (SPF) |
| Network Visibility | "Routing by rumor" (knows only immediate neighbors) | Topology table of neighbor-advertised vectors | Complete, synchronized link-state map of the area |
| Routing Metric | Hop count (maximum 15 hops; 16 = unreachable) | Composite: Bandwidth and Delay (classic or wide) | Cumulative Cost (Reference Bandwidth / Interface Bandwidth) |
| Convergence Speed | Slow; dependent on periodic timers (30s updates) | Very fast; immediate failover via Feasible Successor | Fast; rapid LSA flooding and local SPF execution |
| CPU & Memory Overhead | Very low memory and computational requirements | Moderate memory (topology table); low CPU during steady state | High memory (LSDB) and intensive CPU spikes during SPF recalculation |
| Loop Prevention | Split horizon, poison reverse, holddown timers | Feasibility Condition (Reported Distance < Feasible Distance) | Loop-free SPF tree rooted at the local router |
| Update Mechanism | Full periodic table broadcasts/multicasts (224.0.0.9) | Bounded, triggered partial updates via reliable RTP | Triggered Link-State Updates (LSU); refreshed every 30 minutes |
| Hierarchical Structure | Flat topology; no summarization boundaries | Flexible; arbitrary summarization on any router interface | Strict two-tier hierarchy: Backbone Area 0 and non-backbone areas |
Distance Vector vs. Link-State Mechanics
Distance Vector and "Routing by Rumor"
Traditional distance vector protocols determine the distance (metric) and vector (next hop direction) to target networks based solely on the second-hand advertisements of their direct neighbors. Routers possess no end-to-end topological awareness. Because routers depend on periodic broadcasts, distance vector networks are vulnerable to routing loops and the "count-to-infinity" problem when links flap.
Mitigation techniques in distance vector include:
- Split Horizon: A router never advertises a route back out the same interface through which it was learned.
- Poison Reverse: Explicitly advertising a failed route with an unreachable metric (infinity / 16 hops in RIP) to immediately invalidate neighbor cache entries.
- Holddown Timers: Preventing a router from accepting new advertisements for a flapping route for a designated period, allowing network stability to restore.
Link-State and Dijkstra's Algorithm
Link-state protocols abandon routing by rumor. Instead of advertising forwarding tables, each router discovers its local interfaces and neighbors, encapsulates this information into Link-State Advertisements (LSAs), and floods them to all routers within the area. Every router in that area stores these LSAs in an identical Link-State Database (LSDB).
Once synchronized, each router independently runs the Dijkstra Shortest Path First (SPF) algorithm with itself as the root of the tree, calculating the shortest loop-free path to every destination prefix. Although highly resilient and fast-converging, running SPF across large enterprise topologies consumes substantial CPU and memory, requiring hierarchical area segmentation to bound calculation domains.
EIGRP and the Diffusing Update Algorithm (DUAL)
Cisco's Enhanced Interior Gateway Routing Protocol (EIGRP) combines the rapid convergence of link-state protocols with the operational simplicity of distance vector. EIGRP does not maintain a complete topology graph; rather, it uses the Diffusing Update Algorithm (DUAL) to track neighbor reachability and guarantee loop-free backup routes.
EIGRP Composite Metric Formula
Classic EIGRP calculates a 32-bit composite metric using five configurable weighting coefficients ( through ):
By default, Cisco IOS sets , , and . When default -values are active, the complex formula reduces to:
Where:
- Bandwidth:
- Delay:
(Note: Setting removes the reliability multiplier term from the equation entirely rather than multiplying by zero). Both the EIGRP Autonomous System number and -values must match identically between adjacent routers to form a neighbor relationship.
DUAL Terminology and Loop Freedom
[Neighbor Router] -------- Advertises Reported Distance (RD) --------> [Local Router]
| |
Direct Path Total Metric
to Destination to Destination
| |
v v
[Destination Subnet] <--------------------------------------------- [Feasible Distance (FD)]
- Feasible Distance (FD): The lowest calculated metric from the local router to the destination subnet across all viable paths.
- Reported Distance (RD) / Advertised Distance (AD): The metric to the destination subnet as reported by an adjacent neighbor router (the neighbor's own calculated metric).
- Successor: The primary neighbor path offering the lowest overall metric (FD) to the destination. The successor route is installed into the active routing table.
- Feasible Successor (FS): A backup neighbor that satisfies the Feasibility Condition. An FS is pre-computed and stored in the EIGRP topology table, enabling instantaneous (sub-second) failover if the primary successor fails.
- Feasibility Condition (FC): A neighbor qualifies as a Feasible Successor if and only if:
Why the Feasibility Condition Guarantees Loop Freedom: If a neighbor's metric to reach a destination is strictly less than your current best metric (FD), that neighbor cannot possibly be routing packets back through you to reach that destination. If its path looped through you, its reported distance would necessarily be higher than your feasible distance.
Step-by-Step DUAL Calculation Walkthrough
Consider Router R1 evaluating three potential paths to reach destination network 192.168.100.0/24:
| Path via Neighbor | Path Minimum Bandwidth | Cumulative Delay | Local Calculated Metric (FD) | Neighbor Reported Distance (RD) | DUAL Status & Rationale |
|---|---|---|---|---|---|
| Neighbor R2 | 100,000 kbps (100 Mbps) | 700 | 43,520 | 40,960 | Successor: Lowest total metric (FD = 43,520). Installed in the routing table. |
| Neighbor R3 | 10,000 kbps (10 Mbps) | 1,400 | 291,840 | 35,840 | Feasible Successor: RD (35,840) < FD (43,520). Meets the FC even though its own total metric is much worse. |
| Neighbor R4 | 100,000 kbps (1 Gbps first hop, 100 Mbps later) | 1,010 | 51,456 | 51,200 | Neither: RD (51,200) > FD (43,520). Fails the FC even though its total metric is close to the successor's. |
Check the arithmetic with the default K-values. For the path through R2:
For the path through R3, the 10 Mbps link dominates: . R3's reported distance is calculated the same way from R3's own path (100 Mbps minimum bandwidth and 400 of delay): .
If the primary link through R2 fails, R1 immediately promotes R3 as the new successor without recalculating or sending DUAL query packets. Path R4 remains available in the topology table, but if both R2 and R3 fail, R1 must place the route into an Active state and transmit DUAL queries to determine whether R4 offers a loop-free path.
Load Balancing: EIGRP vs. OSPF
Topic 3.2.a also asks you to compare load balancing:
| Behavior | EIGRP | OSPF |
|---|---|---|
| Equal-cost paths | Installs multiple equal-metric successors (maximum-paths, default 4 on Cisco IOS) | Installs multiple equal-cost paths (maximum-paths, default 4 on Cisco IOS) |
| Unequal-cost paths | Supported with variance: a feasible successor is installed if its metric is less than variance × FD | Not supported; only equal-cost paths are installed |
| Traffic sharing | With unequal-cost paths, traffic is shared in proportion to the metrics by default (traffic-share balanced) | Shared equally across the equal-cost paths |
In the walkthrough above, R3's metric is 291,840 and the FD is 43,520, a ratio of about 6.7. Configuring variance 7 under the EIGRP process would install R3 alongside R2. R4 can never be used for unequal-cost load balancing, however high the variance, because it is not a feasible successor.
In EIGRP, under what exact mathematical condition does an adjacent neighbor qualify as a Feasible Successor for a destination network?
The neighbor's Feasible Distance is strictly lower than the local router's Reported Distance.
The neighbor's Reported Distance is strictly lower than the local router's current Feasible Distance.
The neighbor's composite metric matches the successor's metric within the EIGRP variance multiplier.
The neighbor's cumulative delay is lower than the primary successor's delay.
A core router holds four routes in its routing table matching destination IP 172.16.10.65:
- 172.16.10.0/24 via EIGRP (AD 90, metric 28160)
- 172.16.10.64/28 via OSPF (AD 110, metric 20)
- 172.16.0.0/16 via Static Route (AD 1)
- 172.16.10.64/26 via eBGP (AD 20, metric 0) Which route will the router choose to forward the packet?
The Static Route 172.16.0.0/16 because it has the lowest Administrative Distance (AD 1).
The eBGP route 172.16.10.64/26 because exterior BGP routes take precedence over interior gateway protocols.
The OSPF route 172.16.10.64/28 because it has the longest prefix match (/28).
The EIGRP route 172.16.10.0/24 because its internal metric is lower than OSPF.
What is the default Administrative Distance of an external EIGRP route redistributed from an outside routing source, compared to an internal EIGRP route and an OSPF route?
External EIGRP is 170, internal EIGRP is 90, and OSPF is 110.
External EIGRP is 90, internal EIGRP is 170, and OSPF is 110.
External EIGRP is 115, internal EIGRP is 90, and OSPF is 110.
External EIGRP is 200, internal EIGRP is 100, and OSPF is 110.
Sections you finish are checked off in the contents.