07-MPLS Command Reference

HomeSupportResource CenterH3C S6850 & S9850 Switch Series Command References-Release 655x-6W10107-MPLS Command Reference
07-Tunnel policy commands
Title Size Download
07-Tunnel policy commands 56.28 KB

Tunnel policy commands

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 | ipv6-address } }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Displays all tunnels. MPLS TE tunnel information is displayed only when the network layer is up.

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.

ipv6-address: Specifies the tunnel destination IPv6 address.

Examples

# Display information about all tunnels.

<Sysname> display mpls tunnel all

Destination      Type     Tunnel/NHLFE      VPN Instance

2.2.2.2          LSP      NHLFE1024         -

3.3.3.3          CRLSP    Tunnel2           -

Table 1 Command output

Field

Description

Destination

Tunnel destination address.

Type

Tunnel type: LSP or CRLSP (MPLS TE tunnel).

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

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

Number of CRLSP and 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     : not configured

  Interface   : not configured

  Tunnel type : not configured

Select-Seq          : CRLSP

Load balance number : 1

Tunnel policy name  : policy2

Preferred paths     :

  Interface   : not configured

  Tunnel type : not configured

Select-Seq          : LSP

Load balance number : 8

Tunnel policy name  : policy3

Preferred paths     :

  Interface   : Tunnel2

  Tunnel type : TE

Select-Seq          : LSP CRLSP

Load balance number : 1

# 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          : CRLSP

Load balance number : 1

Table 3 Command output

Field

Description

Preferred paths

Preferred tunnels information.

Interface

Tunnel interface name of the preferred tunnel.

Tunnel type

Type of the preferred tunnel, which can be TE.

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.

preferred-path

Use preferred-path to configure a tunnel as a preferred tunnel.

Use undo preferred-path to remove the preferred tunnel setting for a tunnel.

Syntax

preferred-path tunnel number

undo preferred-path tunnel number

Default

No preferred tunnels are configured.

Views

Tunnel policy view

Predefined user roles

network-admin

Parameters

tunnel number: Specifies an MPLS TE tunnel by its tunnel interface number. The value range is 0 to 15359.

Usage guidelines

As a best practice for an MPLS VPN, configure a preferred tunnel and make sure the destination address of the tunnel interface identifies the peer PE. In this method, the local PE forwards traffic destined for the peer PE over the preferred MPLS TE tunnel.

For a tunnel policy to solely use a tunnel, do not configure the tunnel as the preferred tunnel in other tunnel policies.

If you configure multiple preferred tunnels that have the same destination address in a tunnel policy, only the first configured tunnel takes effect. If the first tunnel is not available, the second tunnel is used, and so forth. No load balancing will be performed on these tunnels.

You can configure a maximum of 128 preferred tunnels in a tunnel policy.

Examples

# Configure tunnel 1 and tunnel 2 as preferred tunnels for tunnel policy policy1.

<Sysname> system-view

[Sysname] tunnel-policy policy1

[Sysname-tunnel-policy-policy1] preferred-path tunnel 1

[Sysname-tunnel-policy-policy1] preferred-path tunnel 2

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 { cr-lsp | lsp } * load-balance-number number

undo select-seq

Default

The device selects only one tunnel in LSP-CRLSP order.

Views

Tunnel policy view

Predefined user roles

network-admin

Parameters

cr-lsp: Uses CRLSP or SRLSP tunnels.

lsp: Uses LSP tunnels.

load-balance-number number: Specifies the number of tunnels for load balancing. The value range is 1 to 128.

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. For example, the select-seq lsp cr-lsp load-balance-number 3 command gives LSP higher priority over CRLSP. If no LSP is available or the number of LSPs is less than 3, VPN uses MPLS TE tunnels.

Tunnels selected by this method are not fixed, making it hard to plan VPN traffic. As a best practice, do not use this method.

When you configure 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 MPLS TE tunnels, and set the load balancing number to 2.

<Sysname> system-view

[Sysname] tunnel-policy policy1

[Sysname-tunnel-policy-policy1] select-seq cr-lsp load-balance-number 2

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]