You can configure BGP EVPN peer relationships between PEs or between PEs and ASBRs as required to mutually transmit EVPN routes between the PEs. Additionally, you can configure BGP RRs to minimize the number of BGP EVPN peer relationships, saving network resources.
If a BGP RR needs to be configured on the network, establish BGP EVPN peer relationships between all the PEs and the RR.
BGP is enabled, and the BGP view is displayed.
The remote PE is specified as the BGP peer.
A source interface and a source IP address are specified to set up a TCP connection between the BGP peers.
When loopback interfaces are used to establish a BGP connection, it is recommended that the peer connect-interface command be run on both ends to ensure correct connection. If this command is run on only one end, the BGP connection may fail to be established.
The maximum number of hops allowable is set for an EBGP EVPN connection.
Generally, EBGP EVPN peers are directly connected. If they are not directly connected, run the peer ebgp-max-hop command to allow the EBGP EVPN peers to establish a multi-hop TCP connection.
If loopback interfaces are used for an EBGP EVPN connection, the peer ebgp-max-hop command must be run, with the hop-count value greater than or equal to 2. If this configuration is absent, the EBGP EVPN connection fails to be established.
The BGP-VPN instance IPv4/IPv6 address family view is displayed.
The device is enabled to import non-BGP routing protocol routes into the BGP-VPN instance IPv4/IPv6 address family. To advertise host IP routes, only enable the device to import direct routes. To advertise the routes of the network segment where a host resides, configure a dynamic routing protocol (such as OSPF) to advertise the network segment routes. Then enable the device to import routes of the configured routing protocol.
The BGP device is enabled to advertise IP prefix routes to the BGP peer. This configuration allows the BGP device to advertise both host IP routes and routes of the network segment where the host resides.
Exit from the BGP-VPN instance IPv4/IPv6 address family view.
The BGP-EVPN address family view is displayed.
The local BGP device is enabled to exchange EVPN routes with a peer or peer group.
The BGP view is displayed.
The system view is displayed.
The configuration is committed.
BGP is enabled, and the BGP view is displayed.
The BGP-EVPN address family view is displayed.
The local device is configured as an RR, and a peer or peer group is specified as the RR client.
The router where the peer reflect-client command is run functions as the RR, and the specified peer or peer group functions as a client.
Route reflection between clients through the RR is disabled.
If the clients of an RR have established full-mesh connections with each other, run the undo reflect between-clients command to disable route reflection between clients through the RR to reduce the link cost. The undo reflect between-clients command applies only to RRs.
A cluster ID is configured for the RR.
If a cluster has multiple RRs, run this command to set the same cluster ID for these RRs to prevent routing loops.
The reflector cluster-id command applies only to RRs.
The configuration is committed.