Week 6 · Lesson 12

Static and Dynamic Routing

A router only forwards to networks it knows. There are exactly two ways to teach it: enter the routes by hand (static) or let protocols exchange routes automatically (dynamic). Knowing when to choose each — and the default administrative distances — is guaranteed exam material.

CCNA 200-301 Domain 3.0 IP Connectivity Verified 2026-10-11
Part 1

Three ways a route gets into the table

Every route in a routing table is either directly connected (added automatically when an interface comes up), static (typed in by an administrator), or dynamic (learned from a routing protocol that talks to other routers). The first kind is not a choice. The real design decision is static versus dynamic, and it is fundamentally a trade-off between control and automation.

Connected

Created by IOS when an interface is up and addressed. Administrative distance 0. Always wins for its own subnet.

Static

Written by an administrator, one route at a time. Administrative distance 1. Never changes unless you change it.

Dynamic

Learned by exchanging updates with neighbours. Reconverges on its own after a failure.

Route source · select one to see how it behaves

Part 2

Static routes: what and when

A static route is a manually configured statement that says “to reach this network, send packets to this next hop”. The router never negotiates it and never changes it; if the topology changes, you change it by hand.

Use static routes when:
Small, flat, stable networks, where dynamic updates add little value.
There is a stub link or stub network — a link with only one exit, so there is only one way out and nothing to converge.
There is no bandwidth or CPU to spare for protocol updates (a low-speed WAN link, a tiny branch router).
You need a very specific or controlled path, such as a fixed backup route.
Definition — static route
A static route is a route entered manually by an administrator. It is fixed, does not adapt to topology changes, and has a default administrative distance of 1 — better (lower) than any dynamic protocol, so it wins against a dynamic route to the same prefix. The trade-off is that it does not adapt: a dead next hop is not replaced unless you also configure a floating static route.
Part 3

Configuring a static route

The syntax is ip route <destination> <mask> <next-hop or interface>. Use the remote network as the destination and the neighbouring router’s address as the next hop.

Build a static route · pick the options
1 of 3 forms

      

The route appears with the code S, an administrative distance of 1, and a metric of 0 (static routes carry no protocol metric). You can point the route at an exit interface instead of a next-hop address on point-to-point links, but on Ethernet a next-hop address is preferred because it avoids extra overhead and ambiguity.

The default static route

The default static route is a special static route for 0.0.0.0/0 — the gateway of last resort from Lesson 11. It says “anywhere I do not specifically know, send here”, and it is how an edge router points to its ISP.

Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.10.2

Because 0.0.0.0/0 has a prefix length of zero, it matches everything and is chosen only when no more specific route exists — the longest-prefix rule guarantees it. It is by far the most common static route you will write in a lab.

Exam tip. ip route 0.0.0.0 0.0.0.0 <next-hop> is the IPv4 default route. Both the destination and the mask are 0.0.0.0. A route written that way is also called the quad-zero route.

Floating static routes

A floating static route is a static route given a higher administrative distance than the primary route it backs up. Because lower AD wins, a floating static stays out of the active path while the primary route exists, and “floats” into the table to take over only when the primary is lost. The example below backs up an OSPF route (AD 110) with a static route set to AD 200, so it is inactive while OSPF is up.

! primary route is OSPF (AD 110) to the same network
Router(config)# ip route 192.168.20.0 255.255.255.0 192.168.40.2 200
! the trailing 200 is the administrative distance of this static route

Any AD greater than the primary route’s works; 200 is a common choice because it is higher than every common interior protocol. If the OSPF route disappears, the static route (AD 200, still lower than “unreachable”) becomes the best match and traffic reroutes.

Part 4

Dynamic routing protocols

A dynamic routing protocol lets routers advertise the networks they know to their neighbours, so the whole network learns reachability automatically and reconverges when links fail. The three you must know for CCNA are RIP, OSPF, and EIGRP.

ProtocolTypeMetricDefault ADKey points
RIPDistance-vectorHop count120Simplest; maximum 15 hops (16 = unreachable); periodic updates.
OSPFLink-stateCost (bandwidth-based)110Runs Dijkstra’s SPF; hierarchical, area-based (area 0 is the backbone).
EIGRPHybrid (advanced distance-vector)Composite (bandwidth + delay)90Cisco-origin; fast convergence; internal AD 90.
The three protocols · select one

Note. “Distance-vector” protocols learn routes from neighbours’ rumours (distance and direction); “link-state” protocols exchange topology details so every router builds the same map. EIGRP is classed as a hybrid or advanced distance-vector protocol.
Part 5

Administrative distance

Administrative distance (AD) is a trust rating from 0 to 255. When two sources offer a route to the same prefix, the router installs the one with the lower distance. These are the canonical values you must memorise.

Route sourceDefault administrative distanceCode
Connected interface0C
Local (interface host route)0L
Static route1S
EIGRP (internal)90D
OSPF110O
RIP120R
Which route wins? · choose two sources and a prefix relationship
Static wins

Exam tip — the ordering rule. For the same destination prefix, the router picks the lowest administrative distance. Whereas different prefix lengths are settled first by longest-prefix match. Remember the sequence: Connected 0, Static 1, EIGRP 90, OSPF 110, RIP 120.
Part 6

Static vs dynamic

The trade-off, side by side. Pick an aspect to see the trade-off in one line.

Static against dynamic · select an aspect

AspectStatic routingDynamic routing
ConfigurationManual, per routeConfigure the protocol; routes learned automatically
Adapts to failuresNo (unless a floating static is used)Yes — reconverges on its own
ScalabilityPoor in large networksGood — designed for large networks
OverheadNone (no updates sent)Uses CPU, memory, and bandwidth for updates
Control / predictabilityCompleteLess direct; depends on the protocol
Security exposureNo routing updates to spoofProtocol traffic must be protected/authenticated
Best forSmall/stable networks, stub links, default routes, backupsLarge or changing networks
Part 7

Where each appears in show ip route

Every source has its own code in the output (Lesson 11 covered the lookup itself). A static route is S, EIGRP is D, OSPF is O, and RIP is R. Directly connected networks show as C (with an L local host route for the interface address). The bracketed value shows the distance that decided the entry.

Router# show ip route
S    192.168.20.0/24 [1/0] via 192.168.10.2
O    192.168.30.0/24 [110/2] via 192.168.10.2, 00:05:31, GigabitEthernet0/1
D    192.168.40.0/24 [90/3072] via 192.168.10.2, 00:12:04, GigabitEthernet0/1
R    192.168.50.0/24 [120/1] via 192.168.10.2, 00:00:18, GigabitEthernet0/1
Cross-reference. Static route configuration and lab practice were introduced in Week 3 · Lesson 6 (Static Routing). This lesson places static routes in the wider picture of route selection.

Key terms

Part 8 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Cisco. IP Routing: Protocol-Independent Configuration Guide — static routes, floating static routes, and administrative distance. cisco.com.
  2. Cisco. IP Routing: RIP Configuration Guide, OSPF Configuration Guide, and EIGRP Configuration Guide. cisco.com.
  3. Cisco. CCNA (200-301) Exam Topics, IP Connectivity (static and dynamic routing, administrative distance). cisco.com.
  4. Hedrick, C. RFC 1058: Routing Information Protocol (1988) — distance-vector, hop-count metric, maximum 15 hops. rfc-editor.org/rfc/rfc1058.
  5. Moy, J. RFC 2328: OSPF Version 2 (1998) — link-state operation and SPF. rfc-editor.org/rfc/rfc2328.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.