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
- Recite the default AD of connected, static, EIGRP (internal, external, summary), eBGP, iBGP, OSPF, IS-IS and RIP.
- Explain why the longest match beats AD, and AD beats metric.
- Build a floating static route and say when it appears in the table.
- Change AD with
distanceper protocol, per source or per prefix, and predict the result.
The order a router uses
- Longest prefix match wins first: a /24 always beats a /16, whatever their AD.
- For the same prefix and length, the source with the lowest AD is installed in the RIB.
- From that one source, the lowest metric wins; equal metrics load-share (
maximum-paths).
| Source | Default AD | Code in show ip route |
|---|---|---|
| Connected | 0 | C |
| Static (to a next hop or interface) | 1 | S |
| EIGRP summary (Null0) | 5 | D |
| eBGP | 20 | B |
| EIGRP internal | 90 | D |
| OSPF (intra, inter and external) | 110 | O, O IA, O E1/E2 |
| IS-IS | 115 | i |
| RIP | 120 | R |
| EIGRP external | 170 | D EX |
| iBGP and locally aggregated BGP | 200 | B |
| 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, localThe 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 1Commands
show ip route <prefix> | The winning source, its AD and metric. |
show ip protocols | Each protocol's distances, including changed ones. |
show ip route static | Static routes in the RIB (a floating static is absent while the dynamic route lives). |
show running-config | section router | Every distance statement. |
Exam traps
- A /25 static never competes with a /24 dynamic route: different prefixes, so both are installed.
- EIGRP external (170) loses to OSPF (110), even though EIGRP internal (90) beats it.
- OSPF
distancewith a source matches the advertising router's RID, not the neighbour's interface address. - A floating static whose AD is lower than the dynamic route's is not floating: it wins at once.
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
- 1.2 Troubleshoot route maps in any routing protocol: attributes, tags and filters
- 1.3 Troubleshoot routing loop prevention: filters, tags, split horizon and poisoned routes
- 1.4 Troubleshoot redistribution between routing protocols and other route sources
- 1.5 Troubleshoot manual and automatic route summarization
- 1.6 Configure and verify policy-based routing
- 1.7 Configure and verify VRF-Lite
- 1.8 Describe how Bidirectional Forwarding Detection works
- 1.10 Troubleshoot OSPFv2 and OSPFv3
- 1.11 Troubleshoot internal and external BGP, globally and in a VRF