Cisco IOS XR Multiprotocol Label Switching Command Reference, Release 3.3
MPLS OAM Commands on Cisco IOS XR Software

Table Of Contents

MPLS OAM Commands on Cisco IOS XR Software

clear mpls oam counters

echo disable-vendor-extension

echo revision

mpls oam

ping mpls

traceroute mpls

traceroute mpls multipath


MPLS OAM Commands on Cisco IOS XR Software


This chapter describes Multiprotocol Label Switching (MPLS) label switched path (LSP) verification commands. These commands provide a means to detect and diagnose data plane failures and are the first set of commands in the MPLS Operations, Administration, and Maintenance (OAM) solution.

clear mpls oam counters

To clear MPLS OAM counters, use the clear mpls oam counters command in EXEC mode.

clear mpls oam counters {global | interface [interface-id | all] | packet}

Syntax Description

global

Clears global counters.

interface interface-id

Clears counters on a specified interface.

all

Clears counters on all interfaces.

packet

Clears global packet counters.


Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release
Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID
Task ID
Operations

mpls-te, mpls-ldp, mpls-static

execute, execute, execute


Examples

The following example shows how to clear all MPLS OAM counters:

RP/0/RP0/CPU0:router# clear mpls oam counters

echo disable-vendor-extension

To disable sending the vendor extension type length and value (TLV) in the echo request, use the echo disable-vendor extension command in MPLS OAM configuration submode. To return to the default behavior, use the no form of this command.

echo disable-vendor-extension

Syntax Description

This command has no arguments or keywords.

Defaults

By default, the vendor extension TLV is sent in each request. The default value is 4.

Command Modes

MPLS OAM configuration submode

Command History

Release
Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID
Task ID
Operations

mpls-te, mpls-ldp, mpls-static

read, write, read, write, read, write


Examples

The following example shows how to disable inclusion of the vendor extensions TLV in the echo requests:

RP/0/RP0/CPU0:router# mpls oam
RP/0/RP0/CPU0:router(config-oam)# echo disable-vendor-extension
RP/0/RP0/CPU0:router(config-oam)#

echo revision

To set the echo packet revision, use the echo revision command in MPLS OAM configuration submode. To return to the default behavior, use the no form of this command.

echo revision

no echo revision

Syntax Description

This command has no arguments or keywords.

Defaults

The default echo revision is 4 (in draft 9).

Command Modes

MPLS OAM configuration submode

Command History

Release
Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID
Task ID
Operations

mpls-te, mpls-ldp, mpls-static

read, write, read, write, read, write


Examples

The following example shows how to set the echo packet default revision:

RP/0/RP0/CPU0:router(config-oam)# echo revision ?

1 draft-ietf-mpls-lsp-ping-03 (initial)
2 draft-ietf-mpls-lsp-ping-03 (rev 1)
3 draft-ietf-mpls-lsp-ping-03 (rev 2)
4 draft-ietf-mpls-lsp-ping-09 (initial)

RP/0/RP0/CPU0:router(config-oam)# echo revision 2
RP/0/RP0/CPU0:router(config-oam)#

mpls oam

To enable MPLS OAM LSP verification, use the mpls oam command in global configuration mode. To return to the default behavior, use the no form of this command.

mpls oam

no mpls oam

Syntax Description

This command has no arguments or keywords.

Defaults

By default, MPLS OAM functionality is disabled.

Command Modes

Global configuration

Command History

Release
Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The mpls oam command and OAM functionality is described in the IETF LSP ping draft.

Task ID
Task ID
Operations

mpls-te, mpls-ldp, mpls-static

read, write, read, write, read, write


Examples

The following example shows how to enable MPLS OAM:

RP/0/RP0/CPU0:router# config
RP/0/RP0/CPU0:router# mpls oam
RP/0/RP0/CPU0:router(config-oam)#

ping mpls

To check MPLS host reachability and network connectivity, use the ping mpls command in EXEC mode.

