< Home

Configuring Route Exchange Between CEs and PEs

The routing protocol between a PE and a CE can be BGP, static route, or IGP.

Procedure

  • Configure a PE.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP-VPN instance IPv4 address family view.

      ipv4-family vpn-instance vpn-instance-name

    4. Configure the CE as the peer of the VPN private network.

      peer ipv4-address as-number { as-number-plain | as-number-dot }
      

    5. (Optional) Set the maximum number of hops in the EBGP connection.

      peer { ipv4-address | group-name } ebgp-max-hop [ hop-count ]

      Generally, EBGP peers are connected by a directly physical link. If no directly physical link is available, the peer ebgp-max-hop command must be used to allow EBGP peers to establish a multi-hop TCP connection.

      The default value of hop-count is 255. If the maximum number of hops is set to 1, the PE cannot establish an EBGP connection with a peer if they are not directly connected.

    6. (Optional) Advertise the direct routes to the local CE.

      peer { ipv4-address | group-name } ebgp-max-hop [ hop-count ]

      The PE can automatically learn the direct routes destined for the local CE. The learned routes take precedence over the direct routes advertised from the local CE using EBGP. If this step is not performed, the PE does not use MP-BGP to advertise the direct routes destined for the local CE to the remote PE.

    7. (Optional) Enable the function of BGP AS number substitution.

      peer ip-address substitute-as

      In a scenario where VPN sites in the same site or those that have different private AS numbers communicate through the BGP/MPLS IP VPN backbone network, if a CE and its connected PE in a VPN site establish an EBGP connection, VPN routes from other VPN sites may carry the AS number of this VPN site. As a result, the CE discards the VPN routes, causing a failure in VPN site communication. To prevent this situation from occurring, run the peer substitute-as command on the PE to enable the AS number substitute function.

      Enabling BGP AS number substitution may cause route loops in a CE multi-homing network.

  • Configure a CE.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Configure the PE as the peer.

      peer ipv4-address as-number { as-number-plain | as-number-dot }

    4. (Optional) Set the maximum number of hops in the EBGP connection.

      peer { ipv4-address | group-name } ebgp-max-hop [ hop-count ]

      By default, a direct physical link must be available between EBGP peers. If such a link does not exist, run the peer ebgp-max-hop command to allow EBGP peers to establish a TCP connection over multiple hops.

      If hop-count is not specified in the peer ebgp-max-hop command, 255 is used as the maximum number of hops in EBGP connections.

    5. Import routes of the local site.

      import-route { direct | static | rip [ process-id ] | ospf process-id | isis process-id | unr } [ med med | route-policy route-policy-name ]*

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