cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2827
Views
5
Helpful
7
Replies

BGP vs IBGP

cisco
Level 1
Level 1

why does a router prefers a EBGP over IBGP ( i am aware that AD of EBGP is less than IBGP)

regards

Neo

7 Replies 7

Marwan ALshawi
VIP Alumni
VIP Alumni

hi there

the AD is one reason but you need to understand the the AD comes in the cpmperson of the bgp routes after some other factors like AS path, Local Prefrence and so on

for example if you got two routes and you have the route through IBGP has hogher Local Prefrence than the EBGP the IBGP will prefered over EBGP regard less the AD of EBGP is less

t ounderstand it corectly see the bellow link

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

good luck

please if helpful Rate

hi,

i would rephrase my question ,while developing BGP Protocol why the AD of IBGP was kept higher as compare to the EBGP. any specific reason for that ?

regards

Neo

the AD value compares routes that are present in two different routing processes. The router will prefer eBGP to OSPF .. and prefer OSPF route to RIP etc. the iBGP AD value is very high (200) due to the design of BGP which was not meant to work as a internal routing protocol. BGP is designed to be an external routing protocol. So the eBGP is always prefered more than any other besides static or connected which have a value of 1.

to get a iBGP relationship within the Same AS, you need a existing route already in the router. Also the iBGP neighbor never forwards a learned route to another iBGP neighbor unless it is a route reflector.

Hello Neo,

BGP has been introduced to perform inter-AS routing that is eBGP sessions.

Later, iBGP was introduced for different reasons.

iBGP AD 200 comes from the fact that before introducing BGP route reflectors and BGP confederations the usual setup was:

border router R1 with eBGP sessions

internal cloud with routers not speaking BGP but only IGP

border router R2 with other eBGP sessions

R1 had to redistribute eBGP routes into IGP and also R2 had to do the same.

the iBGP sessions were needed and used only to preserve AS path and other BGP attributes information but the old BGP synchronization says:

R2 can advertise routes learned by R1 coming from R1's eBGP peers only if R2 can see the same prefixes in the IGP in use and installed in routing table

This was intended to avoid to create black holes inside an AS.

So to be sure iBGP wouldn't disturb IGP convergence iBGP AD is 200 > of every AD of IGP (OSPF, EIGRP, IS-IS including EIGRP external routes that is 170 to be noted)

Nowdays, devices in the middle can use MPLS to switch traffic without routing knowledge and iBGP has been increased in use thanks to BGP route reflectors.

another point of view:

eBGP is first hand information

iBGP can be second hand information if you think of the scenario I've described above.

So eBGP is preferred

Hope to help

Giuseppe

BGP is an EXTERIOR gateway protocol, meaning its purpose is to move data from networks in one autonomous system to networks in other autonomous systems; unlike the INTERIOR gateway protocols (EIGRP, RIP, OSPF...) whose purpose is to move data within an AS.

So if there's two routes whose metrics match (weight, local preference, locally originated, AS-path length, origin code, and MED), and one of the routes was learned from IBGP and one from EBGP, the EBGP one is used because that gets the data out of the local AS and into the next one; which is the main function of BGP.

(please remember to rate helpful posts)

ronyahmed
Level 1
Level 1

Your answer is already within your question. the AD value ..

BGP assumes the external relationship will have a better route information about a conflicting route than the internal relationship

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco