8.2 BGP Basic Operation
8.2.6 Path attributes
Much of the work you will do configuring BGP focuses on path attributes. Each route has its own set of defined attributes, which can include path information, route preference, next-hop, and aggregation information. Administrators use these values to enforce routing policy. Based on attribute values, you can configure BGP to filter routing information, prefer certain paths, or otherwise customize its behavior. Many of these attributes and policy configurations are explored later in this chapter, in the section "The BGP Routing Process."

Every update message has a variable-length sequence of path attributes in the form <attribute type, attribute length, attribute value>.

Because you will use path attributes extensively when configuring routing policy, you should note that not all vendor implementations of BGP recognize the same attributes. In fact, there are four different attribute types:

  • Well-known mandatory - An attribute that must exist in the BGP update packet. It must be recognized by all BGP implementations. If a well-known attribute is missing, a notification error will be generated. This ensures that all BGP implementations agree on a standard set of attributes. An example of a well-known mandatory attribute is the AS_Path attribute.
  • Well-known discretionary - An attribute that is recognized by all BGP implementations, but may or may not be sent in the BGP update message. An example of a well-known discretionary attribute is the LOCAL_PREF attribute.
  • Optional transitive - An attribute that may or may not be recognized by all BGP implementations (thus, optional). Because the attribute is transitive, BGP should accept and advertise the attribute even if it is not recognized.
  • Optional nontransitive - An attribute that may or may not be recognized by all BGP implementations. Whether or not the receiving BGP router recognizes the attribute, it is nontransitive and is not passed along to other BGP peers.

Each individual attribute is identified by its type and attribute code. The figure lists the attribute codes that are currently defined.

Several of these attributes are discussed later in this chapter. Attributes 11, 12, and 13 are not implemented by Cisco because they do not add functionality and will not be covered.