The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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 Cisco IOS XR MPLS Configuration Guide for the Cisco CRS Router.
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
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. |
None
MPLS static configuration
Release | Modification |
---|---|
Release 5.1.1 |
This command was introduced. |
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID | Operation |
---|---|
mpls-static |
read |
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 { label-value | all }
label-value |
A value that denotes the label for which the discrepancies are cleared. |
all |
Specifies that all discrepancies are cleared. |
None
EXEC
Release | Modification |
---|---|
Release 5.1.1 |
This command was introduced. |
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID | Operation |
---|---|
mpls-static |
read |
RP/0/RP0/CPU0:router#clear mpls static local-label discrepancy all
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
interface-type |
Interface type. For more information, use the question mark (?) online help function. |
interface-path-id |
Physical interface instance. |
None
MPLS static configuration
Release | Modification |
---|---|
Release 5.1.1 |
This command was introduced. |
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID | Operation |
---|---|
mpls-static |
read and write |
The following command sequence shows how to enable MPLS encapsulation on a gigabit ethernet port.
RP/0/RP0/CPU0:router# configure RP/0/RP0/CPU0:router(config)# mpls static RP/0/RP0/CPU0:router(config-mpls-static)# interface gigabitEthernet 0/1/0/0
To display information about local labels allocated using mpls static command, use the show mpls static local-label command in EXEC mode.
show mpls static local-label { label-value | all | discrepancy | error | vrf { vrf-name | default } { all | discrepancy | error } } [detail]
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. |
vrf vrf-name |
Specifies VRF name to display MPLS static information specific to that VRF. |
default |
Displays MPLS static information for the default VRF. |
detail |
(Optional) Detailed information is displayed. |
None
EXEC
Release | Modification |
---|---|
Release 5.1.1 |
This command was introduced. |
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID | Operation |
---|---|
mpls-static |
read |
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 1.1.1.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 1.1.1.1/32 No Discrepancy
The following command sequence shows how to view MPLS static information for all local labels in a particular VRF:
RP/0/RP0/CPU0:router#show mpls static local-label vrf vpn1 all
Wed Apr 23 18:13:56.671 UTC
Label VRF Type Prefix RW Configured Status
------- --------------- ------------ ---------------- --------------- --------
1100 vpn1 Per-Prefix 10.10.10.10/32 No Created
To display MPLS static summary information, use the show mpls static summary command in EXEC mode.
show mpls static summary
summary |
Displays MPLS static binding information. |
None
EXEC
Release | Modification |
---|---|
Release 5.1.1 |
This command was introduced. |
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID | Operation |
---|---|
mpls-static |
read |
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
To enable static MPLS label binding on a specific IPv4 unicast destination address prefix, in the context of a specific VRF, use the vrf command in MPLS-static configuration mode. To remove MPLS static binding, use the no form of this command.
vrf vrf-name address-family ipv4 unicast local-label label_value allocate { per-prefix ipv4-prefix-value | per-vrf forward path path_value pop-and-lookup }
no vrf vrf1
ipv4 |
Configure IPv4 address-family parameters. |
unicast |
Make MPLS static configurations for unicast traffic. |
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 is statically bound. |
per-vrf |
The MPLS protocol requests a single VPN label to be statically bound as the local label for all the prefixes in a specified VRF. |
forward |
Configures forwarding for traffic with static MPLS label. |
path path-value |
Specifies path-id for MPLS cross-connect path. |
pop-and-lookup |
Removes the MPLS label and performs IP-based lookup to learn about provider edge (PE) or customer edge (CE) interfaces for forwarding packets. |
None
MPLS static configuration
Release | Modification |
---|---|
Release 5.1.1 |
This command was introduced. |
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
While using the VRF command, it is not possible to specify the out going label or next hop information for packet that have static MPLS label binding.
Task ID | Operation |
---|---|
mpls-static |
read |
The following command sequence shows how to specify local label for an ip-prefix in context of a specific VRF.
RP/0/RP0/CPU0:router#configure RP/0/RP0/CPU0:router(config)#mpls static RP/0/RP0/CPU0:router#vrf vrf1 address-family ipv4 unicast RP/0/RP0/CPU0:router#local-label 30500 allocate per-prefix 10.2.2.2/24
The following command sequence shows how to remove the MPLS label and perform IP-based lookup to forward the packets.
RP/0/RP0/CPU0:router#configure RP/0/RP0/CPU0:router#mpls static RP/0/RP0/CPU0:router#vrf vrf1 address-family ipv4 unicast RP/0/RP0/CPU0:router#local-label 30500 allocate per-vrf forward path 1 pop-and-lookup
clear mpls static local-label discrepancy { label-value | all }
label-value |
A value that denotes the label for which the discrepancies are cleared. |
all |
Specifies that all discrepancies are cleared. |
None
EXEC
Release | Modification |
---|---|
Release 5.1.1 |
This command was introduced. |
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID | Operation |
---|---|
mpls-static |
read |
RP/0/RP0/CPU0:router#clear mpls static local-label discrepancy all