Explain BGP attributes and best-path selection

In all, there are 11 different things that can influence the path that BGP takes. As there are so many options sub-optimal routing can be an issue. One thing that BGP does guarantee though is loop-prevention. BGP uses 'attributes' to make routing decisions. There are 8 attributes that are divided into 4 categories

WELL-KNOWN MANDATORYWELL-KNOWN DISCRETIONARY
AS Path
Next Hop
Origin
Local Preference
Atomic Aggregate
Optional TransitiveOptional Non-transitive
Aggregator
Community
Multi-Exit Discriminator (MED)

*** Honourable mention goes to 'Weight'.

Well-Known Mandatory

These are attributes are ones that every BGP route has to have. If they do not then the route will not be marked as valid.

AS Path

This is a list of Autonomous System(s) that the route traverses. There needs to be at least one AS number present in the AS Path.

Next Hop

This is the IP address of the next AS in the AS Path. This is not necessarily the router's neighbour but the exit from the AS that will get to the next AS in the AS Path.

Origin

Where did the route come from? An IGP or BGP?

Well-known Discretionary

Optional attributes that can be used for route processing.

Local Preference

If there is more one route to a destination then local preference can be used. If you have two routes that are equal (AS path is the same length) you can adjust the local preference to prefer a particular exit from an AS. The path with the better local preference (higher is better, default is 100) will be the one that BGP uses to exit the AS.

Atomic Aggregate

BGP supports summarisation. If you summarise then the atomic aggregate is the summary. It is the aggregate of smaller networks into one summary network.Additional info from networkers-online: The purpose of the atomic aggregate attribute is to alert 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.When some routes are aggregated by an aggregator, the aggregator does attache its Router-ID to the aggregated route into the AGGREGATOR_ID attribute and it sets the ATOMIC_AGGREGATE attribute or not; based on whether the AS_PATH information of the aggregated routes was preserved or not.

Optional Transitive

These are optional attributes which are set in one AS and are shared with other ASs. Though these settings can be shared with other ASs they do not have to be acted on as they are optional.

Aggregator

If summarization is happening then the aggregator attribute shows who did the summarization of the route.

Community

Empty by default. It is like a tag, for example: if you are running BGP then your ISP may ask you to use a community so that they know that routes with that particular community are coming from you.

Optional Non-transitive

Optional metrics, they are not required for route processing.

Multi-Exit Discriminator

MED (sometimes also known as the metric) allows you to suggest to other ASs the best way into your network. If you have a faster or preferred route then you can adjust the MED to attempt to prefer that way (lower is better).

Honourable Mention: Weight

Cisco proprietary. It is a way of making a change on one router only within an AS. The weight will influence which route a router takes. The default weight for a route is 0 and the higher the weight the better.

BGP Best Path Selection

1. Weight

I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

2. Local Preference

I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

3. Local Router

If there is a route that is originated then it will be preferred.

4. AS Path

The first three are not normally taken into account as they are not normally configured and therefore do not apply to most routes.

In general use, the AS Path is the first metric that is used for path selection.

5. Reliable Origin

The route with the most reliable origin. IGP routes are seen as being more reliable than EGP routes.

6. MED (metric)

The route with the lowest MED. The MED (often referred to as the Metric for BGP) is received from other routers who have a preferred way for others to enter their network.

7. eBGP vs. iBGP

The route from eBGP is preferred over routes from iBGP.

8. IGP Neighbor

The route from the closest IGP neighbor.

9. Age

The oldest eBGP route in the table.

10. Router ID

The route from the router with the lowest Router ID.

11. IP Address

The route from the neighbor with the lowest IP Address.

If you need a new website or your website needs updating go to https://10kinds.tech.

10 Kinds Technology
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram