CCNA 200-301Chapter 259 of 260Objective 3.4

Distance Vector vs Link-State Routing

Routing protocols are the brain of any network—they determine how routers learn paths and forward traffic. On the CCNA 200-301 exam, understanding the difference between distance vector and link-state routing is critical for objective 3.4 (Compare and contrast distance vector and link-state routing protocols). This comparison isn't just academic; it directly impacts real network design, scalability, convergence speed, and troubleshooting. Get this wrong, and you'll struggle with OSPF, EIGRP, and route redistribution questions.

25 min read
Intermediate
Updated May 31, 2026

The Town Map vs. Word-of-Mouth Directions

Imagine you're in a new town and need to find the best route to the stadium. In the 'distance vector' approach, you ask your neighbor for directions. Your neighbor doesn't know the whole town; they just know 'turn left at the bakery, then ask someone else.' They pass along what they heard from their other neighbor, who heard from yet another neighbor. Each person only knows the direction (next hop) and the distance (number of blocks). If someone gives bad directions (a routing loop), you might wander forever. This is exactly how RIP works—it only knows the next hop and hop count, and it relies on neighbors' hearsay, making it slow to converge and prone to loops.

Now, in the 'link-state' approach, you get a detailed map of the entire town. Every street, every traffic light, every one-way street is drawn out. You can calculate the optimal route yourself using Dijkstra's algorithm. If a road closes, the map gets updated, and you recalculate. This is how OSPF and IS-IS work—each router builds a complete topology database (Link-State Database) and runs SPF to compute the shortest path. The trade-off: the map takes more memory and CPU to maintain, and everyone needs to hear about every change, but convergence is fast and loops are virtually impossible. On the CCNA, you need to know that link-state protocols are more scalable and converge faster, but are more resource-intensive.

How It Actually Works

What Are Distance Vector and Link-State Routing Protocols?

Routing protocols are classified into two main categories based on how they learn and maintain routing information: distance vector and link-state. A third category, path-vector (used by BGP), is beyond CCNA scope. Distance vector protocols operate on the principle of 'routing by rumor'—each router only knows the direction (vector) and distance (metric) to a destination, as reported by its directly connected neighbors. There is no global view of the network topology. Examples include Routing Information Protocol (RIP) and Enhanced Interior Gateway Routing Protocol (EIGRP), though EIGRP is technically an advanced distance vector protocol (also called a hybrid) because it includes features like Diffusing Update Algorithm (DUAL) for fast convergence and loop prevention.

