Addressing and routingIP connectivityBeginner28 min read

What Is Administrative distance in Networking?

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security
On This Page

Quick Definition

When a router learns two different ways to reach the same network, it needs a tiebreaker. Administrative distance is that tiebreaker. It is a number from 0 to 255, where a lower number means more trustworthy. By default, a directly connected route has a distance of 0, a static route has a distance of 1, and routes learned by OSPF have a distance of 110.

Commonly Confused With

Administrative distancevsMetric

Metric is a value used by a single routing protocol to choose the best path among multiple paths learned by that same protocol. For example, OSPF uses cost as a metric, and RIP uses hop count. Administrative distance is a separate concept used to compare routes from different protocols. Metric is about path quality, AD is about source trustworthiness.

OSPF learns two paths to network A, one with cost 10 and one with cost 20. It chooses cost 10. That is metric. If RIP also learns network A with cost 3, but RIP's AD is 120, and OSPF's AD is 110, then OSPF's route is chosen because AD is lower. Metric only matters after AD.

Administrative distancevsRoute preference

Route preference is a generic term used by some vendors (like Juniper) that is similar to administrative distance. However, the values and default can differ. On Juniper devices, a lower preference number means a more preferred route, but the default numbers are different from Cisco's AD values. For example, on Juniper, OSPF internal routes have a preference of 10, while on Cisco, OSPF has AD 110.

On a Cisco router, a static route has AD 1 and is preferred over OSPF (AD 110). On a Juniper router, a static route has a preference of 5, and OSPF has a preference of 10. The static route is still preferred, but the numbers are different.

Administrative distancevsRouting table

The routing table is the list of best routes that the router uses to forward packets. Administrative distance is one of the criteria used to decide which routes go into the routing table. A route with a lower AD is more likely to be selected for the routing table. The routing table contains the winning routes after AD and metric are considered.

A router has three possible routes to network 10.0.0.0/24. One from RIP, one from OSPF, and one static. After comparing AD values, the static route (AD 1) wins and is placed in the routing table. The routing table only shows the winner, not the losers.

Must Know for Exams

Administrative distance is a core topic in both the CCNA and Network+ exams. In the CCNA, it appears under the exam objectives for routing concepts and routing protocols. You must know the default AD values for connected routes, static routes, OSPF, EIGRP, RIP, and BGP. These values are frequently tested in multiple-choice questions that ask which route will be installed in the routing table. You will also see questions that ask you to identify the effect of changing an AD value or creating a floating static route.

In the CCNA exam, you can expect scenario-based questions. For example, a router learns the network 10.0.0.0/24 from both RIP (AD 120) and a static route (AD 1). You are asked which route the router will use. The correct answer is the static route because of its lower AD. Another common question involves troubleshooting. A network administrator adds a static backup route, but it never becomes active. You must recognize that the static route's AD is too low, so it is always active, or too high, so it is never chosen. Understanding the relationship between AD and route selection is critical.

Network+ also tests administrative distance, although in less depth. The Network+ exam focuses on the concept of route selection and the factors that influence it. You may be asked to interpret a routing table and determine why a particular route was chosen. You should know that AD is one of the first factors considered. The Network+ objectives include understanding the difference between AD and metric, and knowing that a lower AD means a more preferred route.

Both exams may present you with a scenario where multiple routing protocols are in use. You might see a question like, Which of the following routes will a router prefer? followed by a list of routes with different AD values. You need to pick the one with the lowest AD. Sometimes the question will deliberately list a route with a better metric but a higher AD, to test if you remember that AD is checked first.

For the CCNA, you should memorize the default AD values for all major protocols. Knowing these numbers cold will save you time on the exam. For Network+, you need a general understanding that different sources have different trust levels. Practical troubleshooting questions may also appear, such as Why is the router not using the OSPF route? and the answer involves a lower AD static route.

To prepare, practice reading routing tables and identifying which route is active based on AD. Simulate scenarios in Packet Tracer or GNS3 where you configure multiple protocols and observe the routing table. Understanding both the concept and the default numbers will help you answer questions quickly and correctly.

Simple Meaning

