Border Gateway Protocol is one of the most important protocol providing connection on internet / different autonomous systems and BGP best calculation is the most important attribute of the protocol. Routing protocols find the “best path” to the target network using various algorithms.This article examines how BGP finds the best path for target network.
Border Gateway Protocol finds the best path using BGP attributes. RIP uses hop count, OSPF uses cost for metric calculation. But BGP’s metric calculation is not as easy as these protocols. BGP attributes are the tagging way of incoming or outgoing BGP routes. Some of the attributes are supported by all vendors but some of them are vendor specific. Some attributes are transitive ( which goes from a router to another ) , some of them are not.
BGP ATTRIBUTES SUPPORTED BY ALL VENDORS
* AS-Path (mandotary) (Autonomous system number that should be passed)
* Next hop adress (mandotary) (Next hop should be accessible)
* Origin (mandotary)
* Local preference (optional) ( Refers how much it is preferred on its own AS )
* Atomic total (optional)
There are five steps that BGP looks at in order to select the best path :
BGP BEST PATH CALCULATION
1) Reject the routes that come from inaccessible next-hop address for the BGP best path calculation.
2) Choose the highest weight ( Cisco proprietary ). For example choose the routes coming from R2 instead of R3.
3) Choose the highest local-prefence value.
4) If there is a route created by “network” command, choose it.
5) Choose the shortest AS-Path.