Configuring a Routing Policy to Control Label Distribution

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

Procedure

  • Create a routing policy.

    Perform the following steps on the ASBR:

    1. Run system-view

      The system view is displayed.

    2. Run route-policy policy-name1 permit node node

      The routing policy applied to the local PE is created.

      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. Run if-match mpls-label

      The IPv4 routes with labels are matched.

    4. Run apply mpls-label

      A label is allocated to the IPv4 routes.

    5. Run quit

      Return to the system view.

    6. Run route-policy policy-name2 permit node node

      The routing policy applied to the peer ASBR is created.

      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. Run apply mpls-label

      A label is allocated to the IPv4 routes.

    8. Run commit

      The configuration is committed.

  • Apply a routing policy.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run peer ipv4-address route-policy policy-name1 export

      The routing policy used when routes are advertised to the local PE is applied.

    4. Run peer ipv4-address route-policy policy-name2 export

      The routing policy used when routes are advertised to the peer ASBR is applied.

    5. Run commit

      The configuration is committed.

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

    Perform the following steps on each PE.

    1. Run system-view

      The system view is displayed.

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

      The BGP view is displayed.

    3. Run ingress-lsp trigger { route-policy route-policy-name | route-filter route-filter-name }

      The system is configured to create ingress LSPs for labeled BGP routes based on routing policies or route-filters.

      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 or route-filter to save network resources.

    4. Run commit

      The configuration is committed.

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