cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
554
Views
5
Helpful
1
Replies

Precendence of multiple Distance commands under single Routing Process

yuchenglai
Level 1
Level 1

Hello All,

I was wondering if anyone knows the precedence of multiple "distance" commands under a single routing process.  For example, the below configuration shows multiple distance commands under a single BGP routing process.  1.1.1.1 is a BGP neighbor.

router bgp 1

no synchronization

bgp log-neighbor-changes

distance bgp 200 220 220

distance 20 1.1.1.1 0.0.0.0

1 Reply 1

Peter Paluch
Cisco Employee
Cisco Employee

Hello David,

In these situations when multiple commands overlap in their effect, the usual rule is that the most specific command will be applied whenever possible. In your case that means that the routes learned from BGP neighbor 1.1.1.1 will be assigned the administrative distance 20 regardless of their internal/external nature. Routes from other sources will be assigned different ADs:

  • 200 for external BGP routes
  • 220 for internal BGP routes
  • 220 for local routes

Best regards,

Peter

Review Cisco Networking for a $25 gift card