< Home

(Optional) Configuring the LDP Label Policies

Context

The LSR distributes labels to both upstream and downstream LDP peers, which increases the LDP LSP convergence speed. However, receiving and sending Label Mapping messages result in the establishments of a large number of LSPs, which wastes resources. To reduce the number of LSPs and save memory, use the following policies:

  • Configure the LDP inbound policy.

    Configure LDP inbound policy to restrict the receiving of Label Mapping messages.

  • Configure the LDP split horizon policy.

    Access devices on the MPLS network have low performance If LDP distributes labels to all peers, a large number of LSPs will be established, which cannot be processed by the LSR. The split horizon policy is recommended.

Procedure

  • Configure an inbound LDP policy.
    1. Run system-view

      The system view is displayed.

    2. Run mpls ldp

      The MPLS LDP view is displayed.

    3. Run inbound peer { peer-id | peer-group peer-group-name | all } fec { none | host | ip-prefix prefix-name }

      An inbound policy for allowing the local LSR to receive Label Mapping messages from a specified LDP peer for a specified IGP route is configured.

      To apply a policy associated with a single Forwarding Equivalence Class (FEC) range to an LDP peer group or all LDP peers from which the local LSR receives Label Mapping messages, configure either the peer-group peer-group-name or all parameter in the command.

      If multiple inbound policies are configured for a specified LDP peer, the first configured one takes effect. For example, the following two inbound policies are configured:

      inbound peer 2.2.2.2 fec host
      inbound peer peer-group group1 fec none

      As group1 also contains an LDP peer with peer-id of 2.2.2.2, the following inbound policy takes effect:

      inbound peer 2.2.2.2 fec host

      If two inbound policies are configured in sequence and the peer parameters in the two commands are the same, the second command overwrites the first one. For example, the following two inbound policies are configured:

      inbound peer 2.2.2.2 fec host
      inbound peer 2.2.2.2 fec none

      The second configuration overwrites the first one. This means that the following inbound policy takes effect on the LDP peer with peer-id of 2.2.2.2:

      inbound peer 2.2.2.2 fec none

  • Configure an LDP split horizon policy.
    1. Run system-view

      The system view is displayed.

    2. Run mpls ldp

      The MPLS LDP view is displayed.

    3. Run outbound peer { peer-id | all } split-horizon

      A split horizon policy is configured to distribute labels to only upstream LDP peers.

      By default, split horizon is not enabled and an LSR distributes labels to both upstream and downstream LDP peers.

      The all parameter takes preference over the peer-id parameter. For example, the outbound peer all split-horizon and then outbound peer 2.2.2.2 split-horizon commands are run, the outbound peer all split-horizon command can be saved in the configuration file and take effect, not the outbound peer 2.2.2.2 split-horizon command.

Follow-up Procedure

  • To delete all inbound policies, run the undo command multiple times to delete them one by one, or run the undo inbound peer all command to delete them simultaneously. The first method takes a long time.

  • To delete all outbound policies, run the undo command multiple times to delete them one by one, or run the undo outbound peer all command to delete them simultaneously. The first method takes a long time.

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