Think of administrative distance as the trust score a router gives to different sources of information about where networks are located. Imagine you are trying to find the best coffee shop in a new city. Your best friend, who lives there, tells you one place. A random person on the street tells you another. A billboard advertisement tells you a third. You are more likely to trust your best friend over the random person or the billboard. You assign a high trust level to your friend and a lower trust level to the other sources. That is exactly what a router does with administrative distance.

Every time a router learns a path to a network, it learns that path from a specific source. A network that is directly connected to one of its own interfaces is learned from the interface itself. A network that an administrator manually types in becomes a static route. A network learned by talking to other routers comes from a dynamic routing protocol like OSPF, EIGRP, or BGP. Each of these sources has a default trust score, which is the administrative distance.

When the router has two different paths to the same network, it cannot use both unless it is doing load balancing. It must pick one. It looks at the administrative distance of each path. The path with the lower number wins because the router trusts that source more. For example, a static route (distance 1) will always be chosen over an OSPF route (distance 110) to the same destination, even if the OSPF route is technically faster. Distance is about trust in the source, not about the speed of the path.

It is important to understand that administrative distance is only used when comparing routes from different routing protocols. If the same protocol learns two paths, they are compared using a different metric, like hop count in RIP or bandwidth in OSPF. Administrative distance is the first filter. It answers the question, Which source of information do I trust more? before the router even looks at how good the path is.

Full Technical Definition

Administrative distance (AD) is a numerical value assigned to a routing information source. It is used by routers running multiple routing protocols to select the best route when the same destination prefix is learned via more than one protocol. The AD acts as a preference rating. Lower values indicate a more trustworthy or preferred source. The AD does not directly describe path quality such as latency, bandwidth, or hop count, but rather the reliability of the routing protocol itself as a source of routing information.

Every routing source has a default AD value defined by the router's operating system. Cisco IOS, for example, uses these well-known defaults: Connected interface routes have an AD of 0, making them the most trustworthy. Static routes pointing to a next-hop address have an AD of 1. EIGRP summary routes have an AD of 5. External BGP routes have an AD of 20. Internal EIGRP routes have an AD of 90. OSPF routes have an AD of 110. IS-IS routes have an AD of 115. RIP routes have an AD of 120. EIGRP external routes have an AD of 170. Internal BGP routes have an AD of 200. Unknown or unreliable sources have an AD of 255, meaning the route is never installed in the routing table.

When a router learns a route, it stores it in the routing information base (RIB). If multiple protocols provide a route to the same destination, the RIB installation process compares the AD values. The route with the lowest AD is installed in the routing table. The other routes are kept in the RIB as backup or alternative routes. If the installed route fails, the router can use the next-best candidate from the RIB. This process is fundamental to route selection in a multi-protocol environment.

Network administrators can manually adjust the AD of a specific route or a whole protocol. This is common when an administrator wants to influence route selection without disabling a protocol. For example, an administrator might increase the AD of a static route to 110 so that OSPF-learned routes are preferred over it. This is called floating static routing. The static route still exists but is only used if the OSPF route disappears.

Administrative distance is not the same as a routing metric. The metric is used by a single routing protocol to choose between multiple paths learned by that same protocol. For example, OSPF uses cost as its metric. If OSPF learns two paths to the same network, it compares the cost of each path and chooses the lower cost. AD is not involved in that decision because both paths come from the same source. AD only comes into play when the paths come from different sources, such as OSPF and RIP.

In addition to default values, AD is critical in redistribution scenarios. When routes are redistributed from one protocol into another, the redistributed routes inherit the AD of the receiving protocol. This can cause unexpected routing behavior if not carefully planned. Understanding and configuring AD is a core skill for network engineers working with complex routing environments.

Real-Life Example

Imagine you are the manager of a busy restaurant kitchen. You have several sources telling you how many steaks are ready to serve. The head chef is your most trusted source. When he says, We have 20 steaks ready, you believe him immediately. The sous chef is also reliable but not as much as the head chef. The dishwasher is the least reliable source, because he is not always paying attention. You give each source a trust score. Head chef gets a 1, sous chef gets a 2, dishwasher gets a 10. Lower score means more trust. If the head chef says 20 steaks and the dishwasher says 25, you go with the head chef because his trust score is better. That is exactly how administrative distance works on a router.

Now suppose the head chef goes on break. You need information, so you turn to the sous chef. He says 18 steaks. That number is now the truth because the more trusted source is not available. In networking, if the route with the lower AD fails, the router can use the next best route from a different protocol with a higher AD. This is called a floating backup route.