ping mpls {{ipv4 addr/mask} | {traffic-eng tunnel tunnel intf num}} [destination {start address} {end address} {address increment}] | [dsmap] | [exp exp bits in MPLS header] | [force-explicit-null] | [interval send interval between requests in msec] | [output interface echo request output interface] [pad pad TLV pattern] | [repeat repeat count] | [reply dscp differentiated services codepoint value] | [reply mode [ipv4 | router-alert | no-reply] | [reply pad-tlv]] | [revision echo packet tlv versioning] | [{size packet size} | [source source specified as an IP address] | {sweep {min value} {max value} {increment}] | [timeout timeout in seconds] | [ttl time to live] | [verbose]

Syntax Description

ipv4

Specifies the destination type as a Label Distribution Protocol (LDP) IPv4 address.

addr/mask

Address prefix of the target and number of bits in the target address network mask.

traffic-eng tunnel tunnel intf num

Specifies the destination type as an MPLS traffic engineering (TE) tunnel and tunnel interface.

destination {start address} {end address} {address increment}

Specifies a network 127/8 address to be used as the destination address in the echo request packet.

start address specifies the starting network address

end address specifies the ending network address

address increment specifies the incremental value of the network address, which is expressed as a decimal number value or IP address

dsmap

Indicates that a downstream mapping (DSMAP) type length and value should be included in the LSP echo request.

exp exp bits in MPLS header

Specifies the MPLS experimental field value in the MPLS header for echo replies. Range is 0 to 7. Default is 0.

force-explicit-null

Forces an unsolicited explicit null label to be added to the MPLS label stack and allows LSP ping to be used to detect LSP breakages at the penultimate hop.

interval send interval between requests in msec

Specifies a send interval between requests (in milliseconds). Range is 0 to 3600000. Default is 0.

output interface echo request output interface

Specifies the output interface where echo request packets are sent.

pad pad tlv pattern

Specifies the pad pattern for an echo request.

repeat repeat count

Specifies the number of times to resend a packet. Range is 1 to 2147483647. Default is 5.

reply dscp differentiated services codepoint value

Specifies the differentiated service codepoint value for an MPLS echo reply.

reply-mode [ipv4 | router-alert | no-reply]

Specifies the reply mode for the echo request packet.

no-reply: Do not reply

ipv4: Reply with an IPv4 UDP packet (this is the default)

router-alert: Reply with an IPv4 UDP packet with the IP router alert set

reply pad-tlv

Indicates that a pad TLV should be included.

revision echo packet tlv versioning

Specifies the Cisco extension TLV versioning field:

1 draft-ietf-mpls-lsp-ping-03 (initial)

2 draft-ietf-mpls-lsp-ping-03 (rev 1)

3 draft-ietf-mpls-lsp-ping-03 (rev 2)

4 draft-ietf-mpls-lsp-ping-09 (initial)

size packet size

Specifies the packet size or number of bytes in each MPLS echo request packet. Range is 100 to 17986. Default is 100.

sweep {min value} {max value} {interval}

Specifies a range of sizes for the echo packets sent.

min value: minimum or start size for an echo packet
(range is 100 to 17986)

max value: maximum or end size for an echo packet
(range is 100 to 17986)

interval: number used to increment an echo packet size
(range is 1 to 8993)

source source specified as an IP address

Specifies the source address used in the echo request packet.

timeout timeout in seconds

Specifies the timeout interval in seconds. Range is 0 to 3600. Default is 2 seconds.

ttl time to live

Specifies the TTL value to be used in the MPLS labels (range is 1 to 255).

verbose

Enables verbose output information, including MPLS echo reply, sender address of the packet, and return codes.


Defaults

exp exp bits in MPLS header: 0

interval send interval between requests in msec: 0

repeat repeat count: 5

reply-mode: ipv4

timeout timeout in seconds: 2 seconds

Command Modes

EXEC

Command History

Release
Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The output interface keyword specifies the output interface on which the MPLS echo request packets are sent. If the specified output interface is not part of the LSP, the packets are not transmitted.

In cases where the sweep keyword is used, values larger than the outgoing interface's MTU are not transmitted.

The ping command sends an echo request packet to an address, and then awaits a reply. Ping output can help you evaluate path-to-host reliability, delays over the path, and whether the host can be reached or is functioning.


Note The ping mpls command is not supported on optical LSPs. If an optical LSP is encountered along the LSP's path, it is treated as a physical interface.


Task ID
Task ID
Operations

mpls-te, mpls-ldp

read, write


Examples

The following example shows the destination type as a Label Distribution Protocol (LDP) prefix and specifies a range of sizes for the echo packets sent:

RP/0/RP0/CPU0:router# ping mpls ipv4 140.140.140.140/32 sweep 100 1050 10 verbose repeat 1

Sending 1, [1000..1050]-byte MPLS Echos to 140.140.140.140/32, 
  timeout is 2 seconds, send interval is 0 msec:

Codes: '!' - success, 'Q' - request not sent, '.' - timeout, 
 'L' - labeled output interface, 'B' - unlabeled output interface, 
 'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch, 
 'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label, 
 'P' - no rx intf label prot, 'p' - premature termination of LSP, 
 'R' - transit router, 'I' - unknown upstream index, 
 'X' - unknown return code, 'x' - return code 0

Type escape sequence to abort.

! size 1000, reply addr 196.100.1.18, return code 3
! size 1010, reply addr 196.100.1.18, return code 3
! size 1020, reply addr 196.100.1.18, return code 3
! size 1030, reply addr 196.100.1.18, return code 3
! size 1040, reply addr 196.100.1.18, return code 3
! size 1050, reply addr 196.100.1.18, return code 3

Success rate is 100 percent (6/6), round-trip min/avg/max = 6/7/8 ms

traceroute mpls

To learn the routes that packets follow when travelling to their destinations., use the traceroute mpls command in EXEC mode.

traceroute mpls {{ipv4 addr/mask} | {traffic-eng tunnel tunnel intf num}} [destination {start address} {end address} {address increment}] | [exp exp bits in MPLS header] | [flags fec] | [force-explicit-null] | [output interface echo request output interface] | [reply dscp DSCP bits in reply IP header] | [reply mode [ipv4 | router-alert | no-reply]] [revision echo packet tlv versioning] | [source source specified as an IP address] | [timeout timeout in seconds] | [ttl time to live] | [verbose]

Syntax Description

ipv4

Specifies the destination type as a Label Distribution Protocol (LDP) prefix.

addr/mask

Address prefix of the target and number of bits in the target address network mask.

traffic-eng tunnel tunnel intf num

Specifies the destination type as an MPLS traffic engineering (TE) tunnel and tunnel interface.

destination {start address} {end address} {address increment}

Specifies a network 127 address to be used as the destination address in the echo request packet.

start address specifies the starting network address

end address specifies the ending network address

address increment specifies the incremental value of the network address

exp exp bits in MPLS header

Specifies the MPLS experimental field value in the MPLS header for echo replies. Range is 0 to 7. Default is 0.

flags fec

Specifies that forwarding equivalent class (FEC) stack checking is to be performed at transit routers.

force-explicit-null

Forces an unsolicited explicit null label to be added to the MPLS label stack and allows LSP ping to be used to detect LSP breakages at the penultimate hop.

output interface echo request output interface

Specifies the output interface where echo request packets are sent.

reply dscp differentiated services codepoint value

Specifies the differentiated service codepoint value for an MPLS echo reply.

reply-mode [ipv4 | router-alert | no-reply]

Specifies the reply mode for the echo request packet.

ipv4: Reply with IPv4 UDP packet (this is the default)

router-alert: Reply with IPv4 UDP packet with router alert

revision echo packet tlv versioning

Specifies the Cisco extension TLV versioning field:

1 draft-ietf-mpls-lsp-ping-03 (initial)

2 draft-ietf-mpls-lsp-ping-03 (rev 1)

3 draft-ietf-mpls-lsp-ping-03 (rev 2)

4 draft-ietf-mpls-lsp-ping-09 (initial)

source source specified as an IP address

Specifies the source address used in the echo request packet.

timeout timeout in seconds

Specifies the timeout interval in seconds. Range is from 0 to 3600. Default is 2 seconds.

ttl time to live

Specifies the maximum number of hops (range is 1 to 255).

verbose

Enables verbose output information, including MPLS echo reply, sender address of the packet, and return codes.


Defaults

exp exp bits in MPLS header: 0

interval send interval between requests in msec: 0

reply-mode: ipv4

timeout timeout in seconds: 2 seconds

Command Modes

EXEC

Command History

Release
Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.


Note The mpls traceroute command is not supported on optical LSPs. If an optical LSP is encountered along the LSP's path, it is treated as a physical interface.


Task ID
Task ID
Operations

mpls-te, mpls-ldp

read, write


Examples

The following example shows how to trace a destination:

RP/0/RP0/CPU0:router# traceroute

Protocol [ipv4]: mpls
Target IPv4 or traffic-eng [ipv4]: 
Target IPv4 address: 140.140.140.140
Target mask: 255.255.255.255
Timeout in seconds [2]: 
Extended commands? [no]: yes
Destination address or destination start address: 127.0.0.10
Destination end address: 127.0.0.15
Destination address increment: 1
Source address: 
EXP bits in mpls header [0]: 
Maximum Time To Live [30]: 
Reply mode (2-ipv4 via udp, 3-ipv4 via udp with router alert) [2]: 
LSP ping/trace revision (1-draft 3 initial, 2-draft 3 rev 1, 3-draft 3 rev 2, 4-draft 9 
initial) [4]: 
Force explicit null label? [no]: 
Reply IP header DSCP bits [0]: 
Check the FEC stack at transit routers? [no]: 

Tracing MPLS Label Switched Path to 140.140.140.140/32, timeout is 2 seconds

Codes: '!' - success, 'Q' - request not sent, '.' - timeout, 
'L' - labeled output interface, 'B' - unlabeled output interface, 
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch, 
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label, 
'P' - no rx intf label prot, 'p' - premature termination of LSP, 
'R' - transit router, 'I' - unknown upstream index, 
'X' - unknown return code, 'x' - return code 0

Type escape sequence to abort.

Destination address 127.0.0.10 

0 196.100.1.41 MRU 4470 [Labels: 19 Exp: 0]
L 1 196.100.1.42 MRU 4470 [Labels: 86 Exp: 0] 360 ms
L 2 196.100.1.50 MRU 4470 [Labels: implicit-null Exp: 0] 8 ms
! 3 196.100.1.18 9 ms

traceroute mpls multipath

To discover all possible paths of an LSP between the ingress and egress routers, use the trace mpls multipath command in EXEC mode.

traceroute mpls multipath {{ipv4 addr/mask} | {traffic-eng tunnel tunnel intf num}} [destination {start address} {end address} {address increment}] | [exp exp bits in MPLS header] | [flags fec] | [force-explicit-null] | [hashkey ipv4 bitmap multipath bit size] | [interval send interval between requests in msec] | [output interface echo request output interface] | [reply dscp DSCP bits in reply IP header] | [reply mode [ipv4 | router-alert | no-reply]] | [retry-count echo request retry count] | [revision echo packet TLV versioning] | [source source specified as an IP address] |[timeout timeout in seconds] | [ttl time to live] | [verbose]

Syntax Description

ipv4

Specifies the destination type as a Label Distribution Protocol (LDP) IPv4 address.

addr/mask

Address prefix of the target and number of bits in the target address network mask.

traffic-eng tunnel tunnel intf num

Specifies the destination type as an MPLS traffic engineering (TE) tunnel and tunnel interface.

destination {start address} {end address} {address increment}

Specifies a network 127 address to be used as the destination address in the echo request packet.

start address specifies the starting network address

end address specifies the ending network address

address increment specifies the incremental value of the network address

exp exp bits in MPLS header

Specifies the MPLS experimental field value in the MPLS header for echo replies. Range is 0 to 7. Default is 0.

flags fec

Specifies that forwarding equivalent class (FEC) stack checking is to be performed at transit routers.

force-explicit-null

Forces an unsolicited explicit null label to be added to the MPLS label stack and allows LSP ping to be used to detect LSP breakages at the penultimate hop.

hashkey ipv4 bitmap multipath bit size

Allows user control of the hash key/multipath settings. Range is 0 to 256. The default is 32.

interval send interval between requests in msec

Specifies a send interval between requests (in milliseconds). Range is 0 to 3600000. Default is 0.

output interface echo request output interface

Specifies the output interface where echo request packets are sent.

reply dscp differentiated services codepoint value

Specifies the differentiated service codepoint value for an MPLS echo reply.

reply-mode [ipv4 | router-alert | no-reply]

Specifies the reply mode for the echo request packet.

ipv4: Reply with IPv4 UDP packet (this is the default)

router-alert: Reply with IPv4 UDP packet with router alert

retry-count echo request retry count

Specifies the number of retry attempts during multipath LSP traceroute. A retry is attempted if an outstanding echo request

times out waiting for the corresponding echo reply

fails to find a valid destination address set to exercise a specific outgoing path. Range is 0 to 10. Default is 3.

revision echo packet tlv versioning

Specifies the Cisco extension TLV versioning field:

1 draft-ietf-mpls-lsp-ping-03 (initial)

2 draft-ietf-mpls-lsp-ping-03 (rev 1)

3 draft-ietf-mpls-lsp-ping-03 (rev 2)

4 draft-ietf-mpls-lsp-ping-09 (initial)

source source specified as an IP address

Specifies the source address used in the echo request packet.

timeout timeout in seconds

Specifies the timeout interval in seconds. Range is from 0 to 3600. Default is 2 seconds.

ttl time to live

Specifies the maximum number of hops (range is 1 to 255).

verbose

Enables verbose output information, including MPLS echo reply, sender address of the packet, and return codes.


Defaults

exp exp bits in MPLS header: 0

hashkey ipv4 bitmap multipath bit size: 4

interval send interval between requests in msec: 0

reply-mode: ipv4

retry-count: 3

timeout timeout in seconds: 2 seconds

Command Modes

EXEC

Command History

Release
Modification

Release 3.3.0

This command was supported on the Cisco CRS-1 and Cisco XR 12000 Series Router.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

The hashkey ipv4 bitmap multipath bit size value controls how many addresses are encoded in the DSMAP multipath field. Larger values allow more coverage of equal cost multiple paths throughout the network, but with more processing at the head, mid, and tail routers.

Task ID
Task ID
Operations

mpls-te, mpls-ldp

read, write


Examples

The following example shows how to specify the destination type as an LDP IPv4 prefix:

RP/0/RP0/CPU0:router# traceroute mpls multi ipv4 140.140.140.140/32 verbose 
force-explicit-null

Starting LSP Path Discovery for 140.140.140.140/32

Codes: '!' - success, 'Q' - request not sent, '.' - timeout, 
'L' - labeled output interface, 'B' - unlabeled output interface, 
'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch, 
'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label, 
'P' - no rx intf label prot, 'p' - premature termination of LSP, 
'R' - transit router, 'I' - unknown upstream index, 
'X' - unknown return code, 'x' - return code 0

Type escape sequence to abort.

LL!
Path 0 found, 
output interface POS0/2/0/3 source 196.100.1.61 destination 127.0.0.1 
0 196.100.1.61 196.100.1.62 MRU 4470 [Labels: 18/explicit-null Exp: 0/0] multipaths 0
L 1 196.100.1.62 196.100.1.10 MRU 4470 [Labels: 17/explicit-null Exp: 0/0] ret code 8 
multipaths 1
L 2 196.100.1.10 196.100.1.18 MRU 4470 [Labels: implicit-null/explicit-null Exp: 0/0] ret 
code 8 multipaths 1
! 3 196.100.1.18, ret code 3 multipaths 0
LL!
Path 1 found, 
output interface GigabitEthernet0/3/0/0 source 196.100.1.5 destination 127.0.0.1 
0 196.100.1.5 196.100.1.6 MRU 1500 [Labels: 18/explicit-null Exp: 0/0] multipaths 0
L 1 196.100.1.6 196.100.1.10 MRU 4470 [Labels: 17/explicit-null Exp: 0/0] ret code 8 
multipaths 1
L 2 196.100.1.10 196.100.1.18 MRU 4470 [Labels: implicit-null/explicit-null Exp: 0/0] ret 
code 8 multipaths 1
! 3 196.100.1.18, ret code 3 multipaths 0

Paths (found/broken/unexplored) (2/0/0) 
Echo Request (sent/fail) (6/0) 
Echo Reply (received/timeout) (6/0) 
Total Time Elapsed 80 ms