Book an info sessionInfo session

Administrative distance and route selection: which route wins and why

Cisco CCNA Preparation · lesson 19 of 36 · 25 min

How Routers Choose Routes

When a router has multiple routes to the same destination, it must choose which one to install in the routing table. The selection process uses three criteria in order: longest prefix match first, then administrative distance, then metric.

Administrative Distance Values

Memorise these

The CCNA exam frequently asks AD values. The most important: Connected=0, Static=1, EIGRP=90, OSPF=110, RIP=120. Remember: lower AD = more trusted = preferred.

Floating Static Routes

A floating static route is a static route with a manually increased AD (higher than the dynamic routing protocol). It stays out of the routing table as long as the dynamic route exists. If the dynamic route disappears (link failure), the floating static route is installed as a backup.

Metric Comparison Within a Protocol

OSPF cost formula

OSPF cost = 100,000,000 / interface bandwidth (bps). A 100 Mbps interface = cost 1. A 10 Mbps interface = cost 10. A 1 Gbps interface = cost 1 (same as 100 Mbps — adjust with auto-cost reference-bandwidth).

Knowledge Check — 10 Questions

Administrative Distance and Route Selection

A router has routes to 10.1.1.0/24 via OSPF and 10.1.1.128/25 via RIP. A packet arrives for 10.1.1.130. Which route is used?

  • OSPF /24 — lower AD
  • RIP /25 — longer prefix match
  • Both routes — load balanced
  • Neither — packet is dropped

Answer: RIP /25 — longer prefix match
Longest prefix match always wins first, regardless of AD or metric. /25 is more specific than /24 for 10.1.1.130, so the RIP route is used.

What is the default administrative distance of OSPF?

  • 90
  • 100
  • 110
  • 120

Answer: 110
OSPF has a default AD of 110. EIGRP=90, RIP=120. Lower AD = more trusted = preferred when two protocols have routes to the same prefix.

A router learns the same prefix from EIGRP (AD 90) and OSPF (AD 110). Which route is installed?

  • OSPF — higher AD
  • EIGRP — lower AD
  • Both — equal cost load balancing
  • The one with the better metric

Answer: EIGRP — lower AD
When two routing sources have routes to the same prefix, the lower AD wins. EIGRP (90) beats OSPF (110). Only the EIGRP route is installed.

What is the purpose of a floating static route?

  • A route that changes dynamically
  • A backup static route with a higher AD than the primary dynamic route
  • A route that floats between routing tables
  • A default route

Answer: A backup static route with a higher AD than the primary dynamic route
A floating static route has a manually set AD higher than the dynamic protocol. It stays out of the table while the dynamic route exists, then installs as backup if the dynamic route fails.

What is the default AD of a directly connected interface?

  • 0
  • 1
  • 5
  • 10

Answer: 0
Connected interfaces have AD 0 — the most trusted source. A router always knows its directly attached networks.

OSPF calculates cost based on:

  • Hop count
  • Delay
  • Bandwidth (100 Mbps / interface bandwidth)
  • MTU
  • Answer: Bandwidth (100 Mbps / interface bandwidth)

OSPF cost = 100,000,000 / bandwidth in bps. Lower cost = better path. Adjust the reference bandwidth with auto-cost reference-bandwidth for Gigabit networks.

Which command shows the routing table including AD and metric for each route?

  • show ip protocols
  • show ip route
  • show interfaces
  • show ip ospf neighbor

Answer: show ip route
show ip route displays all routes with their source (C=connected, S=static, O=OSPF, D=EIGRP, R=RIP), AD/metric in brackets [AD/metric], and next hop.

What AD value makes a static route a floating static (backup) route behind OSPF?

  • 1
  • 90
  • 111 or higher
  • 255

Answer: 111 or higher
To float behind OSPF (AD 110), the static route AD must be higher than 110. Common choices: 200 or 254. AD 255 means the route is never installed.

In the routing table output [110/2], 110 is the administrative _____ and 2 is the metric.

Answer: distance
Routing table entries show [AD/metric]. [110/2] means OSPF (AD 110) with a cost of 2. [90/2170112] would be EIGRP with its composite metric.

RIP uses which metric?

  • Cost (bandwidth-based)
  • Hop count
  • Delay
  • Composite (bandwidth + delay)

Answer: Hop count
RIP uses hop count as its metric (maximum 15 hops — 16 = unreachable). This is why RIP is unsuitable for large networks — it cannot distinguish between a fast and slow path with the same hop count.


Previous lesson: Static routing: default, network, host, and floating static routes
Back to Cisco CCNA Preparation
Next lesson: OSPFv2 single-area: neighbor adjacencies, DR/BDR, router ID, point-to-point vs broadcast