BGP best path selection algorithm question

Unanswered Question
Sep 11th, 2008

Hi all,

I was reading this page:

And i'm wondering why step 7 exist (Prefer eBGP over iBGP paths) since when a router receive the same route via EBGP and IBGP, the administrative distance will break the tie (IBGP = 200, EBGP = 20) from the very start of the process, even before entering that BGP selection algorithm process.

Under what circumstance the step 7 will be used?

Best Regards,

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Richard Burts Thu, 09/11/2008 - 18:07


Actually the Administrative Distance is applied to routes only as the routing protocol passes them to the process that builds the IP routing table. BGP has no concept of AD as it goes through the best path selection process. This is why step 7 exists.



Giuseppe Larosa Fri, 09/12/2008 - 08:27

Hello Martin,

as Rick says BGP has its own BGP table where all the paths are stored, the BGP selection is applied to this table and here the AD plays no role.

After BGP comes up with a best path to a prefix the process that mantains the routing table will label it with AD=20 or AD=200 depending if the path is external (comes from an eBGP session) or internal (comes from an iBGP session).

Hope to help


Istvan_Rabai Fri, 09/12/2008 - 15:07

Hi Martin,

A small addition to the previous posts:

The BGP path selection process gives preference to the EBGP routes over IBGP routes in the 7th step for the following reason:

Given the fact that the previous 6 steps produced the same results for 2 (or more) routes toward the same prefix:

if you can reach a prefix over an EBGP learned route and over an IBGP learned route, which do you think is the shortest path to the destination?

Of course, the EBGP learned route is.

In case of an IBGP learned route, for a packet there is at least 1 additional hop to go within the same AS to reach an edge BGP router.




This Discussion