BGP routing rules

Source: Internet
Author: User

1. Select the path with the maximum WEIGHT value first. WEIGHT is a dedicated parameter of Cisco and is only valid for local routers with it configured
2. Select a path with the maximum LOCAL_PREFERENCE value first.
3. Select the path generated locally through the BGP command network or aggregate, or re-release the path through IGP. The paths generated by the local network and redistrigate commands have higher priority than those generated by the aggregate-address command.
4. Select a path with AS_PATH first. AS_PATH is a list of autonomous systems that a specific update group uses to reach a local autonomous system. The less the path passes through the AS, the more likely it is to be elected. Note:
N if bgp bestpath as-path ignore is configured, this rule will be skipped.
N regardless of the number of AS contained in the Set, an AS_SET is calculated AS 1.
N AS_CONFED_SEQUENCE is not included in the length of AS_PATH
5. Select the path with the lowest generation type first. Order relationship of each generation type: IGP <EGP <INCOMPLETE
6. Select the path with the lowest MED value first. Note:
N comparison of MED is performed only when the two paths are from the same. Consortium sub-AS will be ignored. In other words, the first AS in AS_SEQUENCE of multiple paths is the same, and then the MED is compared. Any AS_CONFED_SEQUENCE will be ignored
N if bgp always-compare-med is activated, all paths will be compared by MED. This option needs to be activated in the entire AS; otherwise, a routing loop may appear.
N if bgp bestpath med-confed is activated, MED will be compared between all paths consisting of AS_CONFED_SEQUENCE (paths generated by local consortium) only.
N the path where the MED value received from the neighbor is 4294967295 should be changed to 4294967294 before the BGP table is inserted.
N for paths without received MED values, a MED value 0 must be allocated unless the bgp bestpath missing-as-worst command is activated. when this command is activated, the path will be assigned with the MED value 4294947294.
N bgp deterministic med will also affect this step
7. Preferably eBGP rather than iBGP. The path containing AS_CONFED_SEQUENCE is the local path of the consortium and is processed internally. There is no difference between the internal and external alliances.
8. Select the next BGP path with the lowest IGP measurement.
9. if maximum-paths is activated, there will be multiple external or federated external paths from the same adjacent AS or sub-AS. BGP inserts the recently received path into the IP route table, up to n records can be inserted. This will allow load sharing among multiple eBGP paths. Currently, the maximum value of n is 6. When this option is disabled, the default value is 1. the earliest received path is marked as the optimal path in the output of show ip bgp longer-prefixes. Run the next-hop-self equivalent command before forwarding the path to the internal peer.
10. If both paths are external, the first one is preferred. This step can minimize route jitter because the new path cannot replace the old path even if a new path is selected based on the RID. It is better to apply the additional decision steps in 11, 12, and 13 to iBGP paths only. They can ensure the consistency of Optimal Route decision-making in the network and avoid routing loops. If any of the following items is true, this step will be skipped:
N bgp bestpath compare-routerid command activated
N because multiple routes come from the same vro, their RID is the same.
N does not exist. When the neighbor that provides the Optimal Path fails, the current optimal path may be lost.
11. Select the path of the BGP router with the smallest RID. The RID is the maximum IP address on the router and tends to be assigned to the loopback address. You can also manually set it using the bgp router-id command. If a path contains the RR attribute, the author ID replaces the RID attribute during the optimal path selection process.
12. If the paths are the same as those of the primary or RID, the path with the minimum cluster ID length is preferred. This only exists in the environment that runs BGP Route Reflection. In this environment, users are equal to those of RR or other clusters. In this case, you must know the BGP attributes of the specific RR.
13. Select the path from the lowest neighbor address first. This is an IP address used in the BGP neighbor configuration. It corresponds to a remote peer that has a TCP connection with the local router.

 

This article is from "Internet and IT"

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.