1.1 Troubleshoot administrative distance across every routing source

ENARSI 300-410 v1.1 · 1.0 Layer 3 Technologies

When two routing sources offer the same prefix, the router installs the one with the lowest administrative distance (AD). Metrics only compare routes from the same source. Most AD problems in ENARSI come from redistribution and floating statics: a worse path wins because its source is more trusted.

What you must know

The order a router uses

  1. Longest prefix match wins first: a /24 always beats a /16, whatever their AD.
  2. For the same prefix and length, the source with the lowest AD is installed in the RIB.
  3. From that one source, the lowest metric wins; equal metrics load-share (maximum-paths).
SourceDefault ADCode in show ip route
Connected0C
Static (to a next hop or interface)1S
EIGRP summary (Null0)5D
eBGP20B
EIGRP internal90D
OSPF (intra, inter and external)110O, O IA, O E1/E2
IS-IS115i
RIP120R
EIGRP external170D EX
iBGP and locally aggregated BGP200B
Unknown (never installed)255–

A worse path wins: the redistribution case

R1 and R2 run OSPF toward HQ and EIGRP toward the branch, and both redistribute EIGRP into OSPF. BR1 redistributes its LAN 10.20.0.0/24 into EIGRP, so R1 and R2 learn it as EIGRP external (D EX, AD 170). R1 redistributes it into OSPF first. R2 now has two offers for the same prefix: D EX from BR1 (170) and O E2 from R1 (110). OSPF wins on AD, even though the EIGRP path is direct.

R1 goes straight to the branch (1). R2 detours through HQ (2) because of AD alone. The fix is to make the router trust the right source: tag and filter at the redistribution points (1.3), or raise OSPF's external distance on both ASBRs with distance ospf external 175, so EIGRP external (170) wins there.

Changing AD

! Floating static: only used when OSPF loses 0.0.0.0/0
ip route 0.0.0.0 0.0.0.0 198.51.100.1 250
!
router ospf 1
 distance ospf external 175          ! O E1/E2 only
 distance 95 10.0.12.2 0.0.0.0 22    ! routes from neighbour RID 10.0.12.2 matching ACL 22
!
router eigrp 100
 distance eigrp 90 175               ! internal, external
!
router bgp 65001
 distance bgp 20 200 200             ! external, internal, local

The distance <ad> <source> <wildcard> [acl] form matches the router ID of the advertising router for OSPF, and the neighbour address for EIGRP, RIP and BGP. An AD of 255 means the route is never installed, which is a crude but valid filter.

R2# show ip route 10.20.0.0
Routing entry for 10.20.0.0/24
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 2
  Last update from 10.0.0.1 on GigabitEthernet0/0, 00:03:11 ago
  Routing Descriptor Blocks:
  * 10.0.0.1, from 10.0.12.1, 00:03:11 ago, via GigabitEthernet0/0
      Route metric is 20, traffic share count is 1

Commands

show ip route <prefix>The winning source, its AD and metric.
show ip protocolsEach protocol's distances, including changed ones.
show ip route staticStatic routes in the RIB (a floating static is absent while the dynamic route lives).
show running-config | section routerEvery distance statement.

Exam traps

Check yourself

R1 learns 10.1.1.0/24 from OSPF and from iBGP. Which is installed?
OSPF (110 beats iBGP 200).
What AD makes a floating static back up an EIGRP external route?
Anything above 170, for example 180.
A route has AD 255. What happens?
It is never installed in the RIB.
Does AD matter between 10.0.0.0/8 and 10.1.0.0/16?
No. Different prefix lengths both go in the table, and the longest match forwards.

Labs

Try it live: Administrative distance: one prefix, three sources

More topics in 1.0 Layer 3 Technologies