USD ($)
$
United States Dollar
India Rupee

Understanding BGP AD Value in Networking

Created by Deepak Sharma in CCNA 22 Oct 2025
Share
«What is BGP in Networking? - Full-Form, ...

In dynamic routing, routers may receive multiple routes to the same destination from different protocols. To decide which route to use, they rely on Administrative Distance (AD), a ranking system that prioritizes routes based on the source’s reliability. The lower the AD, the more preferred the route.

The Border Gateway Protocol (BGP) assigns different AD values to external (eBGP) and internal (iBGP) routes. This distinction helps routers make accurate routing decisions in complex, multi-protocol networks.

In this article, we have explained the Administrative Distance (AD) in BGP, how it works, its purpose, and eBGP and iBGP AD values. We have also covered the configuration steps to update AD values in BGP.

What is Administrative Distance?

Administrative Distance is a numerical value (ranging from 0 to 255) assigned to routing sources by a router to express the level of trustworthiness for making routing decisions.

During the routing process, a router can receive multiple routes from different protocols to reach the same destination, so to find the best route, it chooses the one with the lowest AD value.

Routers use default Administrative Distance (AD) values to decide which routing information to trust. The table below lists common default AD values used in Cisco networks.


Routing SourceAD Value
Connected Interface0
Static Route1
eBGP20
EIGRP (Internal)90
OSPF110
RIP120
EIGRP (External)170
iBGP200
Unknown/Untrusted Route255

*Note: AD = 255 means the route is considered invalid and will never be used.


BGP MPLS Live TrainingJoin our online training to master Border Gateway ProtocolExplore course
custom banner static image

Purpose of Administrative Distance (AD)

The main goal of Administrative Distance is to help routers choose the most trustworthy route when multiple paths to the same destination are available from different sources, like connected interfaces, static routes, or routing protocols.

AD values also play a role in preventing routing loops. Suppose Router R1 learns a route via OSPF and advertises it to R2 through RIP.

For example, if Router R1 learns a route through OSPF and advertises it to R2 via RIP, and R2 sends it back to R1 using RIP (which has a higher AD), R1 will ignore it. This prevents the route from looping back unnecessarily.

How AD Value Helps Routers Choose the Best Path

Administrative Distance (AD) functions as a decision-making metric that allows a router to choose the most reliable path among multiple available routes to the same destination.

The router performs a series of evaluations in a specific order to determine which route to install in the routing table:

1. Connected Routes Take Priority

The router first checks whether the destination network is reachable through a directly connected interface. If such a route exists, it is immediately selected since connected routes have the highest trust level (AD = 0), and the router does not consider other options.

2. Static Routes Are Considered Next

If no connected route is available, the router checks for a manually configured static route. If a static route to the destination exists, it is chosen next, typically with an AD of 1.

3. Dynamic Routing Protocols Are Evaluated

When neither connected nor static routes are found, the router turns to dynamic routing protocols such as OSPF, EIGRP, or BGP. It compares the AD values associated with each protocol’s route to the same destination and selects the route with the lowest AD, indicating the highest trust.

4. Handling Equal AD Values

If multiple routes have identical AD values, the router uses a vendor-specific tie-breaking mechanism, such as selecting the path with the lowest metric or administrative preference, to determine the final route.

Comparing AD Values of eBGP and iBGP

There are many distinctions between external and internal BGP AD values. They are explained in the table below:


AspecteBGP (External BGP)iBGP (Internal BGP)
AD Value20200
Route OriginFrom an external Autonomous System (AS)From within the same Autonomous System
Preferred Use CaseInter-AS routing (external reachability)Intra-AS route distribution
Trust LevelHigh–trusted for external routesLower – relies on IGP for next-hop reachability
Loop PreventionBuilt-in loop detection via AS PathNo automatic loop prevention – relies on additional mechanisms
Design IntentPreferred over IGPs and iBGP for external destinationsLess preferred than IGPs to avoid overriding internal paths
ModifiabilityRarely modifiedSometimes lowered in MPLS/VPN scenarios

Configuring Administrative Distance for BGP

In the case of Border Gateway Protocol (BGP), Cisco routers assign different default AD values to routes depending on how they were learned:

● eBGP (external BGP) routes have a default AD of 20

● iBGP (internal BGP) routes have a default AD of 200

● Locally originated BGP routes also default to 200

However, in certain scenarios, such as advanced enterprise or service provider environments, network administrators may need to adjust these values to influence route selection behavior.

