Network Kings, India’s Leading IT Career Training Academy
A BGP router attaches BGP Attributes to various prefixes contained in its BGP update messages to define them. Except for update messages that contain just withdrawn routes, every update message has a different set of BGP properties.
BGP attributes get classified into different types that define how routes will use and propagate a specific attribute to their neighbors. The types of attributes are discussed in detail in our blog post.
Well-known BGP attribute types are as follows-
The well-known mandatory attribute must get acknowledged by all BGP implementations that exist in BGP update messages.
The well-known discretionary attribute must get acknowledged by all BGP implementations, but it is not crucial to advertise it in BGP updates to all BGP neighbors.
The Optional BGP attribute types are as follows-
Transitive attribute between ASs. A BGP router that is not supporting this attribute can still receive routes with this attribute and advertise them to other peers, i.e., the community.
If a BGP router does not support this attribute, It will not advertise a router with this attribute.
|
NAME |
SUPPORTED BY ALL BGP CONFIGURED ROUTER |
ADVERTISED |
|
Well-known Mandatory |
YES |
YES |
|
Well-known Discretionary |
YES |
NO |
|
Optional transitive |
NO |
YES |
|
Optional non-transitive |
NO |
NO |
The kinds of well-known mandatory attributes are as follows-
It is used to recognize the originator of the route. It identifies the originating source of the route. There are three possibilities: –
This attribute identifies the list or path of traversed AS to reach a particular destination. The AS path attribute is applied to outbound routes, dictating the best inbound path. AS-Path attributes comprise-
It is not surprising that a BGP prefix has a Next Hop attribute. After all, a router has to know where to route traffic for that prefix. This need is satisfied by the Next Hop attribute. It identifies the next hop’s IP address to reach a particular destination.
It involves three types of values:
The types of well-known discretionary attributes are as follows-
Local preference provides a preference to determine the best path for outbound traffic. This attribute is applied to inbound external routes, which tells the best outbound path. Local preference is shared with iBGP peers when sending updates. It informs iBGP routers how to exit the AS if multiple paths exist.
The types of optional transitive attributes are as follows-
This attribute identifies the BGP router that performed an address aggregation.
This attribute uses the tag routes that share common characteristics in communities.
The types of optional non-transitive attributes are as follows-
This attribute provides a preference for EB peers to a specific inbound router.
BGP considers the first received path the best path, but as other paths are received for the same prefix, the newer path is taken into consideration and is compared to the older paths. Comparison is done based on the BGP Attributes. Attributes are compared in the order listed below.
NOTE: If there is a tie, we move to compare the next attribute until the best path is identified.
The attributes get compared in the order given below-
The path configured with the highest weight is always preferred. Weight is assigned locally to the router and does not travel to the other routers i.e.; it is locally defined. It is used to influence the outbound traffic.
Local preference is the attribute that travels within an Autonomous System i.e., it is not local to the router and exchanged between IBGP routers. The path with the highest Local Preference is preferred. It is used to influence the outbound traffic. Local Preference has a default value equal to 100.
A path originated by the local router is preferred.
The path with the shortest AS-Path length is preferred i.e. path with less number of different AS in between is preferred.
Indicates the origin of the route. It can have three possible values: IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or Incomplete. The lowest origin code is preferred. The origin code value for IGP is lower than EGP while the value for EGP is lower than Incomplete.
The path with the lowest MED value is preferred. It travels within an Autonomous system i.e., it is exchanged between the same AS
Is this an eBGP or iBGP route? eBGP path over the iBGP path is preferred.
Which route is the oldest? The oldest received path is preferred.
A path with the lowest neighbor Router ID is preferred.
A path with the lowest neighbor IP Address is preferred.