Usage Guidelines
The labels 0 through 15 are reserved by the IETF (see RFC 3032, MPLS Label Stack Encoding, for details) and cannot be included in the range specified in the mpls label range command. If you enter a 0 in the command, you will get a message that indicates that the command is an unrecognized command.
The label range defined by thempls label range command is used by all MPLS applications that allocate local labels (for dynamic label switching, MPLS traffic engineering, MPLS Virtual Private Networks (VPNs), and so on).
If you specify a new label range that does not overlap the range currently in use, the new range does not take effect until you reload the router or the router undergoes a Stateful Switchover (SSO) when you are using Cisco IOS Release 12.0S and older software. Later software with the new MPLS Forwarding Infrastructure (MFI), 12.2SR, 12.2SB, 12.2(33)XHI, 12.2(25)SE, and 12.5 allows immediate use of the new range. Existing label bindings, which may violate the newly-configured ranges, remain active until the binding is removed through other methods.
You can use label distribution protocols, such as Label Distribution Protocol (LDP) and Resource Reservation Protocol (RSVP), to reserve a generic range of labels from 16 through 1048575 for dynamic assignment.
You specify the optional static keyword, to reserve labels for static assignment. The MPLS Static Labels feature requires that you configure a range of labels for static assignment. You can configure static bindings only from the current static range. If the static range is not configured or is exhausted, then you cannot configure static bindings.
The range of label values is 16 to 1048575. The maximum value defaults to 1048575, but might be limited to a lower value on certain platforms. Some platforms may support only 256,000 or 512,000 labels. Refer to your platform documentation for the default maximum label value.
If you configure the dynamic label space from 16 to 1048575, the static label space can be in a range that is outside the chosen dynamic label space. The upper and lower minimum static label values are displayed in the help line. For example, if you configure the dynamic label with a minimum value of 100 and a maximum value of 1000, the help lines display as follows:
Router(config)# mpls label range 100 1000 static ?
<1001-1048575> Upper Minimum static label value
<16-99> Lower Minimum static label value
Reserved Label Range --> 0 to 15
Available Label Range --> 16 to 1048575
Dynamic Label Range --> 100 to 1000
Lower End Range --> 16 to 99
Upper End Range --> 1001 to 1048575
In this example, you can configure a static range from one of the following ranges: 16 to 99 or 1001 to 1048575.
If the lower minimum static label space is not available, the lower minimum is not displayed in the help line. For example:
Router(config)# mpls label range 16 400 static ?
<401-1048575> Upper Minimum static label value
In this example, you can configure a static range with a minimum static value of 401 and a maximum static value of up to 1048575.
If an upper minimum static label space is not available, then the upper minimum is not displayed in the help line:
Router(config)# mpls label range 1000 1048575 static ?
<16-999> Lower Minimum static label value
In this example, the range for static label assignment is 16 to 999.
If you configure the dynamic label space with the default minimum (16) and maximum (1048575) values, no space remains for static label assignment, help lines are not displayed, and you cannot configure static label bindings. For example:
Router(config)# mpls label range 16 1048575 ?
<cr>
Examples
The following example shows how to configure the size of the local label space. In this example, the minimum static value is set to 200, and the maximum static value is set to 120000.
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# mpls label range 200 120000
Router(config)#
If you had specified a new range that overlaps the current range (for example, the new range of the minimum static value set to 16 and the maximum static value set to 120000), then the new range takes effect immediately.
The following example show how to configure a dynamic local label space with a minimum static value set to 1000 and the maximum static value set to 1048575 and a static label space with a minimum static value set to 16 and a maximum static value set to 999:
Router(config)# mpls label range 1000 1048575 static 16 999
Router(config)#
In the following output, the show mpls label range command, executed after a reload, shows that the configured range is now in effect:
Router# show mpls label range
Downstream label pool: Min/Max label: 1000/1048575
Range for static labels: Min/Max/Number: 16/999
The following example shows how to restore the label range to its default value:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# no mpls label range
Router(config)# end