[RS] bgp14 routing principle (1)

Source: Internet
Author: User

BGP is a path vector routing protocol. Its job is to exchange route information between autonomous systems to find the most effective path for accessing data somewhere on the Internet. How do I select the optimal route? Cisco borderless networks reveal 14 BGP routing principles:

BGP routing principle: premise (the next hop of a route can be reached, synchronization is disabled, the route is not punished, and the prefix is not rejected by the inbound routing policy). The specific principles are as follows:

1: weight first compares management weights (the larger the weight, the higher the priority ),This parameter is valid locally. Although the weight attribute is private to Cisco, many vendors also have built-in attributes (but cannot display and modify them), which ensures that the routes originating locally are the most preferred, because the weight of the local originating route is 32768, the weight of the route learned from other BGP peers is 0.

2: local-Pref local preference (the larger the priority ),This parameter is passed in this. The local preference attribute can only be transmitted between ibgp peer. If the path attribute of the route received between ebgp peer carries the local preference, the notifacation message is triggered, resulting in session interruption.

3: The router's local originating path takes precedence.. The Local Source Path is next-hop 0.0.0.0 and weight is 32768. Different methods can be used, such as network or redistrigate. There is a priority between these methods: Network> redistribute> aggregate, but this principle is not used as a BGP routing policy.

4: routes with the shortest as-Path (that is, the as-path has the lowest priority) are prioritized.. However, you can configure BGP bestpath as-path ignore to ignore this step. Note: When performing aggregation routing, the as number in {} in the as-path list generated after the as-set is used is only the length of an as number; the as number length in the as-path list in the consortium is not calculated! Route-map in different directions has different positions for the inserted as number.

5: Compare the origin attributes with the lowest source code.Priorities of three origin attributes: IGP> EGP> incomplete. Origin attributes are always carried in BGP routes. Rarely use the origin attribute as the BGP routing policy.

6: Evaluate med (the path with the smallest med value wins ).By default, only the MED values of BGP routes from the same as are compared (that is, the first as in As-sequence is the same ). The command BGP always-compare-Med compares all paths with med, regardless of whether they come from the same. If this option is used, it must be configured in AS (to avoid routing loop selection ). (All values starting with AS-Confed-sequence are ignored and compared. If BGP always-compare-med is configured, the comparison is performed ).

Med remarks: Cisco recommends that you enable the BGP deterministic-Med command in all new network deployments. For an existing network, you must deploy this command on all routers at the same time or gradually deploy this command. However, be sure to avoid possible internal BGP (ibgp) routing loops. When BGP receives multiple routes to a specific target, it lists them in the reverse order of the received routes (from the latest to the oldest ). then, BGP compares routes in the following order: Starting from the latest entry and moving to the oldest entry (starting from the top of the list and moving down ). For example, compare entry1 with entry2. Then, compare the better of the two with entry3, and so on. When the BGP deterministic-Med command is enabled, routes from the same autonomous system are grouped together in this Order and the best entries in each group are compared. Show ip bgp shows the effect.

If the BGP bestpath med Confed command is activated, only the as-Confed-sequence path can compare the med value. If a path contains any external self-made system, no comparison is made.

7: ebgp is better than ibgp; ebgp is better than federated ebgp(Federated ebgp and federated ibgp are not comparable or compared. Because the federated ebgp and federated ibgp are regarded as internal paths, there is no difference ). If both the entries received by the ebgp peer or the entries received by the ibgp peer or the entries received by the federated ebgp and the federated ibgp peer respectively, continue to the next step.

 

This article from "old books often read New Ideas" blog, please be sure to keep this source http://ramboking.blog.51cto.com/3596215/1542303

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.