Book an info sessionInfo session

Routing table components: prefix, mask, next hop, AD, metric, gateway of last resort

Cisco CCNA Preparation · lesson 17 of 36 · 25 min

How Routers Forward Packets

A router uses its routing table to decide where to forward each packet. It looks up the destination IP address and finds the longest matching prefix. If no match exists, the packet is dropped (unless a default route is configured).

Static routes are manually configured by an administrator. They are simple, predictable, and use no bandwidth for routing updates — but they don’t adapt automatically to topology changes.

Static Route Types

Administrative Distance

Administrative Distance (AD) is a trustworthiness rating for routing sources. Lower AD = more trusted. When multiple sources know a route, the one with the lowest AD wins.

Floating static routes

A floating static route has a manually set AD higher than the primary routing protocol (e.g. AD 150 for a backup to an OSPF route at AD 110). It only appears in the routing table when the primary route is gone.

Configuring Static Routes

Flashcard Drill

Static route Manually configured route — simple, predictable, no routing updates, no auto-adaptation. Default route ip route 0.0.0.0 0.0.0.0 — matches any destination; used for internet access. Administrative Distance Trustworthiness rating for routing sources — lower is more trusted. Connected=0, Static=1, OSPF=110. Floating static route Static route with higher AD than primary protocol — used as backup, only active when primary fails. Longest prefix match Router selects the most specific matching route — /28 beats /24 for the same destination. show ip route Displays the routing table — all known networks and their sources. Next-hop IP The IP address of the next router to forward the packet to. Host route /32 route to a single specific host IP address. AD of OSPF 110 — OSPF routes have AD 110. AD of static route 1 — static routes are highly trusted, second only to connected routes.

Knowledge Check

Static Routing — 10 Questions

Which command configures a default route pointing to 10.0.0.1?

  • ip route 0.0.0.0 0.0.0.0 10.0.0.1
  • ip route default 10.0.0.1
  • ip default-gateway 10.0.0.1
  • ip route 255.255.255.255 0.0.0.0 10.0.0.1

Answer: ip route 0.0.0.0 0.0.0.0 10.0.0.1
The default route uses 0.0.0.0 0.0.0.0 as the network and mask — matches any destination.

What is the Administrative Distance of a static route?

  • 0
  • 1
  • 90
  • 110

Answer: 1
Static routes have AD 1 — second only to connected routes (AD 0).

A floating static route has AD 150. The primary OSPF route has AD 110. Which route is used?

  • Floating static (AD 150)
  • OSPF (AD 110)
  • Both equally
  • Neither

Answer: OSPF (AD 110)
Lower AD wins. OSPF at 110 is more trusted than the floating static at 150.

A /32 static route that points to a single host IP is called a _____ route.

Answer: host
A /32 route matches exactly one IP address — called a host route.

Which command verifies the routing table?

  • show interfaces
  • show ip route
  • show running-config
  • show arp

Answer: show ip route
show ip route displays all routes in the routing table and how they were learned.

Static routes automatically update when the network topology changes.

  • True
  • False

Answer: False
Static routes are manually configured and do not adapt to topology changes — that is a key limitation.

What is the AD of a connected route?

  • 0
  • 1
  • 90
  • 110

Answer: 0
Connected routes have AD 0 — the most trusted source (directly attached network).

When two routes match a destination, the router selects:

  • The route with the highest AD
  • The route with the lowest metric
  • The most specific (longest prefix) match
  • The first route in the table
  • Answer: The most specific (longest prefix) match

Longest prefix match — the most specific route (/28 beats /24) is always preferred.

The AD of OSPF is _____.

Answer: 110
OSPF has AD 110. Static routes (AD 1) are more trusted; RIP (AD 120) is less trusted.

A default route matches only traffic destined for the 0.0.0.0 network.

  • True
  • False

Answer: False
A default route (0.0.0.0/0) matches ANY destination — it is the catch-all route of last resort.


Previous lesson: Wireless security: WPA2 Personal/Enterprise, WPA3, 802.1X, EAP methods
Back to Cisco CCNA Preparation
Next lesson: Static routing: default, network, host, and floating static routes