Another example is planning a road trip. You ask for directions from three different apps. Google Maps is your most trusted app, Waze is second, and Apple Maps is third. You assign Google Maps an AD of 10, Waze an AD of 20, and Apple Maps an AD of 30. Google Maps tells you to take route A. Apple Maps tells you to take route B. Even if route B is shorter, you still take route A because you trust Google Maps more. That is administrative distance overriding the quality of the route. The router does the same thing. It trusts a static route (AD 1) over an OSPF route (AD 110) even if the OSPF route is faster.

Why This Term Matters

Administrative distance matters because in real-world networks, routers rarely run just one routing protocol. A company might have OSPF for internal routing and BGP for connecting to the internet. A static route might be used for a small branch office. When these protocols all advertise the same network, the router needs a clear and consistent rule to decide which route to use. Without administrative distance, the router would have no way to compare routes from different protocols, and routing decisions would be unpredictable.

For network engineers, understanding AD is essential for designing redundant and reliable networks. You can intentionally set up floating static routes as backups. If the primary dynamic route fails, the static route takes over. This ensures connectivity even when the primary routing protocol goes down. If you do not understand AD, you might accidentally create a situation where a less reliable route is used all the time, or where a backup route never activates because the AD values are not configured correctly.

Another practical reason AD matters is troubleshooting. When a router is not sending traffic where you expect, the first thing to check is the routing table. If you see a route with a lower AD than you intended, that explains the behavior. For example, if you add a static route but it is not being used, it might be because OSPF has a lower AD. You need to verify the AD values and adjust them if needed.

AD also affects how traffic flows in complex networks with route redistribution. If you redistribute OSPF routes into EIGRP, the redistributed routes get the AD of EIGRP. If there are overlapping routes from another protocol, the AD values determine which route wins. Misconfigured AD values can cause routing loops or suboptimal routing. Professionals must master AD to maintain stable and predictable network behavior.

On the job, knowing AD helps you make intentional design decisions. You can choose which protocol the router should prefer without having to turn off a protocol entirely. This gives you flexibility and control. It also helps you explain why traffic takes a certain path to your colleagues or clients. In short, AD is a fundamental building block of route selection that every networking professional must understand.

How It Appears in Exam Questions

Administrative distance questions on IT certification exams typically fall into three categories: recall of default values, route selection scenarios, and troubleshooting configurations. In recall questions, you are asked a direct question such as, What is the default administrative distance of OSPF? The choices are numbers like 90, 110, 120, and 170. You need to know that OSPF is 110. Another common recall question is, Which protocol has the lowest default administrative distance? with options like RIP, EIGRP, OSPF, and directly connected. The correct answer is directly connected because its AD is 0.

In route selection scenarios, you are given a router that learns the same network from two different protocols. For example, a router learns 192.168.1.0/24 via RIP (AD 120) and via a static route (AD 1). The question asks, Which route will be installed in the routing table? The answer is the static route because it has the lower AD. Sometimes the question adds a metric to confuse you. For instance, the RIP route has a metric of 2 hops, and the static route has a metric of 0. Even though the static route metric is better, the question is really about AD. You must ignore the metric and focus on AD first.

Troubleshooting questions present a problem. A network administrator configured a floating static route with an AD of 130 as a backup for an OSPF route (AD 110). The OSPF route fails, but the router still does not use the static route. The question asks why. The answer is that the static route has an AD of 130, but RIP (AD 120) might also have a route, or the floating static route might have been configured incorrectly. Alternatively, the static route might have an AD higher than other dynamic routes. You need to recognize that the AD must be higher than the primary protocol but lower than any other backup protocol for it to work as intended.

Another question pattern involves redistribution. A router redistributes OSPF routes into EIGRP. The redistributed routes now have an AD of 170 (EIGRP external). The original OSPF routes had an AD of 110. The question asks which route will be preferred when both are present. The OSPF route with AD 110 wins because it has a lower AD, even though it is the same network. This highlights how AD affects route selection after redistribution.

You might also see questions that require you to order routes by preference. For example, list the following routes from most preferred to least preferred: OSPF, static, directly connected, RIP. The correct order is directly connected (AD 0), static (AD 1), OSPF (AD 110), RIP (AD 120). These ordering questions test your knowledge of the default AD hierarchy.

