cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
27476
Views
26
Helpful
8
Replies

eBGP vs iBGP (Path selection vs Admin Distance)

awoog
Level 1
Level 1

Take a router with both eBGP and iBGP: According to the best path selection algorithm, if we set local pref higher on the neighboring iBGP router, we can make some of the iBGP routes preferred. However doesnt it conflict with the rule of the admin distance (admin distance always favourise eBGP)?

1 Accepted Solution

Accepted Solutions

You are correct. The admin distance never comes into play when two BGP paths are compared. The BGP best path selection process will determine the best path and then the admin distance (20 or 200) will be used to select the route to install in the RIB if the same prefix has been learnt from another routing protocol (or static).

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

8 Replies 8

stephtchoko
Level 3
Level 3

The administrative is used to choose the best routing among many routing, if there 2 path (ebgp path and ibgp path); the ebgp path will be choose, because it distance administrative is 20 against 200 for ibgp.

The local preference is a kind of metric use by on BGP call attribute.

Don't miss metric and distance administrative.

You can look at this :http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml

Best regards

Tks for your answer. But how do you interpret that in: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml point 7 (eBGP vs iBGP) comes after point 1/2 (weight/local pref) ?

gaurav_saxena
Level 1
Level 1

As per the BGP path selection algorithm, higher local preference IBGP route will be preferred over lower local preference EBGP route. Please refer "BGP Path Selection" topic in following url for details. Metric comparision comes on 8th number during deciding of best route in bgp.

http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/bgp.htm

Hasn't metric in "best path selection" criteria more to do with MED attribute than with administrative distance ?

You are correct. The admin distance never comes into play when two BGP paths are compared. The BGP best path selection process will determine the best path and then the admin distance (20 or 200) will be used to select the route to install in the RIB if the same prefix has been learnt from another routing protocol (or static).

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

All clear, tks a lot

This is exactly the behavior I noticed on my GNS3 setup, I have 2 iBGP neighbors R1 and R2, eBGP peered with VRRP SDWAN(for sake R3), R1 is prepending  AS+AS+AS towards R3 and R3 is prepending AS+AS+AS towards R1 and normal towards R2, R1 learns about same prefix (X/24)from eBGP R3 and iBGP R2, I was worried R1 would prefereBGP over iBGP since it has better AD, but it is preferring R2 as it has better AS_Path..deploying tomorrow night!

Though its old thread, thought of leaving a note.

 

I did stumbled and was wondering the same for a moment and realized, administrative distance is IP routing table attribute to install best route. It never could be an attribute of BGP to install a prefix in the BGP table. It just follows N WLLA OMNI to decide what to be installed in the BGP table.

Review Cisco Networking for a $25 gift card