In Cisco IOS, the AD values for BGP can be modified using the distance bgp command under the BGP configuration mode.

Command Format:


distance bgp <external-distance> <internal-distance> <local-distance>

1. external-distance: AD for routes learned via external BGP (eBGP)

2. internal-distance: AD for routes learned via internal BGP (iBGP)

3. local-distance: AD for routes originated by the local router

Example Configurations

Let's take an example scenario where you want to adjust iBGP to be Preferred Over OSPF.

router bgp 65000

distance bgp 20 90 200

By setting iBGP’s AD to 90, you're making it more preferred than OSPF (which has a default AD of 110).

If you want to practice these BGP configurations, check out our remote networking labs. Contact our learner advisors now!


banner image

When to Modify BGP Administrative Distance?

Although BGP’s default AD values are effective in most environments, some advanced scenarios may require modification. Use cases include:

1. Prioritize iBGP Over IGP (e.g., OSPF or EIGRP)

In MPLS VPN, large-scale enterprise, or cloud environments, you may want iBGP-learned routes to be preferred over OSPF. To achieve this, lower the iBGP AD below that of the IGP.

2. Control Route Failover Behavior

By manipulating AD, you can define backup and primary paths. For instance, assign a static route with AD 10 and eBGP with AD 20 so that the static route is preferred unless it becomes unavailable.

3. Lab and Testing Environments

In controlled environments, adjusting AD helps simulate different routing behaviors and test protocol interactions under specific conditions.

Best Practices for AD Values

The following are the best practices to be followed:

● Default values are usually optimal and consistent across devices.

● Use Local Preference, AS_PATH, or MED for route control instead of relying solely on AD.

● Record why and where AD values are changed to avoid confusion during troubleshooting.

● Always validate the impact of AD adjustments in a lab or staging environment.

● If adjusting AD values, confirm that appropriate backup routes exist.

Summary

The Administrative Distance of BGP is a vital factor in determining how routers prioritize BGP-learned routes against those from other protocols. With eBGP defaulting to 20 and iBGP to 200, routers naturally prioritize external BGP routes for inter-AS communication while preferring internal IGPs for intra-AS routing.

While BGP AD values rarely need changes in standard environments, understanding how and when to adjust them allows network engineers to create more tailored, scalable, and resilient routing designs. Correct usage of AD alongside proper BGP attributes and policies ensures optimal route selection and network performance.

BGP Attributes Explained in Simple Words»
Deepak Sharma

He is a senior solution network architect and currently working with one of the largest financial company. He has an impressive academic and training background. He has completed his B.Tech and MBA, which makes him both technically and managerial proficient. He has also completed more than 450 online and offline training courses, both in India and ...

More... | Author`s Bog | Book a Meeting

Related Articles

#Explore latest news and articles

BGP States: Troubleshoot Active Neighbor 4 Jan 2025

BGP States: Troubleshoot Active Neighbor

Determine and learn the details of BGP states including active troubleshooting steps involved in each BGP neighbor states.
BGP Authentication and Troubleshooting 11 Nov 2024

BGP Authentication and Troubleshooting

Learn to Configure BGP Authentication and Troubleshooting Steps on a Scenario based BGP Lab at UniNets.
BGP Interview Questions and Answers for Jobs 11 Jun 2025

BGP Interview Questions and Answers for Jobs

Master BGP interview questions with concise answers on concepts, message types, and applications. Boost your networking knowledge and ace your next interview!

FAQ

The default AD for BGP depends on the type: eBGP has an AD of 20, while iBGP has an AD of 200 in Cisco IOS.
eBGP has a lower AD of 20, meaning it's more trusted. iBGP has a higher AD of 200, so it's less preferred unless manually adjusted.
eBGP has a lower AD (20), making it more trusted than iBGP (200), which helps prioritize external routes over internal ones.
If two routes have the same AD, the router uses other metrics like path cost or hop count to decide which route to prefer.
AD helps routers choose the most trusted route when multiple protocols offer paths to the same destination. Lower AD means higher trust.

Comments (0)

Deepak Sharma

Deepak Sharma

Senior Instructor (Part Time) at UniNets Instructor role
★★★★★ 4.91
Faithful User
Expert Vendor
Golden Classes
King Seller
Fantastic Support
Loyal Writer

Upcoming batches

+91 8383 96 16 46

Enquire Now

Captcha
Share to your friends

Share

Share this post with others

Contact learning advisor

Captcha image