< Home

Configuring a Routing Policy to Control Label Distribution

Configure a routing policy to control label allocation for inter-AS BGP LSPs. If labeled IPv4 routes are advertised to the PE of the local AS, re-allocate MPLS labels to these routes. If routes sent by the PE of the local AS are advertised to the peer ASBR, allocate MPLS labels to these routes.

Procedure

  • Create a routing policy.

    Perform the following steps on each ASBR:

    1. Access the system view.

      system-view

    2. Create a routing policy to be applied to the local PE.

      route-policy policy-name1 permit node node

      For the labeled IPv4 routes received from peer ASBRs, and sent to the PEs in the same AS, this policy ensures that a new MPLS label is allocated.

    3. Match the IPv4 routes with labels.

      if-match mpls-label

    4. Allocate the label to the IPv4 route.

      apply mpls-label

    5. Return to the system view.

      quit

    6. Create a routing policy to be applied to the peer ASBR.

      route-policy policy-name2 permit node node

      For the labeled IPv4 routes received from PE in the local AS, and sent to the remote ASBR, this policy ensures that a new MPLS label is allocated.

    7. Allocate the label to the IPv4 route.

      apply mpls-label

    (Optional) Perform the following steps on the PE (if you want to iterate IPv4 routes to TE tunnels in an AS, configure a tunnel policy on the PE, so that the PE can advertise labeled routes to the ASBR):

    1. Access the system view.

      system-view

    2. Configure a routing policy to be applied to the local ASBR.

      route-policy policy-name permit node node

    3. Allocate the label to the IPv4 route.

      apply mpls-label

  • Apply routing policies.

    Apply routing policies on the ASBR.

    1. Access the system view.

      system-view

    2. Access the BGP view.

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

    3. Create a routing policy to be used when the route is advertised to the local PE.

      peer ipv4-address route-policy policy-name1 export

    4. Create a routing policy to be used when the route is advertised to the peer ASBR.

      peer ipv4-address route-policy policy-name2 export

    (Optional) Apply routing policies on the PE.

    1. Access the system view.

      system-view

    2. Access the BGP view.

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

    3. Create a routing policy to be used when the route is advertised to the local ASBR.

      peer ipv4-address route-policy policy-name export

  • (Optional) Control the creation of ingress LSPs for labeled BGP routes based on routing policies.

    Perform the following steps on each PE.

    1. Access the system view.

      system-view

    2. Access the BGP view.

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

    3. Configure the function to create ingress LSPs for labeled BGP routes based on routing policies.

      ingress-lsp trigger route-policy  route-policy-name

      On a MAN where the hybrid access mode is used, a large number of labeled BGP routes are used to establish end-to-end LSPs. On certain intermediate nodes where VPN services do not need to be supported, excessive ingress LSPs are created, wasting network resources. In this case, you can run the ingress-lsp trigger command to create ingress LSPs based on a routing policy to save network resources.

  • (Optional) Set the maximum number of labeled BGP routes for load balancing.

    After load balancing is configured among labeled BGP routes on the PE, they can load-balance traffic as long as equal-cost labeled BGP routes exist, which improves network bandwidth utilization.

    1. Access the system view.

      system-view

    2. Access the BGP view.

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

    3. (Optional) Access the BGP-IPv4 unicast address family view.

      ipv4-family unicast

    4. Set the maximum number of labeled BGP routes for load balancing.

      maximum load-balancing number

      By default, the maximum number of labeled BGP routes for load balancing is 1.

    5. (Optional) Select BGP labeled routes regardless of their IGP metric values.

      bestroute igp-metric-ignore

      By default, BGP labeled routes with the same destination but different next-hop metric values cannot balance traffic. To enable these routes to balance traffic, run the bestroute igp-metric-ignore command. After this command is run, routes can be selected to balance traffic, regardless of their IGP metric values. Exercise caution when using this command.

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