2 mins read

BGP Attributes

BGP attributes are grouped in four main classes:

  • Well-known mandatory: These attributes must be supported by all BGP neighbors and must be included in all BGP updates.
  • Well-known discretionary: These attributes must be supported by all BGP neighbors, but do not have to be included in all BGP updates.
  • Optional transitive: It is not required to be supported by all BGP neighbors, but if present it must be passed to other neighbors.
  • Optional nontransitive: Again, not required to be supported by all BGP neighbors. If such an attribute is not recognized, it is ignored and not passed to other neighbors.

These attributes are very important to master for the JNCIE-SP lab exam.

  • Next-hop: A well-known mandatory attribute. It has to be included for every prefix. It represents the IP address of the router advertising the route. The next-hop should be reachable by the local router to be installed in the routing table. EBGP peers change the next-hop when advertising routes to other EBGP peers. IBGP peer do not change Next-hop attribute by default.
  • AS path: This attribute is also well-known mandatory and represents the path to the source of the prefix. Another purpose is loop prevention mechanism as it was stated already. Each EBGP peer prepends its AS to the AS path when advertising prefixes to EBGP peer. The AS path is not updated between IBGP peers.
  • Origin: Third well-known mandatory attribute. Origin describes the way the route is injected into BGP. The router that advertises a prefix assigns an origin attribute to that route. IGP (I), EGP (E) and Incomplete (2) are three possible values. Junos by default injects all routes with origin of IGP.
  • Local preference: This is well-known discretionary attribute that defines the preferred way out of the local AS. All traffic from the AS is flowing to the peer advertised routes with highest local preference. This is the only attribute where the highest value is preferred. Local preference is transmitted only across IBGP links. By default, the local preference is set to value 100.
  • Multi-Exit Discriminator: MED is an optional non-transitive attribute used to influence the preferred path into the AS when multiple links between two ASs exist. MED is not transferred across neighboring AS. The MED is often called metric and is used for neighboring AS to evaluate which path to use if several links are available between the local and neighboring AS.
  • Community: This optional transitive attribute is used to tag (a group of prefixes) to be identified easily. It helps to simplify the policies applied to the routes for routing decisions. They can be used to signal other attributes between ASs