BGP attribute Detailed: as-path--property

Source: Internet
Author: User

In the IGP era, we all know, for example, OSPF, link state protocol, in the routing of the time, than the cost of the link, which link consumption will be more priority, if two of the same link consumption, then do load balancing.

In fact, the 2 principles to achieve the OSPF---shortest path first work principle.

What if, in BGP, there are multiple routes to achieve the goal, how should the choice be made? Which path is the preferred one?

Take a look at the priority of these 11 attributes, and deepen the memory, preferably with a skilled back:

1 Highest Weight--cisco private properties

2 Highest local prerence-----recognized optional

3 ROUTE originated by the ROUTER NEXT hop=0.0.0.0 *-----Recognized must be respected well-known mandatory

4 Shortest as PATH *-----recognized well-known mandatory

5 LOWEST originated igp> Egp>incomplete *-----Recognized well-known mandatory

6 LOWEST MED

7 EBGP path over IBGP path

8 prefer the PATH throgh the closest IGP neighbor

9 Rrefer oldest ROUTER for EBGP PATH

Prefer the PATH with the LOWEST neighbor BGP ROUTER ID

One BGP LOWEST ROUTER ID

MINIMUM Claster LIST LENGTH

In BGP, in addition to a large set of principles to be understood, the principle of route selection is the most important. Must be mastered (to understand and troubleshoot BGP, here must be to grasp rather than understand) the route principle.

This column more highlights: http://www.bianceng.cn/Network/basis/

Each property is validated by the document one at a time. To be able to reach myself in the mind of these concepts.

Let's take a look at the BGP route selection principle:

1. Select the path with the maximum weight (weight) value, the weight is Cisco proprietary attribute.

2. If the weight value is the same, select the route with the highest local priority first.

3. If the local priority is the same, the BGP route on the local route (the next hop to 0.0.0.0) is selected first.

4. If the local priority is the same, and there is no route originating from this router, a route with the shortest as path is preferred.

5, if the same as the length of the path, the first choice with the lowest source code (ibgp< Ebgp<incomplete) route.

6. If the origin code is the same, select the path with the lowest med value.

7, if the Med is the same, in EBGP Routing and Federated EBGP routing, the preferred EBGP route, in the Federation EBGP Routing and IBGP Route, preferred Federation EBGP route.

8, if all the previous attributes are the same, select the nearest path from the IGP neighbor.

9. If the internal path is the same, select the path of the lowest BGP router ID first.

As-path attribute Detailed:

Concept:

As-path is a recognized mandatory attribute, which describes the path or route of the specified destination as between, and when the BGP speaker forming a route, it adds its own as number to the As_path. In other words, the route passes through an as region, and an as number is added to indicate the priority of the path.

The more the as number is superimposed, the more the as is passed, and the lower the priority of the route.

Conversely, the less you pass, the more the route takes precedence.

And As-path can also prevent the BGP loop.

The working principle is simple, if a BGP router receives a route from its external peers, the As-path contains its own as number, then the router knows that the route has a loop, because the packet processing needs to be dropped.

In fact, in the real network environment, not necessarily as the less the link quality is higher. and As-path This function is based on the as number to determine the priority of the route, as the less the more priority. So this time we might use a function of as-path to increase the length of the as number to enable the selection of the function:

In this diagram, the path to the left is: 500,200,100, the path to the right is 300,100, now add several identical as numbers to the path on the right, and finally the path to the right becomes: 300,100,100,100, more than the as number of the left path. The last path to the left is the primary working path.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.