After two PEs establish a BGP EVPN peer relationship, they can exchange EVPN routes.
In EVPN networking, PEs have to establish BGP EVPN peer relationships before exchanging EVPN routes to implement communication between the PEs within an EVPN instance.
Perform the following steps on each PE.
The system view is displayed.
The BGP view is displayed.
A BGP router ID is set.
If this step is not performed, the device automatically selects the interface address as the BGP router ID. Perform this step if a router ID needs to be specified for the current BGP process.
A remote PE is specified as a BGP peer for the PE.
The interface on which a TCP connection to the specified BGP peer is established is specified.
A PE must use a loopback interface address with a 32-bit mask to establish an MP-IBGP peer relationship with the peer PE so that VPN routes can recurse to tunnels. The route to the local loopback interface is advertised to the peer PE using an IGP on the MPLS backbone network.
A peer group is created.
The BGP-EVPN address family view is displayed.
The device is enabled to exchange EVPN routes with a specified peer or peer group.
A BGP EVPN peer is added to the peer group.
Adding BGP EVPN peers to peer groups simplifies BGP network configuration and management.
IRB/IRBv6 or ARP/ND route advertisement is enabled.
A designated forwarder (DF) election delay is set.
If a network is unstable, PE interfaces connecting to CEs will frequently alternate between up and down, resulting in repeated DF election and network performance deterioration. To prevent repeated DF election, run the timer df-delay command to set a longer DF election delay to improve network stability.
In an EVPN dual-homing scenario where interface-based DF election is enabled, you need to run this command to set the delay for DF election to 0s, preventing the long-time existence of dual backup devices during a switchback from causing a traffic interruption.
The maximum number of MAC routes allowed to be accepted from the specified peer or peer group is set.
If an EVPN instance imports many inapplicable MAC routes from a peer or peer group and they account for a large proportion of the total number of MAC routes, you are advised to run this command to limit the maximum number of MAC routes that can be imported. If the imported MAC routes exceed the specified maximum number, the device displays an alarm, prompting you to check the validity of the MAC routes imported to the EVPN instance.
The delayed route selection function is enabled. After the primary path recovers, an appropriate delay ensures that traffic switches back to the primary path after the intermediate device completes refreshing forwarding entries. The exclusive-eviad command configures a route selection delay for routes that are not per-EVI Ethernet A-D routes. To prevent the EVPN VPWS service from being adversely affected after the route selection delay function is enabled, specify this parameter.
The large-community attribute can completely represent a 2-byte or 4-byte AS number, and has two 4-byte LocalData IDs. This enables the administrator to apply policies more flexibly. Before enabling the function to advertise the routes carrying the large-community attribute to BGP EVPN peers, configure the route-policy related to the large-community attribute and use the route-policy to set the large-community attribute.
The maximum hold-off time is set for reestablishing BGP peer relationships, namely, the maximum duration from the time the peer finds that the local device restarts to the time the peer BGP reestablishes a BGP session.
Graceful restart (GR) prevents traffic interruption caused by the reestablishment of BGP peer relationships. You can run the graceful-restart timer restart time or peer graceful-restart static-timer command to set the maximum waiting time for the local end to wait for the peer GR to recover.
To set the maximum hold-off time for reestablishing all BGP peer relationships, run the graceful-restart timer restart command in the BGP view. The maximum hold-off time supported by this command is 3600s.
To set the maximum hold-off time for reestablishing a specified BGP-EVPN peer relationship, run the peer graceful-restart static-timer command in the BGP-EVPN view. Run this command if you want to set a hold-off time longer than 3600s.
If both the graceful-restart timer restart time and peer graceful-restart static-timer commands are run, the configuration of the peer graceful-restart static-timer command takes precedence over the graceful-restart timer restart time command.
This step can be performed only after GR is enabled using the graceful-restart command in the BGP view.
A special mode is specified to process specified path attributes in received BGP EVPN Update messages.
Discards the specified path attributes.
Withdraws the routes with the specified path attributes.
Processes the specified attributes as unknown ones.
The configuration is committed.