Establishing a BGP EVPN Peer Relationships

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.

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

    A peer device is configured 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. (Optional) Run timer df-delay delay-value

    A designated forwarder (DF) election delay is configured.

    If a network is unstable, PE interfaces connecting to CEs will frequently alternate between Up and Down, resulting in repeated DF election and subsequent 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.

  11. (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 number of imported MAC routes exceeds the specified maximum number, the device displays an alarm, prompting you to check the validity of the MAC routes imported to the EVPN instance.

  12. (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 represent a whole 2-byte or 4-byte AS number, and contain two 4-byte LocalData IDs, facilitating the flexible application of route-policies. 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 for the BGP EVPN peer or 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 the 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 in a peer group, run the peer ipv4-address advertise-large-community disable command.

  13. (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.

  14. Run commit

    The configuration is committed.

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