Finally, some questions test the concept of floating static routes. You are asked, An administrator wants a static route to be used only if OSPF fails. What AD value should be assigned to the static route? The correct answer is any value greater than 110 and less than 255, typically 130 or 150. This tests your understanding of how AD controls route priority.

Practise Administrative distance Questions

Test your understanding with exam-style practice questions.

Practise

Example Scenario

Consider a small company network with two routers. Router A is connected to the internet and to a branch office network 10.10.0.0/16. The network administrator wants to ensure that the branch network is always reachable. The primary path uses OSPF to learn the route. As a backup, the administrator also configures a static route to the same network. The OSPF route has a default AD of 110. The static route, if configured normally, also has an AD of 1. If both routes exist, the router will always use the static route because AD 1 is lower than AD 110. That is not what the administrator wants. The static route should only be used when OSPF fails.

To fix this, the administrator configures the static route with an AD of 130. This is called a floating static route. Now the router will prefer the OSPF route (AD 110) over the static route (AD 130). Everything works fine. One day, the OSPF neighbor goes down. The OSPF route disappears from the routing table. The router now looks at the RIB and sees the static route with AD 130. Since it is the only route left, it installs that route in the routing table. Traffic continues to flow to the branch network using the static path.

Now imagine that the OSPF neighbor comes back. The router learns the OSPF route again. Because OSPF has a lower AD (110) than the static route (130), the OSPF route immediately takes over. The static route is removed from the routing table and kept as a backup. This happens automatically. The administrator does not need to manually switch between routes.

In this scenario, the key learning point is that the AD of the backup route must be higher than the primary protocol's AD but lower than the AD of any other potential backup. If the network also had RIP running with AD 120, then a static route with AD 130 would be used only if both OSPF and RIP failed. Understanding these relationships is crucial for designing reliable networks.

This example also shows the importance of checking the routing table when troubleshooting. If the backup route never activates, you should verify that the AD is correctly set. If the backup route is always active, it means its AD is lower than the primary protocol. The floating static route is a practical application of administrative distance that appears frequently in both exams and real-world networking.

Common Mistakes

Confusing administrative distance with metric.

Metric is used by a single routing protocol to choose between multiple paths learned by that same protocol. Administrative distance is used to choose between paths learned by different protocols. They operate at different stages of route selection.

Remember: AD compares sources (protocols), metric compares paths (within the same protocol). AD is checked first.

Thinking a lower AD means a better path quality.

AD only indicates trustworthiness of the routing source, not path performance. A static route (AD 1) might be a slow satellite link, while an OSPF route (AD 110) might be a fast fiber link. The router will still choose the static route because it trusts that source more, even if the path is slower.

AD is about trust in the source, not speed. Path quality is determined by the metric after AD is considered.

Forgetting that directly connected routes have an AD of 0.

Some learners think static routes (AD 1) are the most preferred. Directly connected routes are actually preferred over static routes because 0 is lower than 1. This affects route selection when a directly connected subnet overlaps with a static route.

Memorize the order: Directly connected (0), Static (1), EIGRP internal (90), OSPF (110), RIP (120), EIGRP external (170), BGP internal (200).

Assuming all static routes have the same AD.

The default AD for a static route is 1, but many modern routers also support named static routes or floating static routes where the AD can be configured differently. Also, a static route pointing to an exit interface can have an AD of 0 on some platforms, while a static route pointing to a next-hop address has AD 1.

Verify the AD of static routes in your router's documentation. When using floating static routes, explicitly set the AD to a value higher than the dynamic protocol's AD.

Thinking that AD applies to routes from the same protocol.

AD is only used when comparing routes from different protocols. When OSPF learns two paths to the same network, it uses cost (metric) to choose between them, not AD. AD is not even considered because both paths come from OSPF.

AD is a cross-protocol tiebreaker. Within the same protocol, use the protocol's metric. For OSPF, it is cost. For RIP, it is hop count. For EIGRP, it is a composite metric.

Assuming an AD of 255 means the route is fully trusted.

An AD of 255 actually means the route is not trusted at all and will never be installed in the routing table. It is used for routes that are unreliable or unknown. A route with AD 255 is effectively ignored.

