Tag - highest weight

BGP Best Path Selection Process

According to BGP best Path Selection process, here is the order of BGP preference:

  1. Prefers the highest weight
  2. Prefer the Highest local preference
  3. Prefer Locally Originated routes
  4. Prefer the shortest AS path
  5. Prefer the lowest Origin Code
  6. Prefer the Lowest MED value
  7. Prefer the routes learned by EBGP over the routes learned by IBGP
  8. Prefer the routes learned with the lowest router ID

BGP path Selection

  • Keep in Mind the “Weight” attributes is locally significant and is Cisco proprietary, the default value for locally originated routes are 32678
  • The default Local preference attribute value for all learned routes is 100 “IF is not modified”
  • The default Origin Code is “IGP” if learned and advertised by Network Statement, while “Incomplvce” If the route is redistributed into BGP
  • The default MED value for all learned route is 0 “Unless modified”, bear in mind MED is compared by default from routed learned from the Same AS number



what BGP Attributes

BGP Attributes

  1. AS path
  2. Origin
  3. Local Preference
  4. Multi-Exit Discriminator (MED)
  5. Weight


AS path: An ordered list of all the autonomous systems through which this update has passed. Well-known, mandatory.

Origin: How BGP learned of this network. i = by network command, e = from EGP, ? = redistributed from other source. Well-known, mandatory.

Local Preference: A value telling IBGP peers which path to select for traffic leaving the AS. Default value is 100. Well-known, discretionary.

Multi-Exit Discriminator (MED): Suggests to a neighboring autonomous system which of multiple paths to select for traffic bound into your autonomous system. Lowest MED is preferred. Optional, non-transitive.

Weight: Cisco proprietary, to tell a router which of multiple local paths to select for traffic leaving the AS. Highest weight is preferred. Only has local significance.

IGPs, such as EIGRP or OSPF, choose routes based on lowest metric. They attempt to find the shortest, fastest way to get traffic to its destination. BGP, however, has a different way of route selection. It assigns various attributes to each path; these attributes can be administratively manipulated to control the path that is selected. It then examines the value of these attributes in an ordered fashion until it can narrow all the possible routes down to one path.

BGP chooses a route to a network based on the attributes of its path. Four categories of attributes exist as follows:
Well-known mandatory: Must be recognized by all BGP routers, present in all BGP updates, and passed on to other BGP routers. For example, AS path, origin, and next hop

Well-known discretionary: Must be recognized by all BGP routers and passed on to other BGP routers but need not be present in an update, for example, local preference.

Optional transitive: Might or might not be recognized by a BGP router but is passed on to other BGP routers. If not recognized, it is marked as partial, for example, aggregator, community.

Optional non-transitive: Might or might not be recognized by a BGP router and is not passed on to other routers, for example, Multi-Exit Discriminator (MED), originator ID.


BGP Attributes Symbol

Copyright ©2010 - 2022 Ciscoforall.com | Privacy Policy | Terms & Conditions