Static vs Dynamic Routing: RIP, EIGRP and OSPF Compared
Every route in a router's table gets there one of two ways: an administrator typed it in (static) or a routing protocol worked it out (dynamic). Below: when to use static routes, default routes and floating static routes, how distance-vector and link-state protocols differ, and a head-to-head comparison of RIP, EIGRP and OSPF — metrics, AD values, convergence — plus a when-to-use decision matrix and five exam-style practice questions.
Static routing: the fundamentals
A static route is a route an administrator configures manually on a router. It never changes unless someone changes it — no hellos, no updates, no recalculation. The basic syntax on a Cisco router:
Configuration: ip route 192.168.20.0 255.255.255.0 192.168.10.2
Sends all traffic for the 192.168.20.0/24 network to next-hop 192.168.10.2. The route appears in the routing table marked S with administrative distance 1 by default.
Static routes are simple, predictable, consume zero bandwidth (no protocol chatter) and have no convergence delay. Their weakness is obvious: they don't react. If a link fails, the router keeps forwarding into the dead link until a human fixes it. That makes them right for:
- Small, stable networks — a handful of routers whose topology never changes.
- Stub networks — a site with a single exit path, where "everything goes out this way" is the only sensible answer.
- Default routes — see below; these are static routes and nearly universal.
- Specific overrides — because a static route (AD 1) beats any dynamic route (except connected), it's the clean way to force a path.
- Backup paths — via floating static routes (below).
The default route
A default route is a static route to 0.0.0.0/0 — the "route of last resort". It matches every destination with no more specific entry in the table, and on most routers it points at the ISP:
Configuration: ip route 0.0.0.0 0.0.0.0 203.0.113.1
Any packet the router can't otherwise route goes to 203.0.113.1 (the ISP gateway). This single line is what lets an entire branch office reach the internet — it's the most commonly used static route in production, and a favourite exam question.
Floating static routes
A floating static route is a static route configured with an administrative distance higher than the primary route's. While the primary route is in the table, the floating route sits idle — it "floats" above the routing table, unused. If the primary route disappears (link failure, protocol down), the floating static route drops in as a backup:
Configuration: ip route 10.0.0.0 255.0.0.0 192.168.99.1 120
This static route has AD 120, deliberately higher than the OSPF route's AD of 110. While OSPF advertises 10.0.0.0/8, OSPF's route wins and the static route floats. If OSPF fails, the static route via the backup link 192.168.99.1 takes over. Exam trap: a floating static route must have an AD higher than the protocol it backs up — a plain static route (AD 1) would always win and kill the dynamic route entirely.
Dynamic routing: distance vector vs link-state
Dynamic routing protocols let routers learn routes from each other and adapt automatically when the topology changes. The CCNA divides them into two families:
- Distance vector — routers advertise their routing tables (lists of networks and metrics) to directly connected neighbours. Each router trusts what its neighbours say: "I can reach this network in N hops/metrics." RIP is distance vector; EIGRP is an advanced distance vector (sometimes called "hybrid") because it keeps topology information like a link-state protocol. Convergence is slower because bad news propagates hop by hop, and loops are a real risk (mitigated by split horizon, route poisoning and hold-down timers).
- Link-state — routers advertise the state of their links (up/down, cost) to every router in the area. Each router independently builds a complete map of the topology and runs Dijkstra's SPF algorithm to compute its own best paths. Because every router works from the same map, convergence is fast and loops are structurally avoided. OSPF is the CCNA's link-state protocol.
For a deeper treatment of routing tables, next-hops and how routers actually forward packets, see our CCNA routing fundamentals guide.
RIP vs EIGRP vs OSPF head-to-head
The three protocols the CCNA tests, compared on the points the exam actually asks about:
| Feature | RIP (v2) | EIGRP | OSPF |
|---|---|---|---|
| Protocol type | Distance vector | Advanced distance vector | Link-state |
| Metric | Hop count (max 15; 16 = unreachable) | Composite: bandwidth + delay (DUAL) | Cost = reference BW / interface BW |
| Default AD | 120 | 90 (internal) | 110 |
| Convergence | Slow (timers up to ~180s) | Very fast (DUAL feasible successors) | Fast (SPF on topology change) |
| Update method | Full table every 30s (broadcast/multicast 224.0.0.9) | Partial, triggered, multicast 224.0.0.10 | Triggered LSAs, multicast 224.0.0.5/6 |
| Scalability | Tiny (15-hop limit) | Large enterprises | Very large (multi-area) |
| Vendor | Open standard | Cisco (standardised late, still Cisco-dominant) | Open standard |
| Used when | Legacy small networks only | All-Cisco or Cisco-heavy enterprises | Multi-vendor, large networks |
Metric detail: OSPF cost vs EIGRP composite metric
OSPF cost is simple: cost = reference bandwidth ÷ interface bandwidth. The default reference is 100 Mbps, so a FastEthernet link (100 Mbps) costs 10, a Gigabit link costs 1 — and anything faster than 100 Mbps also costs 1, which is why modern networks often raise the reference to auto-cost reference-bandwidth 10000 (10 Gbps). OSPF sums costs along the whole path and picks the lowest total.
EIGRP's metric is a composite computed by the DUAL algorithm: it uses the minimum bandwidth along the entire path and the cumulative delay of all outgoing interfaces (with the classic K-value formula 256 × (BW + DLY)). EIGRP also keeps feasible successors — pre-computed loop-free backup paths — which is why its convergence is effectively instant: it doesn't recalculate, it promotes the backup.
Administrative distance (AD) reference
When two sources disagree about how to reach the same destination, the router installs the route with the lowest AD. Memorise these — they're asked as often as subnetting:
| Route source | AD | Notes |
|---|---|---|
| Connected | 0 | Directly attached interfaces; always wins |
| Static | 1 | Default; can be overridden (floating statics) |
| EIGRP summary | 5 | Summarised EIGRP routes |
| EIGRP (internal) | 90 | Routes within the EIGRP domain |
| OSPF | 110 | All OSPF routes (intra/inter-area/external) |
| RIP | 120 | Highest of the common protocols |
| EIGRP (external) | 170 | Redistributed into EIGRP |
Practical consequence: EIGRP (90) beats OSPF (110), which beats RIP (120). A static route (1) beats all of them — which is exactly why a floating static route needs its AD raised deliberately.
When to use which: the decision matrix
| Scenario | Best choice | Why |
|---|---|---|
| Branch office with one ISP link | Static default route | One path, never changes; zero overhead |
| Tiny network (< 10 routers), stable | Static routes | Simple, predictable, no protocol to run |
| Backup link that should only activate on failure | Floating static route | Higher AD keeps it dormant until needed |
| Legacy small network (exam/lab only) | RIP | Simple, but hop limit and slow convergence rule it out for new builds |
| All-Cisco medium/large enterprise | EIGRP | Fastest convergence, easy config, no area design needed |
| Multi-vendor network, any size | OSPF | Open standard; runs on every vendor's gear |
| Very large network needing hierarchy | OSPF multi-area | Areas limit SPF scope and LSA flooding |
For the deep dive into OSPF configuration, areas, DR/BDR election and the neighbours table, read our CCNA OSPF explained guide.
Quick-fire practice questions
Five exam-style questions on static vs dynamic routing. Answer from memory, then click to reveal.
Q1. A router learns 172.16.0.0/16 via EIGRP (AD 90), OSPF (AD 110) and RIP (AD 120). Which route is installed in the routing table?
The EIGRP route. The router compares administrative distance and installs the lowest: EIGRP (90) < OSPF (110) < RIP (120). Note that AD only breaks ties between different sources — within one protocol, the metric decides.
Q2. Which command creates a floating static route to 10.10.0.0/16 over next-hop 192.168.5.1 that backs up an OSPF primary?
ip route 10.10.0.0 255.255.0.0 192.168.5.1 120. The trailing 120 sets AD above OSPF's 110, so the static route floats until OSPF's route disappears. A plain static (AD 1) would wrongly win over OSPF permanently.
Q3. Why is RIP limited to 15 hops, and what does hop 16 mean?
Hop 16 means unreachable ("infinity"). Distance-vector protocols can't distinguish a genuinely long path from a routing loop, so RIP caps the metric at 15 and treats 16 as poisoned/infinity — this bounds loops but also caps RIP networks at 15 routers across. It's why RIP is unsuitable for anything beyond tiny networks.
Q4. OSPF's default reference bandwidth is 100 Mbps. What is the OSPF cost of a GigabitEthernet interface, and why is this a problem on modern links?
Cost 1. 100 ÷ 1000 = 0.1, rounded up to 1. The problem: 10 Gbps and 100 Gbps links also cost 1, so OSPF can't tell a gigabit path from a hundred-gigabit path. Fix: auto-cost reference-bandwidth 10000 (10 Gbps) so costs reflect real link speeds.
Q5. A stub router has a static default route and runs OSPF. Which statement about its AD of 1 is correct: does the default route beat OSPF's routes to specific destinations?
No — AD is only compared between routes to the same destination. The router always uses the most specific (longest prefix) match first; the default route 0.0.0.0/0 only handles traffic with no more specific entry. AD decides only when two sources advertise the same prefix.
Routing on the CCNA 200-301 exam
Routing sits at the heart of the CCNA blueprint: static routes and default routes (configuration and verification), the OSPF neighbour/DB/SPF process, and comparing protocol characteristics. Expect scenario questions like "two protocols advertise the same network — which wins?" (AD decides) and "which route does the router use?" (longest prefix match decides). Drill the AD table until connected 0 / static 1 / EIGRP 90 / OSPF 110 / RIP 120 is reflex, and know the show ip route codes (C, S, D, O, R) cold.
Ready for more? Work through the OSPF deep-dive, the routing fundamentals guide, or grind the concept into memory with our flashcards and CCNA practice questions.
Keep studying: OSPF explained Routing fundamentals Flashcards Practice questions
Ready to test yourself?
Routing is one of the heaviest-weighted topics on the CCNA 200-301. Take the free 25-question mock test — no sign-up — and find out where you stand. One subscription (£5/month or £39/year) unlocks all 370 exam-style questions, 20 in-browser labs and 300 flashcards across all 10 certifications.
Start the free mock test →