16 Languages, One Live Classroom Cisco, Cyber & Cloud
HSR Sector 6 · Bangalore +91 96110 27980 Mon–Sat · 09:30–20:30
Routing · 6 min read · Updated 29 August 2026

Administrative distance: how a router decides who to believe

Administrative distance ranks the trustworthiness of route sources from 0 to 255. Lower wins. When two protocols offer a route to the same destination, the router picks the lower AD and discards the other — before it looks at any metric. Connected is 0, static is 1, OSPF is 110, RIP is 120.

The reason this mechanism exists is more interesting than the table. Suppose a router learns a route to 10.20.0.0/16 from RIP at three hops, and the same route from OSPF at a cost of 40. Which is better? The question has no answer. Hops and costs measure different things on different scales — there is no conversion between them. So rather than attempt an impossible comparison, the router sidesteps it: decide which protocol to trust, then use that one's route.

The default table

Route sourceADNotes
Connected interface 0 Directly attached. Nothing beats it
Static route 1 You said so, so the router believes you
EIGRP summary route 5
External BGP 20 Routes from another autonomous system
Internal EIGRP 90 Cisco proprietary
IGRP 100 Long obsolete
OSPF 110 The CCNA routing protocol
IS-IS 115 Common in service provider cores
RIP 120 Distrusted for good reason
External EIGRP 170 Redistributed in from elsewhere
Internal BGP 200 Within the same autonomous system
Unusable 255 Never installed in the routing table

The three highlighted rows are the ones CCNA leans on hardest. Note the shape of the list: things the router knows for certain sit at the top, things an administrator asserted come next, and protocols that worked it out for themselves follow — ordered roughly by how sophisticated their view of the network is. RIP counting hops and ignoring bandwidth is why it sits near the bottom.

Reading it in the routing table

The bracketed pair after each route is [AD/metric]:

R1# show ip route
Codes: C - connected, S - static, O - OSPF, D - EIGRP, R - RIP

C        192.168.1.0/24 is directly connected, GigabitEthernet0/0
S        10.99.0.0/16 [1/0] via 192.168.1.2
O        10.20.0.0/16 [110/40] via 192.168.1.2, 00:14:22, GigabitEthernet0/0
D        172.16.0.0/16 [90/2172416] via 192.168.1.3, 00:09:11, GigabitEthernet0/0

The EIGRP metric of 2,172,416 looks enormous beside OSPF's 40. It is not worse — it is a different unit entirely, which is precisely the point administrative distance exists to avoid arguing about. Had RIP also offered 10.20.0.0/16, it would not appear here at all: RIP's 120 loses to OSPF's 110 and the route is simply discarded, not merely deprioritised.

Floating static routes — the one time you use AD as a tool

Most of the time AD is something you read. Floating statics are where you set it deliberately. The scenario is a primary MPLS link running OSPF and a backup broadband link that should carry nothing until the primary dies.

An ordinary static route has AD 1, so it would beat OSPF's 110 and hijack all your traffic onto the backup permanently — the opposite of what you want. Give it a distance above 110 instead:

! Backup route via broadband — AD 130 beats nothing while OSPF is alive
R1(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1 130

R1# show ip route static
! nothing — the OSPF default at 110 is winning, as intended

! ... primary link fails, OSPF withdraws its default ...

R1# show ip route static
S*    0.0.0.0/0 [130/0] via 203.0.113.1        ← backup now installed

The route "floats" above the dynamic one, invisible, until the water drops. When OSPF recovers, its 110 wins again and the static floats back out. No tracking, no scripts, no failover logic — just one number in the right place.

The fault it causes

A static route at AD 1 outranks every dynamic protocol. That means a static entry typed during a maintenance window and never removed will quietly override whatever OSPF later learns — including a correct path — and it will keep doing so silently, because nothing about the configuration looks wrong. When traffic is taking an inexplicable path, run show ip route and look at the code letter: an S where you expected an O is your answer, and it is one of the most common causes of a mysterious routing problem in a network that was working yesterday.

Frequently asked

What is administrative distance?

Administrative distance is a number from 0 to 255 that ranks how much a router trusts the source of a route. When two different sources offer a route to the same destination, the router installs the one with the lower administrative distance and discards the other — before it compares metrics at all. A directly connected interface is 0, a static route is 1, OSPF is 110 and RIP is 120, so an OSPF route will always beat a RIP route to the same prefix regardless of hop counts or costs.

What is the difference between administrative distance and metric?

Administrative distance compares routes from different sources; metric compares routes from the same source. The router checks administrative distance first and only consults the metric if the competing routes came from the same protocol. This ordering exists because metrics are not comparable across protocols — RIP counts hops, OSPF sums interface costs, EIGRP combines bandwidth and delay. There is no meaningful way to say whether three hops beats a cost of 40, so the router avoids the question by ranking the protocols instead.

What is a floating static route?

A floating static route is a static route deliberately given an administrative distance higher than the routing protocol you normally use, so it sits inactive until the protocol's route disappears. Configure it by adding a distance value to the end of the ip route command — for example a static route with distance 130 will stay out of the routing table while an OSPF route at 110 exists, then install itself the moment OSPF withdraws. It is the standard way to configure a backup WAN link that only carries traffic when the primary fails.

Can you change administrative distance?

Yes. For a static route, append the value to the ip route command. For a routing protocol, the distance command under the router process changes it, either globally or for specific sources. Changing protocol defaults is rare and risky in production because it can create routing loops when different routers disagree about which source to trust — but adjusting a single static route's distance to create a floating backup is routine and safe.

Why is a static route trusted more than OSPF?

Because a human typed it. A static route has an administrative distance of 1, beaten only by a directly connected interface at 0, on the reasoning that an explicit instruction from an administrator should override whatever a protocol worked out on its own. That assumption is usually right and occasionally the cause of a long outage — a forgotten static route silently overriding a correct dynamic one is a classic fault, and show ip route showing an S where you expected an O is the tell.

Administrative distance sits in the CCNA IP Connectivity domain — the largest at 25% of the exam. Related: OSPF and link-state routing, the CCNA OSPF lab, IP connectivity and inter-VLAN routing.