A path attribute is an additional piece of information associated with a prefix, included within the UPDATE packet during route exchange.
Path attribute types include:

Well-known - Must be recognized by all BGP implementation

Mandatory ALWAYS be included within BGP UPDATE.
Discretionary MUST be recognized by ALL implementations. Does not have to be included in BGP UPDATE.

Optional - Optionally supported by BGP implementations

Transitive Transitive flag set = The attribute should be advertised to all peers even if not they are recognized.
Non-transitive Transitive flag IS NOT set = the UPDATE should be advertised to peers without the attributes


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.


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 -


  1. "BGP Attributes |" 19 Aug. 2010, Accessed 7 Nov. 2017. ↩︎

  2. "BGP Case Studies - Cisco." 30 Oct. 2008, Accessed 13 Nov. 2017. ↩︎

  3. "ATOMIC_AGGREGATE vs AGGREGATOR - Cisco Support Community." 13 Jun. 2006, Accessed 13 Nov. 2017. ↩︎

  4. "BGP Path Attributes –" 21 May. 2010, Accessed 13 Nov. 2017. ↩︎

  5. "RFC 4760 - Multiprotocol Extensions for BGP-4 - IETF Tools." Accessed 13 Nov. 2017. ↩︎

  6. "BGP Attributes List -" 15 May. 2012, Accessed 13 Nov. 2017. ↩︎

Ready to Master Network Automation? Start Your Journey Today!
Our membership provides:
  • Full deep-dive course library (inc. Batfish, pyATS, Netmiko)
  • Code repositories inc. full course code, scripts and examples
  • 24x7 multi-vendor labs (Arista, Cisco, Juniper)
  • Private online community
  • Live monthly tech sessions
  • Access to tech session library

Join Now ➜