BGP Summary

Keywords:
Border Gateway Protocol - BGP
routing protocol, based on TCP, port 179

Autonomous System Number (ASN)

ASNs are handed out by a central authority (ICANN)
ASNs between 64512 and 65535 are reserved for private use。

The longest prefix allowed within internet BGP routing tables is generally /24 for IPv4 and /48 for IPv6.

eBGP and iBGP

eBGP: BGP is used to peer between autonomous systems. eBGP peers have different ASNs while iBGP peers have the same ASN.

iBGP: peering used is referred to as internal BGP or iBGP. iBGP speaker does not forward routing information learned from one iBGP peer to another iBGP peer. All iBGP speakers need to be peered with each other in a full mesh. One hop can only learn the route of its neighbors, but not spread the information of its neighbors. Therefore, a mesh full connection method is required to enable all networks to communicate with each other. It is also possible to choose 反射the way.

route reflector

It is difficult to interconnect all devices in an AS, so route reflection is needed to reduce device configuration, neighbor entries and machine load.

Routing reflector transfer principles:

  1. RR receives an EBGP route and sends it to all EBGP neighbors and IBGP neighbors, including reflector group members and non-members
  2. RR receives an IBGP route sent by RRC, and sends it to all EBGP neighbors, and also to all RRC and Non-RRC
  3. RR receives an IBGP route sent by Non-RRC, it will send it to all EBGP neighbors and RRC, and will not send it to Non-RRC

role:

  • Route reflector servers (RR)
    accept routing information and propagate routing information, do not have any routes to announce;

  • Route reflector clients (RRC)
    accept routing information from route reflector servers and propagate their own information to route reflector servers

  • iBGP peer (Non-RRC)
    common neighbor, only transfers one-hop route

A router ID is the unique identifier of a BGP router in an AS

The Cluster-ID and Originator-ID will be enabled in the reflector group, through which the loop can be prevented

The route reflector and its clients form a cluster (Cluster), which is identified by the unique Cluster ID in the AS.
The route reflector uses the Cluster_List attribute to record the Cluster IDs of all the clusters that the routes pass through. To prevent routing loops between clusters , the route reflector uses the Cluster_List attribute to record the Cluster IDs of all the clusters that the routes pass through. Generally, the Cluster ID is the Route-ID of the router, which can be in decimal number or ip format.

  • When a route is reflected by RR for the first time, RR will add the local Cluster ID to the front of the Cluster List
  • When the RR receives an updated route, the RR will check the Cluster List. If there is already a local Cluster ID in the Cluster List, discard the route; if there is no local Cluster ID, add it to the Cluster List, and then reflect the updated route

The Originator ID is generated by the RR, and the Router ID of the previous hop router on the RR is used to identify the originator of the route, which is used to prevent routing loops in the cluster

  • When a route is reflected by the RR for the first time, the RR adds the Originator_ID attribute to this route to identify the originating device of this route. If the Originator_ID attribute already exists in a route, RR will not create a new Originator_ID attribute
  • When the device receives this route, it will compare the received Originator ID with the local Router ID. If the two IDs are the same, it will not receive this route.

Create a reflection server:

router(config)#router bgp 109
router(config-router)#neighbor 200.85.49.93 remote-as 109
router(config-router)#neighbor 200.85.49.93 route-reflector-client
router(config-router)#bgp cluster id 2000
router(config-router)#end
  • The neighbor route-reflector-client command specifies that this router acts as a route reflector.
  • The bgp cluster-id command specifies the cluster ID for the router as 2000.

Among them 200.85.49.93is client.

cumulus-linux:

You must run the route-reflector-client command after the activate command; otherwise, the route-reflector-client command is ignored.

Guess you like

Origin blog.csdn.net/goddessblessme/article/details/108152858
BGP