MPLS Static Commands

This module describes the commands used to configure static MPLS labels in a Multiprotocol Label Switching (MPLS) network on the .

For detailed information about MPLS concepts, configuration tasks, and examples, see MPLS Configuration Guide for Cisco NCS 5000 Series Routers.

address family ipv4 unicast (mpls-static)

To enable static MPLS label binding on a specific IPv4 unicast destination address prefix and on the forwarding next-hop address, use the address-family ipv4 unicast command in MPLS static configuration mode. To remove MPLS static binding, use the no form of this command.

address-family ipv4 unicast local-label label_value allocate [per-prefix ipv4_prefix_value] forward path path_value nexthop nexthop_information interface-type interface-path-id out-label {label_value | pop | exp-null}

no address-family ipv4 unicast

Syntax Description

local-label label_value

Specifies MPLS local-label value for static binding and forwarding. The range is from 16 to 1048575.

allocate

Displays local-label allocation options.

per-prefix ipv4_prefix_value

Specifies IPv4 prefix value to which the specified MPLS label will be statically bound.

forward

Configure forwarding for traffic with static MPLS label.

path path-value

Specifies path-ID for MPLS cross-connect path.

nexthop nexthop_information

Specifies the next-hop information that is either an IP address or interface.

interface-type interface-id

Interface type. For more information, use the question mark (?) online help function.

out-label label_value

Specifies mpls local-label value for static binding on the egress packet.

pop

Removes label from egress packet.

exp-null

Applies explicit null label on the egress packet.

Command Default

None

Command Modes

MPLS static configuration

Command History

Release Modification
Release 5.1.1

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID Operation

mpls-static

read

Examples

The following command sequence shows how to specify local label for an ip-prefix and define LSP.

RP/0/RP0/CPU0:router#configure
RP/0/RP0/CPU0:router(config)#mpls static 
RP/0/RP0/CPU0:router(config-mpls-static)#address-family ipv4 unicast 
RP/0/RP0/CPU0:router(config-mpls-static-af)#local-label 30500 allocate per-prefix 10.1.1.1/24 forward path 1 nexthop 12.2.2.2 out-label 30600

clear mpls static local-label discrepancy

To clear any discrepancy between statically allocated and dynamically allocated local labels, use the clear mpls static local-label discrepancy command in XR EXEC mode. A label discrepancy is generated when:
  • A static label is configured for an IP prefix (per VRF) that already has a binding with a dynamic label.

  • A static label is configured for an IP prefix, when the same label value is dynamically allocated to another IP prefix.

clear mpls static local-label discrepancy {label-value | all}

Syntax Description

label-value

A value that denotes the label for which the discrepancies need to be cleared.

all

Specifies that all discrepancies need to be cleared.

Command Default

None

Command Modes

XR EXEC mode

Command History

Release Modification
Release 6.0

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID Operation

mpls-static

read

Examples

RP/0/RP0/CPU0:router#clear mpls static local-label discrepancy all

interface (mpls-static)

To enable MPLS encapsulation on specified interfaces, use the interface command in MPLS static configuration mode. To disable MPLS encapsulation on specified interfaces, us the no form of the command.

interface interface-type interface-id

no interface interface-type interface-id

Syntax Description

interface-type

Interface type. For more information, use the question mark (?) online help function.

interface-path-id

Physical interface instance.

Command Default

None

Command Modes

MPLS static configuration

Command History

Release Modification
Release 6.0

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID Operation

mpls-static

read and write

Examples

The following command sequence shows how to enable MPLS encapsulation on a TenGigE port.

RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# mpls static
RP/0/RP0/CPU0:router(config-mpls-static)# interface TenGigE 0/0/0/1

show mpls static local-label

To display information about local labels allocated using mpls static command, use the show mpls static local-label command in XR EXEC mode.

show mpls static local-label {label-value | all [detail] | discrepancy [detail] | error [detail]}

Syntax Description

local-label label-value

Specifies local label value to display MPLS static information for only that label.

all

Displays MPLS static information about all local labels.

discrepancy

Displays label discrepancy between static labels and dynamic labels.

error

Displays MPLS static labeling errors.

detail

(Optional) Detailed information is displayed.

Command Default

None

Command Modes

XR EXEC mode

Command History

Release Modification
Release 6.0

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID Operation

mpls-static

read

Examples

The following command sequence shows how to view label discrepancy information:

RP/0/RP0/CPU0:router#show mpls static local-label discrepancy detail 
Tue Apr 22 18:20:47.183 UTC
Label   VRF             Type         Prefix           RW Configured   Status   
------- --------------- ------------ ---------------- --------------- -------- 
16003   default         Per-Prefix   172.16.0.1/32       No              Discrepancy
           STATUS :  Label has discrepancy

The following command sequence shows how to view MPLS static information for all local labels:

RP/0/RP0/CPU0:router#show mpls static local-label all
Tue Apr 22 18:21:41.813 UTC
Label   VRF             Type         Prefix           RW Configured   Status   
------- --------------- ------------ ---------------- --------------- -------- 
200     default         Per-Prefix   10.10.10.10/32   Yes             Created
16003   default         Per-Prefix   172.16.0.1/32       No              Discrepancy

show mpls static summary

To display MPLS static summary information, use the show mpls static summary command in XR EXEC mode.

show mpls static summary

Syntax Description

summary

Displays MPLS static binding information.

Command Default

None

Command Modes

XR EXEC mode

Command History

Release Modification
Release 6.0

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID Operation

mpls-static

read

Examples

This is the sample output for show mpls static summary command:

RP/0/RP0/CPU0:router#show mpls static summary         
Tue Apr 22 18:22:17.931 UTC

Label     :  Total      2   Errored     0   Discrepancies         1
VRF       :  Total      1   Active      1
Interface :  Total      7   Enabled     1   Forward-Reference     0

LSD       :  CONNECTED
IM        :  CONNECTED
RSI       :  CONNECTED