mplsEXEC

show mpls label range

Displays the configured and allocated MPLS label ranges on the router.

Overview

The 'show mpls label range' command is a fundamental diagnostic tool for any MPLS-enabled Cisco IOS-XR router. It displays the configured label space, which is divided into static and dynamic ranges. The label range defines the set of MPLS labels that the router can assign to forwarding equivalence classes (FECs). In MPLS, labels are short, fixed-length identifiers used to make forwarding decisions. The label range is configured globally and must be consistent across routers in an MPLS domain to prevent label collisions. On IOS-XR, the default label range is 16000 to 23999, but this can be modified using the 'mpls label range' command in global configuration mode. The static sub-range is used for labels that are manually assigned, such as for static LSPs or inter-AS label blocks. The dynamic sub-range is automatically managed by label distribution protocols like LDP or RSVP-TE. When a protocol needs a new label, it allocates one from the dynamic pool. If the pool is exhausted, label allocation fails, disrupting MPLS services. Therefore, monitoring the free label count in the dynamic range is crucial for capacity planning. This command is typically used during initial MPLS deployment to verify the configured ranges, during troubleshooting to check for label exhaustion, and during audits to ensure label space is not fragmented. It is a quick, non-disruptive command that provides essential information about the health of the MPLS control plane.

Syntax·EXEC
show mpls label range [detail]

When to Use This Command

  • Verifying the configured static and dynamic label ranges after initial MPLS configuration.
  • Checking for label range conflicts when integrating multiple MPLS domains.
  • Troubleshooting label allocation failures due to exhausted dynamic label pools.
  • Auditing label space usage before scaling MPLS services like L3VPN or TE tunnels.

Parameters

ParameterSyntaxDescription
detaildetailProvides additional allocation statistics, including the number of allocatable, allocated, and free labels in each sub-range.

Command Examples

Basic label range display

show mpls label range
MPLS Label Range: Min/Max: 16000/23999
Static Label Range: Min/Max: 16000/19999
Dynamic Label Range: Min/Max: 20000/23999

The first line shows the overall label range (16000-23999). The static range (16000-19999) is reserved for manually assigned labels. The dynamic range (20000-23999) is used for dynamic label assignment by protocols like LDP.

Detailed label range display

show mpls label range detail
MPLS Label Range: Min/Max: 16000/23999
Static Label Range: Min/Max: 16000/19999
  Allocatable: 4000
  Allocated: 5
  Free: 3995
Dynamic Label Range: Min/Max: 20000/23999
  Allocatable: 4000
  Allocated: 120
  Free: 3880

The detail output adds allocation statistics. 'Allocatable' shows total labels in the range. 'Allocated' shows currently used labels. 'Free' shows remaining labels. High allocated counts in the dynamic range may indicate impending exhaustion.

Understanding the Output

The output of 'show mpls label range' provides a quick view of the label space configuration. The first line shows the overall minimum and maximum labels allowed on the router. This is followed by the static and dynamic sub-ranges. The static range is used for labels that are manually configured (e.g., for static LSPs or certain applications). The dynamic range is automatically managed by MPLS control protocols like LDP or RSVP-TE. In the detail view, you see allocation counts: 'Allocatable' is the total number of labels in that sub-range, 'Allocated' shows how many are currently in use, and 'Free' indicates remaining labels. A healthy system should have plenty of free labels in the dynamic range. If the free count approaches zero, label allocation failures may occur, causing MPLS services to fail. The static range typically has very few allocated labels unless manual assignments are extensive. Monitoring these values helps in capacity planning and troubleshooting label exhaustion issues.

Configuration Scenarios

Modifying the MPLS Label Range

A service provider needs to increase the dynamic label range to accommodate more LSPs.

Topology

Single router (configuration change)

Steps

  1. 1.Enter global configuration mode.
  2. 2.Use the 'mpls label range' command to set new minimum and maximum values.
  3. 3.Verify the change with 'show mpls label range'.
Configuration
!
configure terminal
mpls label range 16000 23999
commit
end

Verify: Use 'show mpls label range' to confirm the new range is active.

Watch out: Changing the label range may cause existing label allocations to become invalid if they fall outside the new range. This can disrupt MPLS services. Always plan changes during maintenance windows.

Troubleshooting with This Command

When MPLS services fail to establish or labels are not being assigned, the 'show mpls label range' command is a first step in troubleshooting. If the dynamic label range shows zero free labels, the router has exhausted its label pool. This can happen if too many LSPs are configured or if labels are not being released properly. To resolve, you can either increase the label range (if hardware supports it) or free up labels by removing unnecessary LSPs. Another issue is label range mismatch between routers: if two routers have non-overlapping label ranges, label distribution may fail. Use 'show mpls label range' on both routers to compare. Also, if static labels are configured outside the static range, they will not be accepted. The detail output helps identify how many labels are allocated to which range. If the static range has many allocated labels unexpectedly, check for misconfigured static LSPs. In summary, this command quickly reveals label space health and configuration consistency.

CCNA Exam Tips

1.

Remember that the default dynamic label range on IOS-XR is 16000-23999, but this can be changed with the 'mpls label range' command.

2.

In CCNP exams, be prepared to interpret the output and identify if label exhaustion is likely based on allocated vs free counts.

3.

Know that static labels are used for explicit label assignments (e.g., for inter-AS options) and dynamic labels are used by LDP/RSVP.

Common Mistakes

Confusing static and dynamic ranges: static is for manual assignment, dynamic for protocols.

Assuming the overall range is the same as the dynamic range; the overall range includes both static and dynamic sub-ranges.

Forgetting that the label range must be consistent across routers in the same MPLS domain to avoid label conflicts.

Platform Notes

On Cisco IOS-XR, the 'show mpls label range' command is similar to the equivalent command on Cisco IOS, but IOS-XR uses a different default range (16000-23999) compared to IOS (16-1048575). IOS-XR also enforces a strict division between static and dynamic ranges, whereas IOS allows more flexibility. On IOS-XR, the static range is always a subset of the overall range and is configured separately. The detail option provides allocation counts that are not available in basic IOS output. For equivalent functionality on other platforms, Juniper Junos uses 'show mpls label range' as well, but the output format differs. In IOS-XR, the command is available in EXEC mode and does not require any specific privilege level beyond basic monitoring. Version differences: In older IOS-XR releases, the default range might be different; always verify with documentation. The command is supported on all IOS-XR platforms that support MPLS.

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions