Configuring an EVPN BGP Peer Relationship

After two PEs establish a BGP EVPN peer relationship, they can exchange EVPN routes.

Context

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.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run bgp { as-number-plain | as-number-dot }

    The BGP view is displayed.

  3. (Optional) Run router-id router-id-value

    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.

  4. Run peer ipv4-address as-number as-number

    A remote PE is specified as a BGP peer for the PE.

  5. Run peer ipv4-address connect-interface loopback interface-number

    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.

  6. (Optional) Run group group-name [ internal | external ]

    A peer group is created.

  7. Run l2vpn-family evpn

    The BGP-EVPN address family view is displayed.

  8. Run peer { ipv4-address | group-name } enable

    The device is enabled to exchange EVPN routes with a specified peer or peer group.

  9. (Optional) Run peer ipv4-address group group-name

    A BGP EVPN peer is added to the peer group.

    Adding BGP EVPN peers to peer groups simplifies BGP network configuration and management.

  10. Run peer { ipv4-address | group-name } advertise { irb | arp | irbv6 | nd }

    IRB/IRBv6 or ARP/ND route advertisement is enabled.

  11. (Optional) Run timer df-delay delay-value

    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.

  12. (Optional) Run peer { group-name | ipv4-address } mac-limit number [ percentage ] [ alert-only | idle-forever | idle-timeout times ]

    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.

  13. (Optional) Run route-select delay delay-value [ exclusive-eviad ]

    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.

  14. (Optional) Perform the following operations to enable the device to advertise the routes carrying the large-community attribute to BGP EVPN peers.

    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.

    1. Run peer { ipv4-address | group-name } route-policy route-policy-name export

      An export route-policy is configured to filter routes to be advertised to a specified BGP EVPN peer or peer group.

    2. Run peer { ipv4-address | group-name } advertise-large-community

      The device is enabled to advertise the routes carrying the large-community attribute to a specified BGP EVPN peer or peer group.

      If the routes carrying the large-community attribute do not need to be advertised to a specified BGP EVPN peer or a peer group, run the peer ipv4-address advertise-large-community disable command.

  15. (Optional) Run peer ipv4-address graceful-restart static-timer restart-time

    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.

  16. (Optional) Run peer peerIpv4Addr path-attribute-treat attribute-id { id [ to id2 ] } &<1-255> { discard | withdraw | treat-as-unknown }

    A special mode is specified to process specified path attributes in received BGP EVPN Update messages.

    A BGP EVPN Update message contains various path attributes. If a local device receives Update messages containing malformed path attributes, the involved BGP EVPN sessions may flap. To enhance reliability, you can configure a special mode for processing specified path attributes in received BGP EVPN Update messages. The special mode can be:
    • Discards the specified path attributes.

    • Withdraws the routes with the specified path attributes.

    • Processes the specified attributes as unknown ones.

  17. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >