- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-Basic MPLS commands | 171.25 KB |
Basic MPLS commands
Only advanced mode and expert mode support basic MPLS configuration. For more information about system operating modes, see device management configuration in Fundamentals Configuration Guide.
Layer 3 aggregate interfaces do not support basic MPLS configuration. The device does not support MPLS forwarding for tunnel packets.
display mpls forwarding ilm
Use display mpls forwarding ilm to display Incoming Label Map (ILM) entries.
display mpls forwarding ilm [ label ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
label: Displays the ILM entry with the specified incoming label. The value range for this argument is 16 to 1048575. If you do not specify an incoming label, this command displays ILM entry information for all incoming labels.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays ILM entries for the master device.
Usage guidelines
An ILM entry records the label operation type, outgoing label, and other forwarding information.
After an LSR receives a labeled packet, it performs the following operations:
1. Identifies the ILM entry that matches the top label of the packet.
2. Performs the specified label operation.
3. Forwards the packet.
Examples
# Display all ILM entries.
<Sysname> display mpls forwarding ilm
Total ILM entries: 3
Flags: T - Forwarded through a tunnel
N - Forwarded through the outgoing interface to the nexthop IP address
B - Backup forwarding information
A - Active forwarding information
M – P2MP forwarding information
InLabel Oper VRF Flag SwapLabel Forwarding Info
--------------------------------------------------------------------------------
30 SWAP 0 T 1000 1024
1279 POP 0 - - -
1407 SWAP 0 NA 1271 Vlan10 50.2.0.2
NB 1270 Tun0 0.0.0.0
Table 1 Command output
Field |
Description |
Total ILM entries |
Total number of ILM entries. |
InLabel |
Incoming label. |
Oper |
Operation type: · POP—Pops the label. · POPGO—Pops the label and forwards the packet to another tunnel. · SWAP—Swaps the label. |
VRF |
Index of a VPN instance. |
Flag |
Forwarding flag: · T—Forwarded through a tunnel. · N—Forwarded through the outgoing interface to the next hop IP address. · B—Backup forwarding information. · A—Active forwarding information. · M—P2MP forwarding information. (Not supported.) |
SwapLabel |
Outgoing label value. |
Forwarding Info |
Forwarding information: · When the forwarding flag is N, the forwarding information records the outgoing interface and the next hop. · When the forwarding flag is T, the forwarding information records the NID. |
display mpls forwarding nhlfe
Use display mpls forwarding nhlfe to display Next Hop Label Forwarding Entry (NHLFE) entries.
Syntax
display mpls forwarding nhlfe [ nid ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
nid: Displays the NHLFE entry with the specified NID. The value range for this argument is 0 to 4294967294.If you do not specify an NID, this command displays NHLFE entry information for all NIDs.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays NHLFE entries for the master device.
Usage guidelines
An NHLFE entry records label forwarding information, such as the outgoing label and outgoing interface. NHLFE entries are mainly used to add multiple labels to packets.
To add multiple labels to a packet, an LSR performs the following operations:
1. Obtains the bottom label and NID in the matching FIB or ILM entry.
2. Obtains the outer label in the NHLFE entry identified by the NID.
Examples
# Display the NHLFE entry with NID 2048.
<Sysname> display mpls forwarding nhlfe 2048
Flags: T - Forwarded through a tunnel
N - Forwarded through the outgoing interface to the nexthop IP address
B - Backup forwarding information
A - Active forwarding information
M – P2MP forwarding information
NID Tnl-Type Flag OutLabel Forwarding Info
--------------------------------------------------------------------------------
2048 LSP NA 2025 Vlan10 10.11.112.26
# Display all NHLFE entries.
<Sysname> display mpls forwarding nhlfe
Total NHLFE entries: 5
Flags: T - Forwarded through a tunnel
N - Forwarded through the outgoing interface to the nexthop IP address
B - Backup forwarding information
A - Active forwarding information
M – P2MP forwarding information
NID Tnl-Type Flag OutLabel Forwarding Info
--------------------------------------------------------------------------------
10 - TA - 2049
20 - TA - 2050
2048 LSP NA 2025 Vlan10 10.11.112.26
2049 LSP NA 3024 Vlan20 10.11.112.26
TB 3026 20
2050 LSP NA 3025 Vlan30 10.11.113.26
Table 2 Command output
Field |
Description |
Total NHLFE entries |
Total number of NHLFE entries. |
NID |
NHLFE entry index. |
Tnl-Type |
Tunnel type: · LOCAL—Direct LSP tunnel. · LSP—Static LSP tunnel, or LSP tunnel signaled using LDP or BGP. · GRE—GRE tunnel. · - (a hyphen)—The tunnel type is invalid. |
Flag |
Forwarding flag: · T—Forwarded through a tunnel. · N—Forwarded through the outgoing interface to the next hop IP address. · B—Backup forwarding information. · A—Active forwarding information. · M—P2MP forwarding information. (Not supported.) |
OutLabel |
Outgoing label. |
Forwarding Info |
Forwarding information: · When the forwarding flag is N, the forwarding information records the outgoing interface and the next hop. · When the forwarding flag is T, the forwarding information records the NID. |
display mpls interface
Use display mpls interface to display MPLS interface information, including the interface name, interface status, and interface MPLS MTU.
Syntax
display mpls interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Specifies an interface by the interface type and number. If you do not specify an interface, this command displays MPLS information for all MPLS-enabled interfaces.
Examples
# Display all MPLS interfaces.
<Sysname> display mpls interface
Interface Status MPLS MTU
Vlan10 Up 1500
Vlan20 Up 1500
The MPLS MTU of an interface is in bytes.
Related commands
mpls enable
mpls mtu
display mpls label
Use display mpls label to display MPLS label usage information.
Syntax
display mpls label { label-value1 [ to label-value2 ] | all }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
label-value1: Specifies a label value. The value range is 16 to 1048575.If used with the label-value2 argument, the label-value1 argument represents the start label of a label range.
to label-value2: Specifies the end label of the label range. The value range for the end label is 16 to 1048575. If you specify a label range by using the label-value1 argument and the to label-value2 option, this command displays usage information for the specified range of labels.
all: Specifies all labels.
Examples
# Display usage information for labels 1025 through 1027.
<Sysname> display mpls label 1025 to 1027
Label Owner State
1025 LDP Alloc
1026 LDP Alloc
1027 LDP Inuse
Table 3 Command output
Field |
Description |
Label |
Label value. |
Owner |
Protocol that is using the label: · Static—Static LSP. · LDP. · BGP. This field displays a hyphen (-) when the label state is Idle. |
State |
Usage state of the label: · Idle—The label is idle. · Alloc—The label has been allocated. · Pending—The label has been released but is still used by an LSP entry. · Inuse—The label has been allocated and used by an LSP entry. |
display mpls lsp
Use display mpls lsp to display LSP information.
Syntax
display mpls lsp [ egress | in-label label-value | ingress | outgoing-interface interface-type interface-number | protocol { bgp | ldp | local | static } | transit ] [ vpn-instance vpn-instance-name ] [ ipv4-address mask-length ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
egress: Displays the LSPs taking the current LSR as egress.
in-label label-value: Displays the LSPs using the specified label as the incoming label. The value range for the label-value argument is 0 to 1048575.
ingress: Displays the LSPs taking the current LSR as ingress.
outgoing-interface interface-type interface-number: Displays the LSPs using the specified interface as the outgoing interface. The interface-type interface-number argument specifies an interface by its type and number.
protocol: Displays the LSPs established by a protocol.
bgp: Displays BGP LSPs.
ldp: Displays LDP LSPs.
local: Displays the LSPs to the direct next hops
static: Displays static LSPs.
transit: Displays the LSPs taking the current LSR as a transit LSR.
vpn-instance vpn-instance-name: Displays LSPs for the specified MPLS L3VPN instance. The vpn-instance-name is a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays LSPs for the public network.
ipv4-address mask-length: Displays the IPv4 LSP for an FEC specified by an IPv4 address and a mask length. The value range for the mask length is 0 to 32.
verbose: Displays detailed LSP information. If you do not specify this keyword, the command displays brief LSP information.
Usage guidelines
If you do not specify any parameters, this command displays brief information about all LSPs. If you specify only the verbose keyword, this command displays detailed information about all LSPs.
Examples
# Display brief information about all IPv4 LSPs.
<Sysname> display mpls lsp
FEC Proto In/Out Label Out Inter/NHLFE/LSINDEX
100.100.100.100/24 LDP -/1049 Vlan20
Backup -/1050 Vlan21
100.100.100.10/24 LDP -/1051 Vlan22
Backup -/1050 Vlan21
100.100.100.10/24 LDP -/1049 Vlan30
101.100.100.10/24 LDP 1026/1049 Vlan20
102.100.100.10/24 LDP 1027/- -
103.100.100.10/24 LDP 1028/1049 Tunnel10
110.100.100.20/24 BGP -/1049 Vlan20
111.100.100.10/24 BGP 2028/1049 Vlan20
112.100.100.10/24 BGP 2029/- Vlan20
113.100.100.10/24 BGP 2030/1049 NHLFE1500
114.100.100.10/24 BGP 2031/1050 Tunnel100
100.100.100.100 Local -/- Vlan20
101.101.101.101/32 Static -/100 Vlan20
- Static 100/200 Vlan20
- Static 101/- Vlan20
Table 4 Command output
Field |
Description |
FEC |
Forwarding equivalence class: · IP address/mask—Classifies FECs by destination address. · IP address/mask/LSINDEX—Classifies FECs by label stack index. · IP address/In Label—The LSP is created through BGP Peer-Set-SID. · IP address—Classifies FECs by next hop. · IP address/Out Label—Classifies FECs by next hop and outgoing label. · - (a hyphen)—The LSP is a static transit LSP or static egress LSP. · Backup—The LSP is a backup LSP of the previous LSP. |
Proto |
Label distribution protocol: · LDP. · BGP. · Static. · Local—LSP to a direct next hop, or LSP that uses a as the LSP head. |
In/Out Label |
Incoming label/outgoing label. |
Out Inter/NHLFE/LSINDEX |
Outgoing interface name, NHLFE entry index, or label stack index of the LSP. NHLFEnumber specifies the ingress LSP selected for the current LSP after route recursion. The ingress LSP is the one that matches the NHLFE entry with an NID of number. LSINDEXnumber specifies the ingress LSP selected for the current LSP after route recursion. The ingress LSP is the one that matches the LSINDEX entry with a label stack index of number. |
# Display detailed information about all LSPs.
<Sysname> display mpls lsp verbose
Destination : 56.10.10.2
FEC : 56.10.10.2/32
Protocol : LDP
LSR Type : Egress
Service : -
In-Label : 1024
State : Active
Destination : 56.10.10.4
FEC : 56.10.10.2/32
Protocol : LDP
LSR Type : Transit
Service : -
In-Label : 1026
Path ID : 0x40000000.1
State : Active
Out-Label : 1800
Nexthop : 10.1.1.2
Out-Interface: Vlan10
BkLabel : 1900
BkNexthop : 20.1.1.2
BkInterface : Vlan20
Destination : 56.10.10.4
FEC : 56.10.10.2/32
Protocol : LDP
LSR Type : Ingress
Service : -
NHLFE ID : 2000
State : Active
Out-Label : 1800
Nexthop : 10.1.1.2
Out-Interface: Vlan10
Destination : -
FEC : -
Protocol : BGP
LSR Type : Transit
Service : -
In-Label : 16000
Path ID : 0x40000000.1
State : Active
Out-Label : -
OriginNexthop: 100.100.100.100
Nexthop : 10.1.1.2
Out-Interface: Vlan10
Path ID : 0x40000000.2
State : Active
Out-Label : -
OriginNexthop: 101.101.101.101
Nexthop : 11.1.1.2
Out-Interface: Vlan20
Path ID : 0x40000000.3
State : Active
Out-Label : -
OriginNexthop: 102.102.102.102
Nexthop : 12.1.1.2
Out-Interface: Vlan30
Table 5 Command output
Field |
Description |
Destination |
LSP destination address. |
FEC |
Forwarding equivalence class: · IP address/mask—Classifies FECs by destination address. · IP address—Classifies FECs by next hop. · IP address/Out Label—Classifies FECs by next hop and outgoing label. · - (a hyphen)—The LSP is a static transit LSP or static egress LSP. |
Protocol |
Label distribution protocol: · LDP. · BGP (instance-name)—The instance-name specifies a BGP instance name. The value of default represents the default BGP instance. · Static. · Local—LSP to a direct next hop, or LSP that uses a as the LSP head. |
LSR Type |
LSR type: · Ingress—The current LSR is the ingress node of the LSP. · Transit—The current LSR is a transit node of the LSP. · Egress—The current LSR is the egress node of the LSP. |
Service |
This field is not supported in the current software version. Service deployed on the LSP. |
Path ID |
Forwarding path. The value is in the format of 0xnn.m. The nn represents the NHLFE group ID of the outer LSPs that carry the current LSP, and m represents the sequence number of the equivalence path. |
NHLFE ID |
NHLFE entry index. |
State |
LSP state: · Active—The LSP is in use. · Inactive—The LSP is idle. |
LsIndex |
Label stack index of the LSP. |
BkLabel |
Outgoing label of the backup LSP. |
BkNexthop |
Next hop address of the backup LSP. |
BkInterface |
Outgoing interface of the backup LSP. |
BkLsIndex |
Label stack index of the backup LSP. |
display mpls nib
Use display mpls nib to display MPLS Nexthop Information Base (NIB) information.
Syntax
display mpls nib [ nib-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
nib-id: Specifies a next hop ID in the range of 1 to FFFFFFFFFFFFFFFE. If you do not specify a next hop, this command displays information about all MPLS next hops.
Examples
# Display information about all MPLS next hops.
<Sysname> display mpls nib
NIB ID: 0x40000000
Users: 1
Status: Active
ECMP number: 1
Outgoing NHLFE ID: 1024
Backup outgoing NHLFE ID: 1027
Table 6 Command output
Field |
Description |
NIB ID |
ID of the next hop. |
Users |
Number of ILM entries that use this next hop. |
Status |
Next hop status: · Active—The next hop is active. · Dummy—The next hop is inactive. |
ECMP number |
Number of equal-cost NHLFE entries. |
Outgoing NHLFE ID |
ID of the NHLFE entry to which the next hop corresponds. |
Backup outgoing NHLFE ID |
ID of the backup NHLFE entry. |
display mpls nid
Use display mpls nid to display usage information for NIDs.
Syntax
display mpls nid [ nid-value1 [ to nid-value2 ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
nid-value1: Specifies an NID. The value range is 0 to 65535. If used with the nid-value2 argument, the nid-value1 argument represents the start NID of an NID range.
to nid-value2: Specifies the end NID of the NID range. The value range for the end NID is 0 to 65535. If you specify an NID range by using the nid-value1 argument and the to nid-value2 option, this command displays usage information for the specified range of NIDs.
Usage guidelines
NIDs are 32-bit binary numbers. They include fixed NIDs and dynamic NIDs.
· Fixed NIDs—Generated for tunnel interfaces. The highest four bits are a value other than 0000.
· Dynamic NIDs—NIDs except fixed NIDs. The highest four bits are 0s.
This command displays usage information only for dynamic NIDs.
If you do not specify any parameters, this command displays usage information for all dynamic NIDs.
Examples
# Display usage information for dynamic NIDs 1028 through 1500.
<Sysname> display mpls nid 1028 to 1500
NID alloc state: '.' means not used, '$' means used
1028 :...$.... ........ ........ ........ ........ ........ ........ ........
1092 :........ ........ ........ ........ ........ ........ ........ ........
1156 :........ ........ ........ ........ ........ ........ ........ ........
1220 :........ ........ ........ ........ ........ ........ ........ ........
1284 :........ ........ ........ ........ ........ ........ ........ ........
1348 :........ ........ ........ ........ ........ ........ ........ ........
1412 :........ ........ ........ ........ ........ ........ ........ ........
1476 :........ ........ ........ .
display mpls summary
Use display mpls summary to display MPLS summary information.
Syntax
display mpls summary
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display MPLS summary information.
<Sysname> display mpls summary
MPLS LSR ID : 1.1.1.1
Egress Label Type: Implicit-null
Labels:
Range Idle
16-1023 1008
1024-9215 8192
65536-73727 8192
131072-139263 8192
16000-24000(reusable) 8001
15000-15999 1000
Protocols:
Type State
BGP(default) Normal
BGP(xy) Normal
BGP(abc) Normal
Table 7 Command output
Field |
Description |
Egress Label Type |
Label type that the egress node assigns to the penultimate hop: · Implicit-null. · Explicit-null. · Non-null. |
Labels |
Label information. |
Range |
Label range. If labels within the label range can be reused, this field displays (reusable) behind the label range. |
Idle |
Number of idle labels in the label range. |
Protocols |
Label distribution protocols that generated LSPs and their running states. |
Type |
Protocol type: · LDP. · BGP (instance-name). The instance-name specifies a BGP instance name. The value of default represents the default BGP instance. · Static—Static LSP. · CCC. This protocol is not supported in the current software version. |
State |
Label distribution protocol running state: · Normal—The protocol is in normal state. · Recover—The protocol is in the GR process. |
mpls enable
Use mpls enable to enable MPLS on an interface.
Use undo mpls enable to disable MPLS on an interface.
Syntax
mpls enable
undo mpls enable
Default
MPLS is disabled on an interface.
Views
Interface view
Predefined user roles
network-admin
Examples
# Enable MPLS on VLAN-interface 2.
<Sysname> System-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] mpls enable
Related commands
display mpls interface
mpls label advertise
Use mpls label advertise to specify the type of label the egress node will advertise to the penultimate hop.
Use undo mpls label advertise to restore the default.
Syntax
mpls label advertise { explicit-null | implicit-null | non-null }
undo mpls label advertise
Default
As egress, the device advertises an implicit null label to the penultimate hop.
Views
System view
Predefined user roles
network-admin
Parameters
explicit-null: Specifies the egress node to advertise an explicit null label of 0 or 2 to the penultimate hop. The explicit null label value is 0 in IPv4 networks and 2 in IPv6 networks. Explicit null label of 2 is not supported in the current software version.
implicit-null: Specifies the egress node to advertise an implicit null label of 3 to the penultimate hop.
non-null: Specifies the egress node to advertise a non-null label to the penultimate hop.
Usage guidelines
As a best practice, configure the egress node to advertise an implicit null label to the penultimate hop if the penultimate hop supports PHP.
If you want to simplify packet forwarding on egress but keep labels to determine QoS policies, configure the egress node to advertise an explicit null label to the penultimate hop.
Use non-null labels only in particular scenarios. For example, when OAM is configured on the egress node, the egress node can get the OAM function entity status only through non-null labels.
As a penultimate hop, the device accepts the implicit null label, explicit null label, or non-null label advertised by the egress node.
For LDP LSPs, the mpls label advertise command triggers LDP to delete the LSPs established before the command is executed and re-establishes new LSPs.
For BGP LSPs, the mpls label advertise command takes effect only on the BGP LSPs established after the command is executed. To apply the new setting to BGP LSPs established before the command is executed, delete the routes corresponding to the BGP LSPs, and then redistribute the routes.
Examples
# Configure the egress node to advertise an implicit null label to the penultimate hop.
<Sysname> system-view
[Sysname] mpls label advertise implicit-null
Related commands
reset mpls ldp
mpls label-usage threshold-alarm percent
Use mpls label-usage threshold-alarm percent to set alarm thresholds for MPLS label usage.
Use undo mpls label-usage threshold-alarm percent to restore the default.
Syntax
mpls label-usage threshold-alarm percent { dynamic | egress | egress6 | l3vpn | srgb | srlb | static | vpls | vpws } upper-limit upper-percent lower-limit lower-percent
undo mpls label-usage threshold-alarm percent { dynamic | egress | egress6 | l3vpn | srgb | srlb | static | vpls | vpws }
Default
The usage alarm upper threshold is 80% and lower threshold is 70% for all types of MPLS labels.
Views
System view
Predefined user roles
network-admin
Parameters
dynamic: Specifies dynamic allocated MPLS labels.
egress: Specifies egress MPLS labels (labels allocated to egress LSPs).
egress6: Specifies IPv6 egress MPLS labels (labels allocated to IPv6 egress LSPs).
l3vpn: Specifies L3VPN MPLS labels (labels allocated to MPLS L3VPN).
srgb: Specifies SRGB MPLS labels (labels allocated to SRGB).
srlb: Specifies SRLB MPLS labels (labels allocated to SRLB).
static: Specifies statically configured MPLS labels.
vpls: Specifies VPLS MPLS labels (labels allocated to VPLS).
vpws: Specifies VPWS MPLS labels (labels allocated to VPWS).
upper-limit upper-percent: Specifies the upper threshold for MPLS label usage, in the range of 1% to 99%.
lower-limit lower-percent: Specifies the lower threshold for MPLS label usage, in the range of 1% to 99%.
Usage guidelines
After SNMP notifications for MPLS label usage are enabled, the device generates a notification when MPLS label usage exceeds the upper threshold or drops below the lower threshold. To enable SNMP notifications for MPLS label usage, use the snmp-agent trap enable mpls-private label-threshold command.
The MPLS label usage upper threshold must be greater than the lower threshold.
Examples
# Set the usage alarm upper threshold to 90% and lower threshold to 80% for dynamic MPLS labels.
<Sysname> system-view
[Sysname] mpls label-usage threshold-alarm percent dynamic upper-limit 90 lower-limit 80
Related commands
snmp-agent trap enable mpls-private
mpls lsr-id
Use mpls lsr-id to configure an LSR ID for the local LSR.
Use undo mpls lsr-id to restore the default.
Syntax
mpls lsr-id lsr-id
undo mpls lsr-id
Default
An LSR has no LSR ID.
Views
System view
Predefined user roles
network-admin
Parameters
lsr-id: Specifies an ID for identifying the LSR, in dotted decimal notation.
Usage guidelines
As a best practice, use the address of a loopback interface on the LSR as the LSR ID.
Examples
# Configure the LSR ID as 3.3.3.3 for the local node.
<Sysname> system-view
[Sysname] mpls lsr-id 3.3.3.3
Related commands
lsr-id
mpls mtu
Use mpls mtu to set the MPLS MTU for an interface.
Use undo mpls mtu to restore the default.
Syntax
mpls mtu size
undo mpls mtu
Default
The MPLS MTU of an interface is not configured. Fragmentation for MPLS packets is based on the IP MTU. If IP MTU is not configured, fragmentation for MPLS packets is based on the MTU of the interface. The length of a fragment does not include that of the MPLS label. Thus, after an MPLS label is added into a fragment, the length of the MPLS fragment might exceed the interface MTU.
Views
Interface view
Predefined user roles
network-admin
Parameters
size: Specifies the MPLS MTU of the interface, in the range of 46 to 65535 bytes.
Usage guidelines
This command is effective only when MPLS is enabled on the interface.
If the MPLS MTU is larger than the interface MTU, data forwarding might fail.
Examples
# Set the MPLS MTU of VLAN-interface 2 to 1000 bytes.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] mpls enable
[Sysname-Vlan-interface2] mpls mtu 1000
Related commands
display mpls interface
mpls ttl expiration enable
Use mpls ttl expiration enable to enable sending MPLS TTL-expired messages.
Use undo mpls ttl expiration enable to disable sending MPLS TTL-expired messages.
Syntax
mpls ttl expiration enable
undo mpls ttl expiration enable
Default
The MPLS TTL-expired messages sending feature is enabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
This command enables an LSR to generate an ICMP TTL-expired message upon receiving an MPLS packet with TTL being 1.
· If the MPLS packet has only one label, the LSR sends the ICMP TTL-expired message back to the source through IP routing.
· If the MPLS packet has multiple labels, the LSR forwards the ICMP TTL-expired message along the LSP of the MPLS packet to the egress node. Then, the egress node sends the message back to the source.
Examples
# Disable sending MPLS TTL-expired messages.
<Sysname> system-view
[Sysname] undo mpls ttl expiration enable
mpls ttl propagate
Use mpls ttl propagate to enable TTL propagation.
Use undo mpls ttl propagate to disable TTL propagation.
Syntax
mpls ttl propagate { public | vpn }
undo mpls ttl propagate { public | vpn }
Default
TTL propagation is enabled for public network packets and is disabled for VPN packets.
Views
System view
Predefined user roles
network-admin
Parameters
public: Specifies public network packets.
vpn: Specifies VPN packets.
Usage guidelines
When TTL propagation is enabled, MPLS performs the following operations:
· Copies the IP TTL to the label TTL for packets entering the MPLS network.
· Copies the label TTL to the IP TTL for packets leaving the MPLS network.
If you enable TTL propagation on both ingress and egress, the IP tracert facility can show the real path in the MPLS network.
When TTL propagation is disabled, MPLS performs the following operations:
· Sets the label TTL to 255 for packets entering the MPLS network.
· Pops the label for packets leaving the MPLS network, without copying the label TTL value to the IP TTL.
The IP tracert facility cannot show the real path in the MPLS network.
The TTL propagation configuration does not take effect on existing LSPs. To make the TTL propagation configuration take effect on existing LSPs, perform the following operation after you execute the mpls ttl propagate command:
· For existing static LSPs, re-configure the static LSPs.
· For dynamically established LSPs, reset LDP sessions by using the reset mpls ldp command.
Within an MPLS network, TTL is always copied between the labels of an MPLS packet. The mpls ttl propagate command affects only the propagation between IP TTL and label TTL.
As a best practice, set the same TTL processing mode on all LSRs of an LSP.
To enable TTL propagation for a VPN, you must enable it on all PE devices in the VPN. This allows you to obtain the same traceroute result (hop count) from those PEs.
Examples
# Enable TTL propagation for VPN packets.
<Sysname> system-view
[Sysname] mpls ttl propagate vpn
snmp-agent trap enable mpls
Use snmp-agent trap enable mpls to enable SNMP notifications for MPLS.
Use undo snmp-agent trap enable mpls to disable SNMP notifications for MPLS.
Syntax
snmp-agent trap enable mpls
undo snmp-agent trap enable mpls
Default
SNMP notifications for MPLS are disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
To report critical MPLS events to an NMS, enable SNMP notifications for MPLS. For MPLS event notifications to be sent correctly, you must also configure SNMP on the device. For more information about SNMP configuration, see the network management and monitoring configuration guide for the device.
Examples
# Enable SNMP notifications for MPLS.
<Sysname> system-view
[Sysname] snmp-agent trap enable mpls
snmp-agent trap enable mpls-private
Use snmp-agent trap enable mpls-private to enable private SNMP notifications for MPLS.
Use undo snmp-agent trap enable mpls-private to disable private SNMP notifications for MPLS.
Syntax
snmp-agent trap enable mpls-private [ entryres–exhausted | hard-resource | label-threshold | label-total | resources-exceeded | slsp-label-dup | slsp-up-down | sr-label-conflict | tunnel-to-vpn ] *
undo snmp-agent trap enable mpls-private [ entryres–exhausted | hard-resource | label-threshold | label-total | resources-exceeded | slsp-label-dup | slsp-up-down | sr-label-conflict | tunnel-to-vpn ] *
Default
Private SNMP notifications for MPLS are disabled.
Views
System view
Predefined user roles
network-admin
Parameters
entryres–exhausted: Sends a notification when MPLS resources are exhausted.
hard-resource: Sends a notification when MPLS hardware resources become insufficient or restores normal.
label-threshold: Sends a notification when MPLS label usage exceeds the upper threshold or drops below the lower threshold. To set the MPLS label usage upper and lower thresholds, use the mpls label-usage threshold-alarm percent command.
label-total: Sends a notification when MPLS label usage reaches 100% or drops from 100% to 95%.
resources-exceeded: Sends a notification when the number of resources (including ACs, PWs, VSIs, and swap labels) on a card reaches the maximum.
slsp-label-dup: Sends a notification when the incoming label requested for a static LSP is already used.
slsp-up-down: Sends a notification when a static LSP goes up or down.
sr-label-conflict: Sends a notification for an SR label conflict, which includes the following situations:
· When a protocol is assigning an SR label to a prefix address, it discovers that another protocol has assigned a different label to the same prefix address.
· The SR label assigned to a prefix address is already occupied by another prefix address.
tunnel-to-vpn: Sends a notification when the recursive tunnel for a VPN instance changes.
Usage guidelines
This command enables generating SNMP notifications for specific MPLS events such as the following:
· MPLS resources are exhausted.
· MPLS label usage exceeds the upper threshold or drops below the lower threshold.
· A static LSP goes up or down.
These notifications are not defined in an RFC and are private MPLS notifications supported by Comware. For SNMP to output the private MPLS notifications correctly, you must also configure parameters for sending SNMP notifications. For more information about SNMP configuration, see Network Management and Monitoring Configuration Guide.
Examples
# Enable all private SNMP notifications for MPLS.
<Sysname> system-view
[Sysname] snmp-agent trap enable mpls-private
Related commands
snmp-agent trap enable mpls