Layer 3 Technologies · Topic 1 of 8
Administrative Distance and Loop Prevention
Learn how administrative distance picks between routing sources, how floating static routes work, and how split horizon, poisoning and tags stop loops.
- 5 min
- Lower AD wins between different sources. Metric is only compared within one protocol.
- Key defaults: connected 0, static 1, eBGP 20, internal EIGRP 90, OSPF 110, RIP 120, external EIGRP 170, iBGP 200.
- A floating static route uses an AD above the dynamic protocol.
What it is
Administrative distance ranks how much a router trusts each source of routing information, and loop prevention stops bad routes from circling.
When two sources offer a route to the same prefix, the lower administrative distance (AD) wins. The metric is only compared between routes learned from the same protocol. AD is local to the router and is never sent in updates.
Loops appear when routers feed each other stale or copied routes. Several tools prevent this: split horizon, route poisoning, filtering and tagging.
How it works
The router first picks the longest prefix match, then the lowest AD, and then the lowest metric.
Default administrative distances
| Source | Default AD |
|---|---|
| Connected interface | 0 |
| Static route | 1 |
| EIGRP summary route | 5 |
| External BGP | 20 |
| Internal EIGRP | 90 |
| OSPF | 110 |
| IS-IS | 115 |
| RIP | 120 |
| External EIGRP | 170 |
| Internal BGP | 200 |
| Unusable source | 255 |
A route with AD 255 is never installed in the routing table.
Changing and troubleshooting AD
A floating static route has an AD higher than the dynamic protocol, so it is only used as a backup. You set the AD at the end of the ip route command.
R1(config)# ip route 10.1.1.0 255.255.255.0 192.0.2.2 150
R1(config)# router eigrp 100
R1(config-router)# distance eigrp 90 170
R1(config-router)# distance 150 192.168.12.2 0.0.0.0
The last line gives routes learned from one neighbour a different AD. The AD can also be matched with an access list to affect only chosen prefixes.
To troubleshoot, check what is installed and where it came from.
R1# show ip route 10.1.1.0
R1# show ip protocols
show ip route shows the AD and metric in brackets, for example [110/20]. show ip protocols lists the default distances and any distance overrides.
A common fault is a route that exists in the protocol database but is not in the routing table. Another source with a lower AD is usually winning.
Split horizon and route poisoning
Split horizon stops a router advertising a route out of the interface it learned it from. It is on by default for RIP and for EIGRP on most interfaces.
Route poisoning advertises a failed route with an infinite metric. RIP uses metric 16 and EIGRP uses an unreachable metric. Poison reverse sends the route back out of the learning interface as unreachable.
Split horizon can break a hub and spoke design. On a DMVPN hub, EIGRP split horizon is turned off so spokes hear each other's networks.
Hub(config)# interface Tunnel0
Hub(config-if)# no ip split-horizon eigrp 100
Filtering and tagging
When routes are redistributed in more than one place, a route can return to where it started. This is a routing feedback loop.
Tags prevent it. Set a tag when redistributing in, and deny that tag when redistributing back out.
R1(config)# route-map OSPF-TO-EIGRP deny 10
R1(config-route-map)# match tag 100
R1(config)# route-map OSPF-TO-EIGRP permit 20
R1(config-route-map)# set tag 100
A distribute-list with a prefix list or ACL blocks selected prefixes in or out of a routing process. A prefix list is better for matching exact prefixes and lengths.
When a route flaps between two sources, look for a redistribution point with no tag or filter.
What to remember for the exam
Seven facts cover most questions on this topic.
- Lower AD wins between different sources. Metric is only compared within one protocol.
- Key defaults: connected 0, static 1, eBGP 20, internal EIGRP 90, OSPF 110, RIP 120, external EIGRP 170, iBGP 200.
- A floating static route uses an AD above the dynamic protocol.
- AD 255 means the route is never installed.
- Split horizon blocks advertising a route back out the interface it came from.
- Route poisoning advertises a failed route as unreachable.
- Tags and distribute lists prevent redistribution feedback loops.
Longest prefix match is decided before AD. A more specific route with a worse AD still wins over a less specific one.
Common mistakes
These five mistakes appear often.
Comparing metrics across protocols. An OSPF cost and an EIGRP metric are not comparable, so AD decides.
Setting a floating static too low. A floating static with an AD below the protocol replaces the dynamic route instead of backing it up.
Forgetting external AD. Redistributed EIGRP routes use 170, not 90, so they lose to routes with a lower AD.
Leaving split horizon on at a hub. Spokes then never learn each other's prefixes.
Redistributing without tags. Two redistribution points can send routes back and forth.
Check yourself
Work through these three questions.
Two routes to the same prefix come from OSPF and from internal EIGRP, which is installed?
The EIGRP route, because its default AD of 90 is lower than the OSPF AD of 110.
How do you make a static route act as a backup for a dynamic route?
Give it an AD higher than the dynamic protocol, for example
ip route 10.1.1.0 255.255.255.0 192.0.2.2 150.What does route poisoning do?
It advertises a failed route with an infinite metric, so neighbours stop using it quickly.
Topic 1 of 8 in Layer 3 Technologies
Test yourself on Layer 3 Technologies
The full Cisco CCNP 300-410 ENARSI question bank has 857 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.