cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1509
Views
5
Helpful
6
Replies

iBGP Path Decision Process

Good afternoon,

 

I am struggling understanding how BGP sub-protocol (iBGP) elect one path or the other in its path decision process and how it differs from eBGP, when it receives the update message. Could anyone explain it?

 

Many thanks

Al

6 Replies 6

Peter Paluch
Cisco Employee
Cisco Employee

Hello Al,

The truth is that it is neither iBGP nor eBGP deciding on the best path. It is BGP, regardless of where the route comes from, selecting the best path, and based on the attributes, the best path may end up being learned from an internal peer (thus an iBGP path), or from an external peer (thus an eBGP path).

I am certain you know the document but just in case:

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

Feel welcome to ask further!

Best regards,
Peter

Hi Peter,

 

Thanks for taking the time to response. According to what you said, basically, eBGP and iBGP do not elect any path, is BGP task to process the update message based on the decision path list criteria. However, BGP is subdivided in two protocols. Then, if iBGP receives the update message from an eBGP router, how does it elect the best route so IGP knows where to forward a request? Is the BGP algorithm run inside and outside the Autonomous system?

 

Many thanks

 

Al

Hi Al,

You are welcome!

However, BGP is subdivided in two protocols.

This is probably the source of the confusion. This statement is not true. BGP is not subdivided into two protocols - even though this is the common way of explaining BGP. eBGP and iBGP are really types of BGP adjacencies (peerings) between routers, and we distinguish between them because

  1. certain attributes are handled differently in eBGP rather than in iBGP (for example, AS_PATH and NEXT_HOP are not modified in iBGP)
  2. route advertisement is handled differently in eBGP rather than in iBGP (an iBGP route is not advertised to an iBGP peer)

However, the difference between eBGP and iBGP does not really split the BGP logic into two parts (iBGP and eBGP). The BGP is a single mechanism, and eBGP and iBGP are just feeds of routing information into its shared database. There, in its shared database (the BGP RIB), all received routes will be stored, both learned through eBGP and iBGP.

When choosing the best path for a given destination, the BGP algorithm will first pick the first candidate in the RIB, and declare it to be the best. It will then go down the RIB, and whenever it encounters another candidate toward the same destination, it compares the current best path with the one just found, and based on the best path algorithm comparison between the two, pick the new best path (it can still be the original one, or it can be the new one). This is repeated until the entire BGP RIB is searched. Notice that in this process, an eBGP-learned route can be compared to an iBGP-learned route. It is up to the best path algorithm, and of course to the BGP attributes on the individual paths, to decide which one is eventually going to be considered the best.

I am not sure if this clarifies the issue - please feel welcome to ask further, and if you actually have an example that you would like to show the issue on, please feel welcome to post it!

Best regards,
Peter

Hi Peter,

Now it is much clearer than it was for me. In some online courses they explain BGP as it logically subdivided in two sub protocols. However, you explained very clear by saying that it is a type of adjacency.

Thanks again

Kind Regards
Al

Hi Al,

You are very much welcome!

Best regards,
Peter

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello,

as Peter Paluch has explained there is only one protocol BGP and one BGP table (RIB)

 

Treating eBGP and iBVGP as two different protocols is wrong and misleading.

 

just to add to PEter's explanation there are some facts that are different in setting up an eBGP peering session in comparison to an iBGP session:

eBGP session: from configuration my AS number <> configured peer AS number THEN IPv4 TTL=1 in BGP packets

iBGP session : from configuration my AS number ==configured peer AS number then IPv4 TTL=255 in BGP packets.

iBGP sessions by default can be setup using loopbacks as BGP endpoints.

One side uses the well known port 179 the other side an high number port.

 

For eBGP sessions the BGP next-hop attribute s updated to local endpoint IP address and the local node AS number is added to the AS path attribute in leftmost position from the point of view of someone making a show ip bgp on the eBGP peer router.

For iBGP sessions the BGP next hop is left unchanged and the AS path attribute is also left unchanged

An iBGP peer cannot advertise to an iBGP peer a route (NLRI) learned by another iBGP peer.

Solutions to this are route reflector servers or BGP confederations.

However, the iBGP and eBGP learned paths compete for the best path election and if some BGP attributes are manipulated or different an iBGP path can be selected as best path and then sent to the IP routing table maintaner process.

This thing of iBGP and eBGP being two different protocols was even teached in university.

Hope to help

Giuseppe

 

 

Review Cisco Networking products for a $25 gift card