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.
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
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. |
- |
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.
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.<HUAWEI> system-view [~HUAWEI] tunnel-policy policy2 [*HUAWEI-tunnel-policy-policy2] tunnel select-seq flex-algo-lsp load-balance-number 1 unmix
<HUAWEI> system-view [~HUAWEI] tunnel-policy policy1 [*HUAWEI-tunnel-policy-policy1] tunnel select-seq sr-te-policy load-balance-number 1 unmix
<HUAWEI> system-view [~HUAWEI] tunnel-policy lsp-only [*HUAWEI-tunnel-policy-lsp-only] tunnel select-seq lsp load-balance-number 2