A path attribute is an additional piece of information associated with a prefix, that is included within the UPDATE packet during the exchanging of routes. BGP provides various different path attributes. These path attributes are then used by BGP to pick the best path (also known as the path selection process) to a destination.[1]

Before we look at the various path attributes, let us have a quick overview of a term that you will see time and time again when working with BGP - NLRI.

What is NLRI?

The Network Layer Reachability Information (NLRI) can also be considered the prefix, agnostic of address family i.e we can use an NLRI based upon an IPv4 address, or MPLS tag etc.

Attributes

There are two categories of path attributes - Well-known and Optional.

Well Known Attributes

With well known attributes, they must be recognized by all BGP implementations. Well Known attributes comprise of Mandatory and Discretionary attributes.

  • Mandatory - The attribute must ALWAYS be included within the BGP UPDATE. If it does not exist a NOTIFICATION error is sent.
    • ORIGIN - Specifies the origin of the routing update. Can be one of three values - IGP, EGP or Incomplete.
    • AS_PATH - A list of all AS's within the path. Each router appends their own AS (eBGP). The last entry in the list is the originating AS, the first is the last AS. The AS_PATH is also used to detect loops, i.e a router receiving a route from an eBGP peer with their own AS within the AS_PATH.
    • NEXT_HOP - Is the next hop **IP address **to use in order to reach a certain destination.[2]
  • Discretionary - The attribute must be recognized by ALL implementations but does not have to be included in every BGP UPDATE.
    • LOCAL_PREF - Local preference can be used to influence route selection within the local autonomous system. It is stripped from outgoing updates via eBGP. The default local preference for iBGP and local routes is 100, while all other are 0 by default. In other words - Local preference is used to influence the path your own AS will take to get to or exit to another AS.
    • ATOMIC_AGGREGATE - Alerts BGP speakers along the path that some information has been lost due to the route aggregation process and that the aggregate path might not be the best path to the destination.[3]

Optional Attributes

Attributes are optionally supported by BGP implementations and can be classed as either Transitive or Non-transitive.

  • Transitive - The transitive flag IS set ; The attribute should be preserved and advertised to all peers whether or not they are recognized.
    • AGGREGATOR - Optionally used when the the ATOMIC_AGGREGATE attribute is set. Provides information on where the aggregation was performed by including the AS number and the IP address of the router that originated the aggregate route.[4]
    • COMMUNITY - A 32-bit value (tag) that can be assigned to a specific prefix and advertised to other neighbours.
    • EXTENDED COMMUNITY - A 64-bit value (tag), also known as a Route Target (RT), is assigned to a specific prefix and advertised to other neighbours, within VPN configurations, to define what routes are exported and imported into the PE's VRFs.
  • Non-transitive - The transitive flag IS NOT set; the UPDATE should be advertised to peers without the unrecognized attributes.
    • MULTI_EXIT_DISC ATTRIBUTE (MED) - Whereas the Local Preference influences the path or exit points out of an AS, the MED is used to influence how another AS will enter your AS.
    • ORIGINATOR_ID - Added to reflected routes by the route reflector within an AS. Routers are expected to drop UPDATES if the ORIGINATOR_ID matches their router ID.
    • CLUSTER ID - Used to prevent routing information loops between route reflectors within an AS.
    • CLUSTER LIST - A list of CLUSTER_IDs. Used to prevent routing information loops between route reflectors that reside in multiple clusters within an AS.
    • MULTIPROTOCOL Reachable NLRI - Enables the carry routing information for multiple network layers and address families such as MPLS Tags.
    • MULTIPROTOCOL Unreachable NLRI - Used for the purpose of withdrawing multiple unfeasible Multiprotocol routes from service.[5]
      One attribute that has not been mentioned is the weight attribute. The weight is a Cisco proprietary local attribute that is not propagated in BGP update messages but is used by Cisco routers for path selection.[6]

Further Reading

For further information on the various attributes check out - http://netcerts.net/bgp-path-attributes-and-the-decision-process/

References


  1. "BGP Attributes | m00nie.com." 19 Aug. 2010, https://www.m00nie.com/2010/08/bgp-attributes/. Accessed 7 Nov. 2017. ↩︎

  2. "BGP Case Studies - Cisco." 30 Oct. 2008, https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/26634-bgp-toc.html. Accessed 13 Nov. 2017. ↩︎

  3. "ATOMIC_AGGREGATE vs AGGREGATOR - Cisco Support Community." 13 Jun. 2006, https://supportforums.cisco.com/t5/wan-routing-and-switching/atomic-aggregate-vs-aggregator/td-p/520417. Accessed 13 Nov. 2017. ↩︎

  4. "BGP Path Attributes – netcerts.net." 21 May. 2010, http://netcerts.net/bgp-path-attributes-and-the-decision-process/. Accessed 13 Nov. 2017. ↩︎

  5. "RFC 4760 - Multiprotocol Extensions for BGP-4 - IETF Tools." https://tools.ietf.org/html/4760. Accessed 13 Nov. 2017. ↩︎

  6. "BGP Attributes List - Networkers-online.com." 15 May. 2012, http://www.networkers-online.com/blog/2012/05/bgp-attributes/. Accessed 13 Nov. 2017. ↩︎