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:

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:

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:

FeatureRIP (v2)EIGRPOSPF
Protocol typeDistance vectorAdvanced distance vectorLink-state
MetricHop count (max 15; 16 = unreachable)Composite: bandwidth + delay (DUAL)Cost = reference BW / interface BW
Default AD12090 (internal)110
ConvergenceSlow (timers up to ~180s)Very fast (DUAL feasible successors)Fast (SPF on topology change)
Update methodFull table every 30s (broadcast/multicast 224.0.0.9)Partial, triggered, multicast 224.0.0.10Triggered LSAs, multicast 224.0.0.5/6
ScalabilityTiny (15-hop limit)Large enterprisesVery large (multi-area)
VendorOpen standardCisco (standardised late, still Cisco-dominant)Open standard
Used whenLegacy small networks onlyAll-Cisco or Cisco-heavy enterprisesMulti-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 sourceADNotes
Connected0Directly attached interfaces; always wins
Static1Default; can be overridden (floating statics)
EIGRP summary5Summarised EIGRP routes
EIGRP (internal)90Routes within the EIGRP domain
OSPF110All OSPF routes (intra/inter-area/external)
RIP120Highest of the common protocols
EIGRP (external)170Redistributed 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

ScenarioBest choiceWhy
Branch office with one ISP linkStatic default routeOne path, never changes; zero overhead
Tiny network (< 10 routers), stableStatic routesSimple, predictable, no protocol to run
Backup link that should only activate on failureFloating static routeHigher AD keeps it dormant until needed
Legacy small network (exam/lab only)RIPSimple, but hop limit and slow convergence rule it out for new builds
All-Cisco medium/large enterpriseEIGRPFastest convergence, easy config, no area design needed
Multi-vendor network, any sizeOSPFOpen standard; runs on every vendor's gear
Very large network needing hierarchyOSPF multi-areaAreas 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.

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 →