(Optional) Configuring Flow Label-based Load Balancing

After flow label-based load balancing is configured for an L2VPN, L2VPN services can be classified by flow labels and forwarding paths can be selected based on the flow labels, improving forwarding efficiency.

Context

When multiple links exist between P devices, configure flow label-based load balancing to improve L2VPN traffic forwarding efficiency. After flow label-based load balancing is enabled on a PE, the PE adds different labels for different L2VPN data flows to distinguish them one from the other. After a P device receives a data packet carrying a flow label, it performs the Hash calculation and selects a forwarding path based on the flow label in the data packet. This processing implements load balancing. To enable flow label-based load balancing for PWs, run the flow-label command.

You can configure flow label-based load balancing for a VSI or PW. To enable flow label-based load balancing for all PWs in a VSI, see Step 1. To enable flow label-based load balancing for a specified PW in a VSI, see Step 2.

Procedure

  • Perform the following operations on both end PEs to enable flow label-based load balancing for all PWs in a VSI:
    1. Run system-view

      The system view is displayed.

    2. (Optional) Run flow-label hash-fields { l2 | l3 | l4 }

      A hash element is configured for flow label load balancing.

      This command takes effect only after the VSI L2VPN flow label function is enabled in the VSI-LDP view.

    3. Run vsi vsi-name

      The VSI view is displayed.

    4. Run pwsignal ldp

      The VSI-LDP view is displayed.

    5. Run flow-label { both | send | receive } [ static ]

      Flow label-based load balancing is enabled for the VSI.

      • Flow label-based load balancing can be enabled only when any of the following conditions is met:
        • The receive parameter is configured on the local PE, and the send parameter is configured on the remote PE.
        • The send parameter is configured on the local PE, and the receive parameter is configured on the remote PE.
        • Both the send and receive parameters are configured on the local and remote PEs.
      • If static is configured, the flow label-based load balancing capability is statically configured.

        If the static flow label-based load balancing configuration does not match on both ends, the device discards packets carrying a flow label, causing packet loss.

        In VPLS scenarios where services run properly, after you run the flow-label command in the VSI view, PWs in the VSI will be re-established and temporary packet loss will occur.

    6. Run commit

      The configuration is committed.

  • Perform the following operations on both end PEs to enable flow label-based load balancing for a specified PW in a VSI:
    1. Run system-view

      The system view is displayed.

    2. (Optional) Run flow-label hash-fields { l2 | l3 | l4 }

      A hash element is configured for flow label load balancing.

      This command takes effect only after the VSI L2VPN flow label function is enabled in the VSI-LDP-PW view.

    3. Run vsi vsi-name

      The VSI view is displayed.

    4. Run pwsignal ldp

      The VSI-LDP view is displayed.

    5. Run peer peer-address [ negotiation-vc-id vc-id ] pw pw-name

      The PW view is displayed.

    6. (Optional) Run flow-label disable

      Flow label-based load balancing of the PW is disabled.

      If the flow-label command has been run for a VSI to enable flow label-based load balancing for all PWs in the VSI, but a PW does not need the flow label-based load balancing capability, run the flow-label disable command in the PW view to disable the flow label-based load balancing capability of the PW.

    7. Run flow-label { both | send | receive } [ static ]

      Flow label-based load balancing is enabled for the PW.

      • Flow label-based load balancing can be enabled only when any of the following conditions is met:
        • The receive parameter is configured on the local PE, and the send parameter is configured on the remote PE.
        • The send parameter is configured on the local PE, and the receive parameter is configured on the remote PE.
        • Both the send and receive parameters are configured on the local and remote PEs.
      • If static is configured, the flow label-based load balancing capability is statically configured.

        If the static flow label-based load balancing configuration does not match on both ends, the device discards packets carrying a flow label, causing packet loss.

    8. Run commit

      The configuration is committed.

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