BGP knowledge points

Source: Internet
Author: User

BGPIt is a path vector protocol that constructs an Overview map based on autonomous systems for each destination. NLRI = Network Layer Reachability Information, Network Layer accessibility Information. BGP uses the AS_PATH attribute to detect loops. If the AS_PATH contains its own AS number, the prefix is rejected. Specifically, this is for eBGP. Because iBGP does not check AS_PATH! In addition, iBGP does not change the AS_PATH attribute.

So how does iBGP prevent loops? An iBGP declarator is not allowed to pass the prefix learned by an iBGP peer to another iBGP peer. However, for this reason, it is necessary to fully connect all iBGP peers fully meshed) to ensure that the prefix is broadcast to all iBGP peers.


1. iBGP notifies local-prefence; eBGP cannot;

2. iBGP does not modify the next hop and AS_PATH, while eBGP does;

3. iBGP requires prefix synchronization (the prefix must exist in IGP before it is broadcast, and if IGP is OSPFRoutingThe device ID is consistent. eBGP does not require prefix synchronization. If the AS does not traverse the AS, or runs BGP on the traversal path, you can disable prefix synchronization;

4. iBGP routes are not re-distributed to IGP by default. Can be modified through bgp redistribute-internal ). EBGP does not have this restriction.

Cisco Route decision

There are 13 steps in total, of which 10th are in the order of receipt. Generally, the comparison ends after 10th. In the following cases, the comparison will be ignored and the comparison will continue in the order of 10th records:

1. bgp bestpath compare-routerid;

2. Multiple paths have the same vroid ID, that is, from the same neighbor. This is rare, Because BGP usually only declares the best path ).

The first is the comparison vroid ID. If the RR attribute exists, compare the originatior_ID;

The first 12th items are for the RR environment and compared according to the length of cluster_list;

Article 14 The optimal route for a low neighbor address is as follows.

BGP read-only and read-write modes

The BGP path selection process starts when no path information is received, which leads to repeated sending of the best path with some prefixes.

In read-only mode, BGP receives all path information and selects the optimal path to advertise the prefix. The read-only mode can be set to 2 minutes from the time when the session is established. You can use bgp update-delay. The BGP process automatically drops out of the read-only mode when receiving the BGP keepalive message.

Bgp nsf (no forwarding interruption), GRgraceful restart, elegant restart)

The data layer can continue to forward data when the BGP router is restarted and the RP is switched. No BGP notification is sent during restart. After restart, create a new TCP session and update RIB and FIB. This is done through two BGP supplements:

1. end-of-RIB marker ):

It is a BGP update message. It does not contain messages that can reach the NLRI, or withdrawal NLRI is empty. Indicates that the route update has ended. It allows the BGP peer to maintain read-only mode before receiving it. Although this can be done through keepalive messages, not all vendors follow it.

2. GR capability ):

It indicates that the peer uses the RIB end flag. Restart the vro as GR restarter, and its peer is GR helper.

When GR restarter restarts, FIB is marked as "obsolete" stale ). GR restarter will re-establish a BGP session with GR helper to receive and process BGP Route Updates sent from the peer, but it will delay the route selection process, wait until the end mark of all peer bodies is received. After the route is selected, update the forwarding status, delete the "out-of-date" tag, and declare the "adj-rib-out" and "RIB End" tags.

When GR helper receives the TCP reset of the GR restarter's BGP session, it retains and "expires" the route information received from the peer and does not send BGP notification messages. After the BGP session is rebuilt, the route update and RIB termination flag are sent. Then, after receiving the route update and the RIB end mark, the FIB "out-of-date" mark is deleted. If the BGP session cannot be rebuilt within the restarter timer, delete the route with "obsolete. Restart time restart timer) should be less than the hold time timer ).

Route jitter attenuation route dampening)

Reuse limit, 750 <suppress limit, 2000) <max suppress limit)

  1. bgp dampening 
  3. max-suppress-limit = reuse-limit x 2(max-suppress-time/half-time) 

The calculated maximum suppression threshold must be greater than the suppression threshold; otherwise, the penalty is invalid.

When all RR customers belong to the same peer-group, RR reflects the prefix sent by a customer to all customers, including those who initiate the prefix.

Group list matching

  1. ip community-list 1 permit 100:1 100:2  
  3. ip community-list 2 permit 100:1  
  5. ip community-list 2 permit 100:2 

List 1 is the relationship between logic and list 2 is the relationship between logic and.

In the routing ing match command:

  1. match community 10 11  
  3. match community 10  
  5. match community 11 

1st matching is a logical or relationship, and 2nd matching is a logical relationship.

The related concepts of BGP have been introduced to you. I hope you can understand 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: 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.