tunnel select-seq

Function

The tunnel select-seq command configures the sequence in which different types of tunnels are selected and the number of tunnels participating in load balancing.

The undo tunnel select-seq command restores the default setting.

By default, LSPs are applied, and multiple LDP LSPs can implement load balancing. If only BGP LSPs exist on a network, only one is selected, and load balancing cannot be implemented. If only SR LSPs exist on a network, the system selects SR LSPs for use, and multiple SR LSPs can implement load balancing.

Format

tunnel select-seq { gre | lsp | cr-lsp | sr-te-policy | flex-algo-lsp } * load-balance-number load-balance-number [ unmix ]

tunnel select-seq { gre | ldp | bgp | cr-lsp | sr-lsp | sr-te-policy | flex-algo-lsp } * load-balance-number load-balance-number [ unmix ]

tunnel select-seq { gre | lsp | te | sr-te | sr-te-policy | flex-algo-lsp } * load-balance-number load-balance-number [ unmix ]

tunnel select-seq { gre | ldp | bgp | te | sr-te | sr-lsp | sr-te-policy | flex-algo-lsp } * load-balance-number load-balance-number [ unmix ]

undo tunnel select-seq

Parameters

Parameter Description Value
gre

Specifies the preference sequence of GRE tunnels. The earlier this type of tunnel is listed, the higher the priority is.

-

lsp

Specifies the preference sequence of conventional LSPs. The earlier this type of tunnel is listed, the higher the priority is.

-

cr-lsp

Indicates the preference sequence of CR-LSPs. The earlier a CR-LSP is specified in the command, the higher priority this type of tunnel has for selection.

-

sr-te-policy

Specifies the preference sequence of SR-MPLS TE Policies. The earlier this type of tunnel is listed, the higher the priority is.

The unmix parameter must be specified because SR-MPLS TE Policies cannot load-balance traffic with other types of tunnels.

-

flex-algo-lsp

Specifies the preference sequence of Flex-Algo LSPs. The earlier this type of tunnel is listed, the higher the priority is.

The Flex-Algo LSP parameter must be configured together with the unmix parameter because the Flex-Algo LSP cannot work in load balancing mode with other types of tunnels.

-

load-balance-number load-balance-number

Specifies the number of tunnels that can participate in load balancing.

The value is an integer ranging from 1 to 128, in bits.

The value is an integer ranging from 1 to 64.

unmix

Indicates that only one type of tunnel can be selected in the tunnel policy.

-

ldp

Specifies the preference sequence of LDP LSPs. The earlier this type of tunnel is listed, the higher the priority is.

-

bgp

Indicates the preference sequence of BGP LSPs.

-

sr-lsp

Specifies the preference sequence of SR LSPs. The earlier this type of tunnel is listed, the higher the priority is.

-

te

Specifies the preference sequence of RSVP-TE tunnels. The earlier this type of tunnel is listed, the higher the priority is.

-

sr-te

Specifies the preference sequence of SR-MPLS TE tunnels. The earlier this type of tunnel is listed, the higher the priority is.

-

Views

Tunnel policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
tunnel-policy write

Usage Guidelines

Usage Scenario

By default, a VPN uses LSPs to forward data on the backbone network. To change the type of tunnels carrying VPN services or configure load balancing among tunnels, apply a tunnel policy to the VPN.

A tunnel policy is used by the application module to determine the tunnel to be selected. A tunnel policy can be configured in either of the following modes.

  • Select-seq mode: The system selects tunnels for applications based on the tunnel type priorities configured in the tunnel policy. The tunnel select-seq command is used to configure a tunnel type prioritizing policy.
  • Tunnel binding mode: The system selects only a specific tunnel to carry services. The tunnel binding command is used to configure a tunnel binding policy.

    After you configure and apply a tunnel policy in which tunnels are selected based on priorities, the VPN selects the first tunnel specified in the tunnel select-seq command. For example, after tunnel select-seq cr-lsp lsp load-balance-number 2 is configured in the tunnel policy, the VPN prefers the CR-LSP tunnel after the tunnel policy is applied.
  • If two or more CR-LSPs are available in the system, the system randomly selects two of them.
  • If only one or no CR-LSP is available on the network, the system selects one or two LSPs, respectively, for service transmission. In the scenario where only one CR-LSP is available, it works together with the selected LSP.
  • If the number of tunnels in use is reduced from 2 to less than 2, a tunnel policy is triggered to reselect tunnels. If the number of tunnels in use is less than 2, LSPs are selected.

    If lsp is specified in the command, multiple types of LSPs can be used as candidate tunnels: BGP LSP, static LSP, LDP LSP, and SR LSP (SR-MPLS BE). The priorities of these LSPs are LDP LSP > BGP LSP > static LSP > SR LSP (SR-MPLS BE) in descending order. For example, after tunnel select-seq lsp load-balance-number 2 is configured in the tunnel policy:
  • If one LDP tunnel is available in the system, the system preferentially selects the LDP tunnel.
  • If BGP LSPs exist in the system, the tunnels with insufficient resources are selected from BGP LSPs.
  • If BGP LSPs do not exist in the system, the system selects static LSPs and SR LSPs in descending order of priority.

    To enable a VPN to preferentially select LDP LSPs, SR LSPs, or BGP LSPs, specify the sequence in which the ldp, sr-lsp, or bgp parameter is specified in the tunnel select-seq command.

    To enable a VPN to preferentially select RSVP-TE or SR-MPLS TE tunnels, specify the sequence in which the te or SR-MPLS TE parameter is specified in the tunnel select-seq command.

    If the unmix parameter is specified in the command, only one type of tunnel can be specified in the tunnel policy. For example, after tunnel select-seq cr-lsp lsp load-balance-number 3 unmix is configured in the tunnel policy:
  • If three or more CR-LSPs are available in the system, the system randomly selects three of them.
  • If the number of CR-LSPs in the system is less than three, the system does not select other types of tunnels.

Configuration Impact

If the tunnel select-seq command has been configured for a tunnel policy, you cannot configure the tunnel binding command for the tunnel policy.

Precautions

The lsp parameter is mutually exclusive with the ldp, bgp, and sr-lsp parameters.

The cr-lsp parameter is mutually exclusive with the te and SR-MPLS TE parameters.

CR-LSPs include RSVP-TE tunnels and SR-MPLS TE tunnels. If cr-lsp is specified in the command, the tunnel that goes Up earlier has a higher priority. If you have created an RSVP-TE or SR-MPLS TE tunnel and do not want the tunnel to be selected by the tunnel policy configured with the cr-lsp parameter, you can run the mpls te reserved-for-binding command on the RSVP-TE or SR-MPLS TE tunnel interface.

Example

# Create a tunnel policy named policy2 and specify FLEX-ALGO LSP tunnels as the preferentially selected tunnels.
<HUAWEI> system-view
[~HUAWEI] tunnel-policy policy2
[*HUAWEI-tunnel-policy-policy2] tunnel select-seq flex-algo-lsp load-balance-number 1 unmix
# Create a tunnel policy named policy1 and specify SR-MPLS TE policy tunnels as the preferentially selected tunnels.
<HUAWEI> system-view
[~HUAWEI] tunnel-policy policy1
[*HUAWEI-tunnel-policy-policy1] tunnel select-seq sr-te-policy load-balance-number 1 unmix
# Configure a tunnel policy to select only the LSPs for service transmission and set the number of tunnels participating in load balancing to 2.
<HUAWEI> system-view
[~HUAWEI] tunnel-policy lsp-only
[*HUAWEI-tunnel-policy-lsp-only] tunnel select-seq lsp load-balance-number 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >