BGP Path Attributes and Best Path Algorithm

BGP Best path algorithm state that "Locally injected is better than iBGP/eBGP learned".

However, based on the Administrative distance :

EIGRP summary route        5
eBGP                                20
EIGRP                                 90
IGRP                              100
OSPF                             110

For "Locally injected ", does it exclude "redistribution" ?

Who is Participating?
JustInCaseConnect With a Mentor Commented:
We are taking about OSPF route redistributed into BGP, not about route redistributed into OSPF. Router learned route via OSPF and redistributed it into BGP and then comparing it to other BGP route. The BGP best path algorithm is about comparing BGP routes, it has nothing to do with comparing BGP against OSPF routes.

When it comes to compare attribute - locally injected BGP route is better than BGP route learned via iBGP/eBGP. It is local decision for router, so can be translated as: "I will trust more to the route that I injected into BGP than what other BGP routers tell me about that network".
Locally injected BGP routes does not exclude redistributed routes. Any route advertised by local router is considered locally injected (advertised into BGP by network command or redistributed routes learned via IGP into BGP). Generally, locally injected routes, on Cisco routers by default, will have weight  32768.

Is route redistributed or not - is marked in Origin attribute, if redistributed (and not tempered with attribute) will have "?" incomplete origin .
AXISHKAuthor Commented:
A redistrbuted OSPF route has a default administrative distance of 110. Hence, administrative distance of eBGP 20 should be prefered. Why the statement state that "Locally injected is better than iBGP/eBGP learned" ?

sh ip bgp
      Network              Next Hop        Metric LocPrf Weight Path
*>                0                     32768     ?

I always forget to mention that locally injected routes have next hop of (this router).
AXISHKAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.