AD values range from 0 (most trusted) to 255 (least trusted). 255 means the route is unusable.

Exam Trap — Don't Get Fooled

{"trap":"A question shows two routes to the same network: one from OSPF with a metric of 10 and another from EIGRP with a metric of 158720. The OSPF route has an AD of 110, and the EIGRP route has an AD of 90. The question asks which route will be installed in the routing table.

Many learners see the lower metric (10) and think the OSPF route is better.","why_learners_choose_it":"Learners often confuse metric and AD. They see a small metric number and assume it is the primary decision factor.

They forget that AD is evaluated before the metric. The EIGRP route with AD 90 will be installed even though its metric is much higher.","how_to_avoid_it":"Always check the AD first.

When comparing routes from different protocols, ignore the metric initially. Only consider the metric when comparing routes from the same protocol. In this case, AD 90 beats AD 110, so EIGRP wins regardless of metric."

Step-by-Step Breakdown

1

Router receives routing information

The router learns about a network from a source. This can be a directly connected interface, a manually configured static route, or a dynamic routing protocol like OSPF, EIGRP, or RIP. Each source has an associated administrative distance.

2

Route is stored in the RIB

The routing information base (RIB) is a database of all routes learned from all sources. Each entry in the RIB includes the prefix, next-hop, and the administrative distance of the source that provided it. Multiple routes to the same network can exist in the RIB.

3

Check for multiple routes to the same destination

If the RIB contains only one route for a given destination prefix, that route is automatically considered for the routing table. If there are multiple routes, the router must select the best one. The selection process begins with administrative distance.

4

Compare administrative distances

The router compares the AD values of all routes to the same destination. The route from the source with the lowest AD is chosen as the candidate for the routing table. If two routes have the same AD, the router proceeds to compare metrics.

5

If AD values are equal, compare metrics

When two routes have the same administrative distance, they come from the same routing protocol or are otherwise considered equally trustworthy. The router then uses the metric of that protocol to break the tie. For OSPF, lower cost is better. For RIP, lower hop count is better. For EIGRP, a lower composite metric is better.

6

Install the winning route in the routing table

The route that has the lowest AD, or the lowest metric if ADs are equal, is installed in the routing table. This route is used for forwarding packets. The other routes remain in the RIB as backup routes. If the installed route fails, the router can fall back to the next best candidate in the RIB.

7

Fallback upon route failure

If the route in the routing table becomes unavailable, the router removes it and checks the RIB for the next best candidate. This next candidate is determined again by AD and metric. This ensures that the router can adapt to network changes and maintain connectivity using the next most trusted source.

Practical Mini-Lesson

In a production network, administrative distance is one of the most important concepts to master because it directly influences how traffic flows. Network engineers often run multiple routing protocols for different purposes. For example, OSPF is used inside an enterprise, BGP is used for internet connectivity, and static routes are used for small remote sites. Without a clear understanding of AD, you can easily create routing loops or suboptimal traffic paths.

Let us look at a common configuration. An engineer configures OSPF on all core routers. They also need a default route to the internet. They configure a static default route on the border router pointing to the ISP. That static route has an AD of 1. They also configure OSPF to redistribute the default route. The redistributed default route in OSPF has an AD of 110. All internal routers learn two default routes: one from OSPF (AD 110) and one from the static route (AD 1). Because the static route has a lower AD, the internal routers will use the static route directly if they have it, or they will use the OSPF route if the static route is not present. This can cause traffic to bypass the intended path and might break load balancing.

To fix this, the engineer might set the AD of the static route to 115, so that the OSPF route (AD 110) is preferred. Or they might use a policy to control which route is advertised. This kind of tuning is common in real networks.

Another practical point is that you can change the AD of an entire protocol. On a Cisco router, you can use the command distance ospf intra-area 120 to change the AD of OSPF intra-area routes from 110 to 120. This is useful when you want to prefer EIGRP (AD 90) over OSPF for internal routes, but you still want to run OSPF for interoperability.

What can go wrong? The most common issue is that someone configures a floating static route with an AD that is too low. For example, they want a backup static route for OSPF, so they set the static route AD to 105. But OSPF's AD is 110. The static route now has a lower AD (105) and becomes the primary route, not the backup. This defeats the purpose of the backup. Always ensure that the floating static route's AD is higher than the primary protocol's AD.

Also, when troubleshooting, always check the routing table with show ip route. Look at the first number in brackets. For example, a route might appear as S 10.0.0.0/8 [1/0] via 192.168.1.1. The [1/0] means AD 1 and metric 0. If you see a route that you did not expect, check its AD. It could be that a static route is overriding a dynamic route, or vice versa.

Finally, remember that AD is configurable per route on some platforms. You can use the ip route command with an AD value at the end. For example, ip route 10.0.0.0 255.0.0.0 192.168.1.1 130 creates a static route with AD 130. This is the floating static route technique. Practice this in a lab environment to see how the routing table changes when the primary route fails.

Understanding AD allows you to design networks that are both redundant and predictable. It is a fundamental tool in the network engineer's toolbox. Take the time to experiment with it, and you will avoid many common pitfalls.

Memory Tip

Remember the order of AD from most to least trusted: 0 Connected, 1 Static, 90 EIGRP, 110 OSPF, 120 RIP, 170 EIGRP external. The acronym C-S-E-O-R-E could help: Connected, Static, EIGRP, OSPF, RIP, External.

Covered in These Exams

Current Exam Context

Current exam versions that test this topic — use these objectives when studying.

Related Glossary Terms

Frequently Asked Questions

What is the default administrative distance for a static route?

The default administrative distance for a static route is 1. This makes it very trustworthy, second only to directly connected routes which have an AD of 0.

Can I change the administrative distance of a routing protocol?

Yes, you can change the AD of an entire routing protocol or even individual routes. On Cisco IOS, you use the distance command under the routing protocol configuration. This is useful for influencing route selection without turning off the protocol.

What does an AD of 255 mean?

An administrative distance of 255 means the route is not trusted and will never be installed in the routing table. It is effectively unusable. This value is reserved for routes that are considered unreliable.

Is administrative distance the same as route preference?

They are similar concepts but used by different vendors. Cisco uses administrative distance. Juniper uses route preference. Both are numbers that indicate trustworthiness, but the default values differ between vendors. The lower the number, the more preferred the route.

Why would I use a floating static route?

A floating static route is used as a backup to a dynamic routing protocol. You set its AD higher than the dynamic protocol's AD. It remains inactive until the dynamic route fails, at which point the floating static route takes over. This provides redundancy without interfering with normal routing.

Does administrative distance affect routes from the same protocol?

No. Administrative distance is only used when comparing routes from different routing protocols. When the same protocol learns multiple routes to the same network, the protocol's own metric is used to choose the best path.

What is the difference between AD and cost in OSPF?

AD is a trust value assigned to the OSPF protocol itself. OSPF has a default AD of 110. Cost is an OSPF metric used to compare multiple OSPF-learned paths. AD is checked first when comparing OSPF with another protocol. If only OSPF is used, then cost is the deciding factor.

Can two different routes have the same AD?

Yes, if they come from the same routing protocol, they will have the same AD. In that case, the router compares their metrics to choose the better route. If the metrics are also equal, some routers can load balance across both paths.

Summary

Administrative distance is a fundamental concept in routing that determines which route a router will install in its routing table when it learns the same destination from multiple routing sources. It is a numerical value from 0 to 255, where a lower number indicates a more trustworthy source. Directly connected routes have an AD of 0, static routes have 1, EIGRP internal routes have 90, OSPF has 110, RIP has 120, and EIGRP external routes have 170. These default values are essential knowledge for both the CCNA and Network+ exams.

Understanding AD is critical for network design and troubleshooting. It allows network engineers to control which protocol takes precedence without disabling other protocols. Floating static routes are a common application, where a static route with a higher AD acts as a backup for a dynamic route. Misunderstanding AD can lead to routing loops, suboptimal paths, and unexpected behavior.

For exam success, memorize the default AD values and remember that AD is evaluated before metrics. Always check the source of a route when looking at a routing table. Practice with scenarios that involve multiple protocols and observe which route wins. By mastering administrative distance, you build a strong foundation for more advanced routing concepts and real-world network management.

think of AD as the trust level a router assigns to different teachers. The lower the number, the more the router believes that teacher. This simple idea underpins many routing decisions and is a key topic in IT certification exams.