Configuring BGP EVPN Peer Relationships

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.

Procedure

  • Configure BGP EVPN peers.

    If a BGP RR needs to be configured on the network, establish BGP EVPN peer relationships between all the PEs and the RR.

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

      BGP is enabled, and the BGP view is displayed.

    2. Run peer ipv4-address as-number { as-number-plain | as-number-dot }

      The remote PE is specified as the BGP peer.

    3. (Optional) Run peer ipv4-address connect-interface interface-type interface-number [ ipv4-source-address ]

      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.

    4. (Optional) Run peer ipv4-address ebgp-max-hop [ hop-count ]

      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.

    5. Run ipv4-family vpn-instance vpn-instance-name or ipv6-family vpn-instance vpn-instance-name

      The BGP-VPN instance IPv4/IPv6 address family view is displayed.

    6. Run import-route { direct | isis process-id | ospf process-id | rip process-id | static | ospfv3 process-id | ripng process-id } [ med med | route-policy route-policy-name ] *

      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.

    7. Run advertise l2vpn evpn

      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.

    8. Run quit

      Exit from the BGP-VPN instance IPv4/IPv6 address family view.

    9. Run l2vpn-family evpn

      The BGP-EVPN address family view is displayed.

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

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

    11. Run quit

      The BGP view is displayed.

    12. Run quit

      The system view is displayed.

    13. Run commit

      The configuration is committed.

  • (Optional) Configure an RR. To minimize the number of BGP EVPN peers on the network, deploy an RR so that the PEs establish BGP EVPN peer relationships only with the RR.
    1. Run bgp { as-number-plain | as-number-dot }

      BGP is enabled, and the BGP view is displayed.

    2. Run l2vpn-family evpn

      The BGP-EVPN address family view is displayed.

    3. Run peer { ipv4-address | group-name } reflect-client

      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.

    4. (Optional) Run undo reflect between-clients

      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.

    5. (Optional) Run reflector cluster-id cluster-id

      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.

    6. Run commit

      The configuration is committed.

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