- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 04-Tunnel policy commands | 72.50 KB |
Tunnel policy commands
Only advanced mode and expert mode support tunnel policies. For more information about system operating modes, see device management in Fundamentals Configuration Guide.
The device does not support MPLS forwarding for tunneled packets.
display mpls tunnel
Use display mpls tunnel to display tunnel information.
Syntax
display mpls tunnel { all | statistics | [ vpn-instance vpn-instance-name ] destination ipv4-address }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
all: Displays all tunnels.
statistics: Displays tunnel statistics.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays tunnel information for the public network.
destination: Displays the tunnel destined for the specified address.
ipv4-address: Specifies the tunnel destination IPv4 address.
Examples
# Display information about all tunnels.
<Sysname> display mpls tunnel all
Destination Type Tunnel/NHLFE VPN Instance
2.2.2.2 LSP NHLFE1024 -
Table 1 Command output
|
Field |
Description |
|
Destination |
Tunnel destination address. |
|
Type |
Tunnel type. |
|
Tunnel/NHLFE |
Tunnel or NHLFE entry. NHLFEnumber represents the ingress LSP that matches the NHLFE entry with NID of number. |
|
VPN Instance |
VPN instance name. If the tunnel belongs to the public network, this field displays a hyphen (-). |
# Display tunnel statistics.
<Sysname> display mpls tunnel statistics
LSP : 1
GRE : 0
CRLSP: 0
SRLSP: 0
Table 2 Command output
|
Field |
Description |
|
LSP |
Number of LSP tunnels. |
|
GRE |
This field is not supported in the current software version. Number of GRE tunnels. |
|
CRLSP |
This field is not supported in the current software version. Number of CRLSP tunnels. |
|
SRLSP |
This field is not supported in the current software version. Number of SRLSP tunnels. |
display tunnel-policy
Use display tunnel-policy to display tunnel policy information.
Syntax
display tunnel-policy [ tunnel-policy-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
tunnel-policy-name: Specifies a tunnel policy by its name, a case-sensitive string of 1 to 19 characters. If you do not specify a tunnel policy, this command displays information about all tunnel policies.
Examples
# Display information about all tunnel policies.
<Sysname> display tunnel-policy
Tunnel policy name : policy1
Preferred paths :
Interface : not configured
Tunnel type: not configured
Select-Seq : LSP
Load balance number : 8
Strict : no
# Display information about tunnel policy policy1.
<Sysname> display tunnel-policy policy1
Tunnel policy name : policy1
Preferred paths :
Interface : not configured
Tunnel type: not configured
Select-Seq : LSP
Load balance number : 1
Strict : no
Table 3 Command output
|
Field |
Description |
|
Select-Seq |
Tunnel selection order. The tunnel types are displayed in descending order of priority in tunnel selection. |
|
Load balance number |
Number of tunnels for load balancing. |
|
Strict |
Whether the strict method is used to select tunnels for load balancing: · no—The tunnel policy can use a hybrid of the specified types of tunnels for load balancing. · yes—The tunnel policy uses only one type of tunnels for load balancing. |
|
Preferred paths |
Information about preferred tunnels. |
|
Type |
Tunnel type. |
|
Tunnel |
Tunnel name. |
|
Preference |
Preference value of the preferred tunnel. |
select-seq load-balance-number
Use select-seq load-balance-number to configure the tunnel selection order and set the number of tunnels for load balancing.
Use undo select-seq to restore the default.
Syntax
select-seq [ strict ] lsp load-balance-number number
undo select-seq
Default
The device selects one tunnel from all available tunnels.
Views
Tunnel policy view
Predefined user roles
network-admin
Parameters
strict: Uses the same type of tunnels for load balancing. If you do not specify this keyword, the device can use a hybrid of the specified types of tunnels for load balancing.
lsp: Uses LSP tunnels.
load-balance-number number: Specifies the number of tunnels for load balancing, in the range of 1 to 16.
Usage guidelines
A tunnel type closer to the select-seq keyword has a higher priority, and only the tunnel types specified in this command can be used.
If strict mode is disabled, the device can use different types of tunnels for load balancing. If strict mode is enabled, the device can only use tunnels of the same type for load balancing.
For example, specify three tunnels for load balancing and gives LSPs higher priority over CRLSPs.
· If you execute the select-seq lsp cr-lsp load-balance-number 3 command, the VPN can use CRLSPs when the number of LSPs is fewer than three or no LSPs are available.
· If you execute the select-seq strict lsp cr-lsp load-balance-number 3 command, the VPN can use CRLSPs only if no LSPs are available. It cannot use a mixture of LSPs and CRLSPs for load balancing.
This method selects tunnels randomly, making it hard to plan VPN traffic paths. As a best practice, use this method only if necessary.
If you use both the select-seq load-balance-number and preferred-path commands for a tunnel policy, the tunnel policy selects tunnels in the following steps:
1. If the destination address of the preferred tunnel identifies a peer PE, the tunnel policy uses the preferred tunnel to forward traffic destined for the peer PE.
2. If not, the tunnel policy selects tunnels as configured by the select-seq load-balance-number command.
Examples
# Configure tunnel policy policy1 to use only LSP tunnels, and set the load balancing number to 2.
<Sysname> system-view
[Sysname] tunnel-policy policy1
[Sysname-tunnel-policy-policy1] select-seq lsp load-balance-number 2
Related commands
preferred-path
tunnel-policy (system view)
Use tunnel-policy to create a tunnel policy and enter its view, or enter the view of an existing tunnel policy.
Use undo tunnel-policy to delete a tunnel policy.
Syntax
tunnel-policy tunnel-policy-name
undo tunnel-policy tunnel-policy-name
Default
No tunnel policies exist.
Views
System view
Predefined user roles
network-admin
Parameters
tunnel-policy-name: Specifies a name for the tunnel policy, a case-sensitive string of 1 to 19 characters.
Examples
# Create tunnel policy policy1 and enter its view.
<Sysname> system-view
[Sysname] tunnel-policy policy1
[Sysname-tunnel-policy-policy1]