Link-state protocols, on the other hand, give every router a complete picture of the network topology. Each router independently constructs a Link-State Database (LSDB) containing all routers and their links, then runs the Shortest Path First (SPF) algorithm (Dijkstra's algorithm) to compute the best path to every destination. Examples include Open Shortest Path First (OSPF) and Intermediate System-to-Intermediate System (IS-IS).

How Distance Vector Works: The Bellman-Ford Algorithm

Distance vector protocols use the Bellman-Ford algorithm to compute routes. Each router maintains a routing table with entries containing the destination network, the metric (e.g., hop count for RIP, composite metric for EIGRP), and the next-hop router. Routers periodically send their entire routing table (or updates) to directly connected neighbors. When a router receives an update, it compares the received metric plus the cost to reach the neighbor against its current best metric. If the new path is better, it updates the routing table.

Key characteristics: - Periodic updates: RIP sends its full routing table every 30 seconds, even if nothing changed. EIGRP uses triggered updates (partial updates only when changes occur) but also sends hello packets every 5 seconds (default on LAN) to maintain neighbor relationships. - Hop count limit: RIP has a maximum hop count of 15 (16 is considered infinite/unreachable) to prevent routing loops. EIGRP uses a more sophisticated metric (bandwidth, delay, load, reliability) and has no hard hop limit. - Slow convergence: Because updates are periodic and only propagate neighbor-to-neighbor, convergence can take minutes. RIP uses hold-down timers (180 seconds) to prevent flapping routes from causing loops. - Routing loops: Distance vector protocols are susceptible to loops, mitigated by mechanisms like split horizon, route poisoning, and hold-down timers. For example, split horizon prevents a router from advertising a route back out the interface from which it was learned.

How Link-State Works: The SPF Algorithm

Link-state protocols build a complete topology map. The process has three main phases: 1. Neighbor Discovery: Routers send hello packets to discover neighbors and form adjacencies. For OSPF, hello packets are sent every 10 seconds on broadcast networks (default), and the dead interval is 40 seconds. Neighbors must agree on certain parameters (e.g., area ID, hello/dead intervals, authentication) to become fully adjacent. 2. Link-State Advertisement (LSA) Flooding: Each router creates Link-State Advertisements (LSAs) describing its directly connected links, the state of those links (up/down), and the cost (metric). LSAs are flooded to all routers in the same area (OSPF) or level (IS-IS). Flooding is reliable—each LSA is acknowledged. The collection of LSAs forms the Link-State Database (LSDB). 3. SPF Calculation: Each router runs the Dijkstra algorithm on the LSDB to compute the shortest path tree (SPT) with itself as the root. The result is the routing table. SPF is recalculated whenever the LSDB changes (e.g., a link goes down).

Key characteristics: - Fast convergence: Changes are detected quickly (via hello failures or link down events) and flooded immediately, so all routers recalculate within seconds. - Loop-free by design: Because every router has the same topology map, the SPF algorithm guarantees loop-free paths (as long as the LSDB is consistent). - Resource-intensive: The LSDB can be large in big networks, and SPF calculations consume CPU. OSPF uses areas to limit the scope of LSAs and reduce the LSDB size. - No hop count limit: OSPF uses cost (default based on bandwidth: cost = 10^8 / bandwidth in bps). EIGRP uses a composite metric (bandwidth, delay, load, reliability).

Key Timers and Defaults

| Protocol | Hello Timer | Dead Timer | Update Timer | Hold-Down Timer | |----------|-------------|------------|--------------|-----------------| | RIP | N/A (no hellos) | N/A | 30s (full table) | 180s | | EIGRP | 5s (LAN), 60s (WAN) | 15s (LAN), 180s (WAN) | Triggered (partial) | Active timer: 3min | | OSPF | 10s (broadcast), 30s (non-broadcast) | 40s (broadcast), 120s (non-broadcast) | N/A (LSA flooding) | N/A |

IOS CLI Verification Commands

For distance vector (RIP example):

R1# show ip route
R1# show ip rip database
R1# debug ip rip

For link-state (OSPF example):

R1# show ip ospf neighbor
R1# show ip ospf interface
R1# show ip ospf database
R1# show ip route ospf

Example output for show ip ospf neighbor:

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.2         1   FULL/DR         00:00:35    10.1.12.2       GigabitEthernet0/0

The State field shows the adjacency state (FULL means fully adjacent), and the Dead Time counts down from 40 seconds.

Interaction with Related Protocols

Both types interact with the routing table (RIB) and forwarding table (FIB). Administrative distance (AD) is used to select between routes learned from different protocols. For example, OSPF has AD 110, EIGRP internal AD 90, RIP AD 120. If a router learns the same prefix from both OSPF and EIGRP, it prefers EIGRP because of lower AD. Redistribution between protocols is possible but requires careful metric translation (e.g., setting a seed metric for RIP).

Walk-Through

1

Understand the Fundamental Difference

The core difference lies in what each router knows. Distance vector: each router knows only the direction (next-hop) and distance (metric) to each destination, as reported by its neighbors. It has no knowledge of the network beyond its immediate neighbors. Link-state: each router has a complete map of the network topology (every router and every link), allowing it to independently calculate the best path. This is the single most important concept for the CCNA exam. If a question asks 'which protocol has a complete view of the topology?' the answer is link-state (OSPF, IS-IS). If it asks 'which protocol relies on neighbors for routing information?' it's distance vector (RIP, EIGRP).

2

Learn the Algorithms: Bellman-Ford vs. Dijkstra

Distance vector uses the Bellman-Ford algorithm. It works iteratively: each router starts with its directly connected networks, then exchanges tables with neighbors. Over time, the best paths propagate. The algorithm is simple but slow to converge and prone to loops. Link-state uses Dijkstra's Shortest Path First (SPF) algorithm. Each router builds a tree with itself as the root, calculating the shortest path to every other node. SPF guarantees loop-free paths and converges quickly. On the exam, you may be asked to identify which algorithm a protocol uses. Know that RIP uses Bellman-Ford, OSPF uses Dijkstra, and EIGRP uses DUAL (which is a diffusing update algorithm, not pure Bellman-Ford).

3

Compare Update Mechanisms and Timers

Distance vector protocols (RIP) send periodic full routing table updates—every 30 seconds for RIP. This wastes bandwidth and slows convergence. EIGRP improves on this by sending only triggered (partial) updates when a change occurs, but it still relies on neighbor relationships. Link-state protocols (OSPF) send link-state advertisements (LSAs) only when a change occurs, and these are flooded to all routers in the area. OSPF also sends hello packets every 10 seconds to maintain neighbor relationships. The dead timer is 40 seconds. For the exam, remember: RIP updates every 30 seconds, OSPF hello every 10 seconds, EIGRP hello every 5 seconds. A common trap is confusing hello timers with update timers.

4

Understand Loop Prevention Mechanisms

Distance vector protocols need explicit loop prevention. RIP uses split horizon (don't advertise a route back out the interface it came from), route poisoning (advertise a failed route with metric 16, infinite), and hold-down timers (ignore updates for a failed route for 180 seconds). EIGRP uses DUAL to guarantee loop-free paths at every instant through feasible successors and the Feasibility Condition. Link-state protocols inherently avoid loops because each router has a consistent topology map; SPF never creates loops. On the exam, if a question asks about loop prevention, know that split horizon and route poisoning are distance vector mechanisms, while SPF is the link-state method.

5

Compare Scalability and Convergence

Link-state protocols scale better to large networks because they converge faster and use less bandwidth for updates. However, they require more memory and CPU to maintain the LSDB and run SPF. OSPF addresses this by using areas—routers in an area only know the topology of that area, not the entire network. Distance vector protocols are simpler and use less memory, but they scale poorly due to periodic updates and hop count limits (RIP max 15 hops). For the CCNA, know that OSPF is preferred for enterprise networks, while RIP is only used in very small or legacy networks. EIGRP is a good middle ground, but it's Cisco proprietary (though partially open now).

6

Master Verification Commands and Output Interpretation

For the exam, you must be able to interpret show command outputs to identify which routing protocol is running and its characteristics. For OSPF, `show ip ospf neighbor` shows adjacency states (FULL, 2WAY, etc.) and dead timers. `show ip ospf database` shows LSAs. For EIGRP, `show ip eigrp neighbors` shows neighbor table, `show ip eigrp topology` shows topology table. For RIP, `show ip route` shows routes with R as the source. A common question: given a routing table, identify the protocol. If the metric is hop count (shown as [120/2] where 120 is AD and 2 is hop count), it's RIP. If metric is cost (e.g., [110/20]), it's OSPF. If metric is composite (e.g., [90/2170112]), it's EIGRP.

What This Looks Like on the Job

In an enterprise campus network with hundreds of routers and thousands of subnets, a routing protocol's scalability is paramount. I once worked on a network that originally used RIP—convergence after a link failure took over two minutes, causing widespread timeouts. We migrated to OSPF, and convergence dropped to under 10 seconds. The trade-off was that we needed to design OSPF areas (backbone area 0, standard areas, stub areas) to keep the LSDB manageable. For example, we placed all core routers in area 0 and each building's distribution routers in separate areas. This reduced SPF calculation scope and memory usage.

Another scenario: a service provider connecting customer sites. Here, EIGRP is often used because it supports unequal-cost load balancing and converges fast using DUAL. However, if the network includes non-Cisco devices, OSPF is mandatory. I've seen misconfiguration where someone set an OSPF hello timer to 30 seconds on one end and left default 10 on the other—neighbors never formed. The fix was to ensure timer consistency.

A common production issue: redistribution between OSPF and EIGRP. Without proper metric conversion, routes may not be advertised or may have incorrect costs. For instance, redistributing OSPF into EIGRP requires setting a default metric (e.g., bandwidth, delay). If forgotten, EIGRP won't advertise the redistributed routes because it views them as having an infinite metric. This is a classic CCNA troubleshooting scenario.

Scale considerations: OSPF in a single area with 500 routers will cause huge LSDBs and frequent SPF recalculations. The solution is to segment into multiple areas. For EIGRP, the main scaling limit is the number of neighbors; EIGRP can handle hundreds of neighbors per router if tuned, but the query process during network convergence can be CPU-intensive.

When misconfigured, both protocol types can cause black holes or routing loops. For distance vector, a missing split horizon can cause a loop that takes minutes to break. For link-state, a mismatched area ID or MTU mismatch can prevent adjacency formation. I once spent hours troubleshooting OSPF neighbors stuck in EXSTART state due to an MTU mismatch on a serial link—the fix was to set the interface MTU to 1500 on both sides.

How CCNA 200-301 Actually Tests This

The CCNA 200-301 exam tests objective 3.4: 'Compare and contrast distance vector and link-state routing protocols.' This is a comparison topic, not a deep configuration drill. Expect scenario-based questions that ask you to identify which protocol type or specific protocol is being described, or to choose the appropriate protocol for a given network requirement.

Common wrong answers and why candidates choose them: 1. 'EIGRP is a link-state protocol' — Because EIGRP has fast convergence and uses neighbor tables, some assume it's link-state. But it's an advanced distance vector (hybrid). It does not maintain a full topology map like OSPF; it only knows the best and feasible successor routes. 2. 'RIP uses triggered updates' — RIP sends full table updates every 30 seconds regardless of changes. Triggered updates are a feature of EIGRP and OSPF. Candidates confuse 'triggered' with 'periodic'. 3. 'OSPF uses hop count as metric' — OSPF uses cost (based on bandwidth). Hop count is RIP's metric. A common trap question gives a routing table with metric 2 under OSPF—but OSPF cost can be 2 if the link is 100 Mbps (cost = 1 for 100 Mbps? Actually default cost for 100 Mbps is 1, 10 Mbps is 10, etc.). Candidates must know that OSPF cost is not hop count. 4. 'Link-state protocols send periodic updates' — They send hello packets periodically, but updates (LSAs) are sent only when a change occurs. The exam may phrase 'OSPF sends updates every 30 seconds' to trick you.

Specific values to memorize:

RIP: AD 120, metric hop count (max 15), update timer 30s, hold-down 180s, flush 240s.

OSPF: AD 110, metric cost, hello 10s (broadcast), dead 40s, SPF recalculation on change.

EIGRP: AD 90 (internal) / 170 (external), metric composite (bandwidth+delay by default), hello 5s (LAN) / 60s (WAN), dead 15s / 180s.

Calculation traps: None for this comparison topic, but you may need to compare metrics. For example, given an OSPF cost of 10 and an EIGRP metric of 128, which is better? You can't compare directly because metrics are different. The router uses AD to choose between protocols, not the metric value.

Decision rule for scenario questions: If the question asks which protocol converges faster, pick link-state. If it asks which uses less CPU/memory, pick distance vector. If it asks which is suitable for a large network, pick link-state (OSPF). If it asks which is Cisco proprietary, pick EIGRP. If it asks which uses hop count, pick RIP.

Key Takeaways

Distance vector protocols (RIP, EIGRP) know only the next hop and metric; they rely on neighbors and periodic updates.

Link-state protocols (OSPF, IS-IS) have a complete topology map via LSAs and run SPF to calculate shortest paths.

RIP uses hop count (max 15), updates every 30 seconds, AD 120.

OSPF uses cost (default 10^8/bandwidth), hello 10s, dead 40s, AD 110.

EIGRP is advanced distance vector, uses DUAL for loop-free convergence, AD 90 internal.

Split horizon, route poisoning, and hold-down timers are distance vector loop prevention mechanisms.

Link-state protocols converge faster and scale better but consume more memory and CPU.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Distance Vector (RIP)

Knows only next hop and metric

Periodic full updates (30s for RIP)

Uses Bellman-Ford algorithm

Slow convergence (minutes)

Loop prevention via split horizon, route poisoning, hold-down

Simple, low memory/CPU

Link-State (OSPF)

Knows complete network topology

Triggered updates (LSAs on change)

Uses Dijkstra SPF algorithm

Fast convergence (seconds)

Inherently loop-free (SPF tree)

Complex, higher memory/CPU

Watch Out for These

Mistake

EIGRP is a link-state routing protocol.

Correct

EIGRP is an advanced distance vector (hybrid) protocol. It does not maintain a full topology database like OSPF; it only stores best and feasible successor routes in its topology table.

Because EIGRP uses neighbor discovery and triggered updates, some assume it behaves like OSPF.

Mistake

OSPF sends its entire routing table every 30 seconds.

Correct

OSPF sends Link-State Advertisements (LSAs) only when a change occurs, not periodically. It does send hello packets every 10 seconds, but these are not routing updates.

Candidates confuse hello packets with routing updates, or they assume all protocols behave like RIP.

Mistake

Link-state protocols use more bandwidth than distance vector protocols.

Correct

Link-state protocols use less bandwidth overall because they send updates only when changes occur, whereas distance vector (RIP) sends full tables periodically. However, initial convergence may involve more traffic.

The word 'link-state' sounds like it would send more information, but the periodic nature of RIP actually wastes more bandwidth.

Mistake

RIP has a maximum hop count of 16.

Correct

RIP defines 16 as 'infinite' or unreachable. The maximum usable hop count is 15. A route with metric 16 is considered unreachable.

Candidates often remember '16' but forget that it means unreachable, not a valid path.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the main difference between distance vector and link-state routing protocols?

The main difference is what each router knows about the network. Distance vector routers only know the direction (next hop) and distance (metric) to each destination, as reported by neighbors. They have no global topology view. Link-state routers know the complete network topology (every router and link) because they share Link-State Advertisements (LSAs) and run the SPF algorithm. This makes link-state protocols converge faster and be more loop-free, but they require more memory and CPU. For the exam, remember that distance vector = 'routing by rumor', link-state = 'everyone has a map'.

Is EIGRP a distance vector or link-state protocol?

EIGRP is classified as an advanced distance vector (or hybrid) protocol. It retains distance vector characteristics (it only knows the next hop and metric, not the full topology) but improves convergence with the Diffusing Update Algorithm (DUAL) and uses triggered updates rather than periodic full updates. It does not maintain a complete topology database like OSPF, so it is not link-state. On the CCNA, you should treat EIGRP as a distance vector protocol for comparison purposes.

Why does RIP have a maximum hop count of 15?

RIP uses hop count as its metric, and a hop count of 16 is defined as 'infinite' (unreachable). This limitation prevents routing loops from persisting indefinitely, but it also restricts RIP to networks that are at most 15 hops in diameter. This makes RIP unsuitable for large enterprise networks. On the exam, remember that 15 is the maximum valid hop count, and 16 means unreachable.

How does OSPF achieve fast convergence?

OSPF achieves fast convergence through three key mechanisms: (1) Rapid detection of failures via hello packets—if a router stops receiving hellos from a neighbor within the dead interval (default 40 seconds), it assumes the neighbor is down. (2) Immediate flooding of Link-State Advertisements (LSAs) describing the change to all routers in the area. (3) Each router recalculates its Shortest Path Tree (SPT) using the Dijkstra algorithm upon receiving the new LSA. This entire process typically completes in seconds, much faster than distance vector protocols that rely on periodic updates.

What is split horizon and how does it prevent loops?

Split horizon is a loop prevention mechanism used by distance vector protocols. It states that a router should never advertise a route back out the interface from which it was learned. For example, if Router A learns about network X from Router B via interface Fa0/0, Router A will not include network X in updates sent out Fa0/0. This prevents a two-node routing loop where A tells B about X, and B tells A about X, creating a loop. Split horizon is enabled by default on RIP and EIGRP interfaces.

What are the default hello and dead timers for OSPF on a broadcast multiaccess network?

On broadcast multiaccess networks (e.g., Ethernet), OSPF hello timer defaults to 10 seconds, and the dead timer defaults to 40 seconds (four times the hello interval). These timers must match between neighboring routers to form an adjacency. On non-broadcast multiaccess (NBMA) networks, the defaults are 30 seconds for hello and 120 seconds for dead. The exam may ask you to identify these values or to recognize that mismatched timers prevent neighbor formation.

Can OSPF and EIGRP be used together in the same network?

Yes, they can be used together through route redistribution. However, each protocol operates independently, and routes learned from one can be injected into the other. You must set a seed metric when redistributing; for example, redistributing OSPF into EIGRP requires setting a default metric (bandwidth, delay, reliability, load, MTU). Without a seed metric, EIGRP will not advertise the redistributed routes. On the exam, be aware that redistribution can cause suboptimal routing or loops if not carefully planned.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Distance Vector vs Link-State Routing — now see how well it sticks with free CCNA 200-301 practice questions. Full explanations included, no account needed.

Done with this chapter?