BGP4+ technical principle

Overview:

BGP is a protocol with strong scalability. Traditional BGP-4 can only manage IPv4 unicast routing information, but it can also support the application of other network layer protocols (such as IPv6, multicast, VPN, etc.). BGP multi-protocol extension MP-BGP (MultiProtocol BGP) is an extension of BGP-4 to provide support for multiple network layer protocols. The current MP-BGP standard is RFC4760, which uses extended attributes and address families to support IPv6, multicast, and VPN related content. The original message mechanism and routing mechanism of the BGP protocol have not changed.

MP-BGP's support for IPv6 unicast networks is called BGP4+, and its support for IPv4 multicast networks is called MBGP (Multicast BGP). MP-BGP establishes independent topological structures for IPv6 unicast networks and IPv4 multicast networks, and stores routing information in independent routing tables to maintain routing information between unicast IPv4 networks, unicast IPv6 networks and multicast networks Mutual isolation also realizes the use of separate routing strategies to maintain the routes of their respective networks.

Both parties need to negotiate whether to support the IPv6 address family in their Open messages. Only if they support both can establish an IPv6 BGP neighbor. The
Insert picture description here
packet capture is as follows:
Insert picture description here

MP-BGP extended attributes:

In order to support multiple network layer protocols, BGP needs to reflect network layer protocol information to NLRI and Next_Hop. Therefore, MP-BGP introduces two new optional non-transition path attributes:

  1. MP_ REACH_ NLRI: Multiprotocol Reachable NLRI (Multiprotocol Reachable NLRI), used to advertise reachable routing information and next hop information.
  2. MP_ UNREACH_ NLRI: Multiprotocol Unreachable NLRI (Multiprotocol Unreachable NLRI), used to withdraw unreachable routing information.

As shown in the figure below, if IPv6 routing information is carried through BGP, in the Upate message, the MP_REACHNLRI attribute (attribute code 14) is used to identify the prefix and next hop information of the route. The address family (AFI) value is 2, which means the protocol carried by BGP is IPv6, and the Subsequent address family identifier (SAFI) value is 1, which means it is a unicast route. Next hop network address represents the next-hop information as fe80::2. In the Network layer reachability information, 2000: 10:1:/64 represents the route prefix and prefix length carried.

Insert picture description here
As shown in the figure below, if BGP needs to revoke IPv6 routes, use the MP_ UNREACH_NLRI attribute (attribute code 15) in the Update message to identify the route prefix that needs to be revoked; in withdrawn routes, 2000:10:1:4::/64, 2000:10:1:5:: /64 represents the route that has been revoked.
Insert picture description here

Configuration: (Huawei equipment)

1. Configure IBGP peer

  1. Run the system-view command to enter the system view.
  2. Run the bgp as-number command to enter the BGP view.
  3. Run the peer ipv6-address as-number as-number command to configure the address of the peer and its AS.
  4. Run the ipv6-family unicast command to enter the IPv6 unicast address family view.
  5. Run the peer ipv6-address enable command to enable the IPv6 peer.
  6. After configuring a BGP4+ peer in the BGP view, you also need to enable the peer in the IPv6 unicast address family view.

Two, configure EBGP peer

  1. Run the system-view command to enter the system view.
  2. Run the bgp as-number command to enter the BGP view.
  3. Run the peer ipv6-address as-number as-number command to configure the IPv6 address and AS of the peer.
  4. Run the peer {ipv6-address | group-name} ebgp-max-hop [hop-count] command to configure the maximum number of hops for EBGP connections. Normally, EBGP peers must have directly connected physical links. If this requirement is not met, the peer ebgp-max-hop command must be used to allow multiple hops to establish TCP connections between them.
  5. Run the ipv6-family unicast command to enter the IPv6 unicast address family view.
  6. Run the peer ipv6-address enable command to enable the IPv6 peer.
  7. After configuring a BGP4+ peer in the BGP view, you also need to enable the peer in the IPv6 unicast address family view.

Sorting out data sources: Huawei hedex document, "HCIE Routing Exchange Learning Guide"

Guess you like

Origin blog.csdn.net/tushanpeipei/article/details/112848131