Вы находитесь на странице: 1из 21

H3C CR16000-F Routers

Comware 7 Segment Routing Command Reference

New H3C Technologies Co., Ltd.


http://www.h3c.com

Software version: CR16000-CMW710-R7951P01 or later


Document version: 6W100-20191122
Copyright © 2019, New H3C Technologies Co., Ltd. and its licensors

All rights reserved


No part of this manual may be reproduced or transmitted in any form or by any means without prior written
consent of New H3C Technologies Co., Ltd.
Trademarks
Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this
document are the property of their respective owners.
Notice
The information in this document is subject to change without notice. All contents in this document, including
statements, information, and recommendations, are believed to be accurate, but they are presented without
warranty of any kind, express or implied. H3C shall not be liable for technical or editorial errors or omissions
contained herein.
Preface
This command reference covers the commands for configuring Segment Routing.
This preface includes the following topics about the documentation:
• Audience.
• Conventions.
• Documentation feedback.

Audience
This documentation is intended for:
• Network planners.
• Field technical support and servicing engineers.
• Network administrators working with the routers.

Conventions
The following information describes the conventions used in the documentation.
Command conventions

Convention Description
Boldface Bold text represents commands and keywords that you enter literally as shown.
Italic Italic text represents arguments that you replace with actual values.
[] Square brackets enclose syntax choices (keywords or arguments) that are optional.
Braces enclose a set of required syntax choices separated by vertical bars, from which
{ x | y | ... }
you select one.
Square brackets enclose a set of optional syntax choices separated by vertical bars,
[ x | y | ... ]
from which you select one or none.
Asterisk marked braces enclose a set of required syntax choices separated by vertical
{ x | y | ... } *
bars, from which you select a minimum of one.
Asterisk marked square brackets enclose optional syntax choices separated by vertical
[ x | y | ... ] *
bars, from which you select one choice, multiple choices, or none.
The argument or keyword and argument combination before the ampersand (&) sign
&<1-n>
can be entered 1 to n times.
# A line that starts with a pound (#) sign is comments.

GUI conventions

Convention Description
Window names, button names, field names, and menu items are in Boldface. For
Boldface
example, the New User window opens; click OK.
Multi-level menus are separated by angle brackets. For example, File > Create >
>
Folder.
Symbols

Convention Description
An alert that calls attention to important information that if not understood or followed
WARNING! can result in personal injury.
An alert that calls attention to important information that if not understood or followed
CAUTION: can result in data loss, data corruption, or damage to hardware or software.

IMPORTANT: An alert that calls attention to essential information.

NOTE: An alert that contains additional or supplementary information.

TIP: An alert that provides helpful information.

Network topology icons

Convention Description

Represents a generic network device, such as a router, switch, or firewall.

Represents a routing-capable device, such as a router or Layer 3 switch.

Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that


supports Layer 2 forwarding and other Layer 2 features.

Represents an access controller, a unified wired-WLAN module, or the access


controller engine on a unified wired-WLAN switch.

Represents an access point.

T Represents a wireless terminator unit.

T Represents a wireless terminator.

  Represents a mesh access point.

 
Represents omnidirectional signals.

  Represents directional signals.

  Represents a security product, such as a firewall, UTM, multiservice security


gateway, or load balancing device.

Represents a security module, such as a firewall, load balancing, NetStream, SSL


VPN, IPS, or ACG module.

Examples provided in this document


Examples in this document might use devices that differ from your device in hardware model,
configuration, or software version. It is normal that the port numbers, sample output, screenshots,
and other information in the examples differ from what you have on your device.
Documentation feedback
You can e-mail your comments about product documentation to info@h3c.com.
We appreciate your comments.
Contents
MPLS SR commands ········································································1 
display isis segment-routing adjacency ···················································································· 1 
display isis segment-routing global-block ·················································································· 1 
display mpls static-sr-mpls ···································································································· 2 
display mpls static-sr-mpls prefix ···························································································· 4 
display ospf segment-routing global-block················································································· 5 
isis prefix-sid ······················································································································ 6 
mpls te static-sr-mpls ··········································································································· 7 
ospf prefix-sid ····················································································································· 8 
segment-routing adjacency enable ·························································································· 9 
segment-routing global-block ······························································································· 10 
segment-routing mpls ········································································································· 10 
segment-routing sr-prefer ···································································································· 11 
static-sr-mpls adjacency ····································································································· 12 
static-sr-mpls lsp ··············································································································· 13 
static-sr-mpls prefix ············································································································ 14 

i
MPLS SR commands
display isis segment-routing adjacency
Use display isis segment-routing adjacency to display IS-IS SR adjacency segment
information.
Syntax
display isis segment-routing adjacency [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an IS-IS process ID in the range of 1 to 65535. If you do not specify this
argument, the command displays SR adjacency segment information about all IS-IS processes.
Examples
# Display SR adjacency segment information about IS-IS process 1.
<Sysname> display isis segment-routing adjacency 1

Segment routing adjacency path information for IS-IS(1)


--------------------------------------------------

SystemID Interface Nexthop Label Type


-------------------------------------------------------------------------------
0000.0000.0011 GE3/1/1 10.123.110.21 24122 L1
0000.0000.0012 GE3/1/2 192.168.56.21 24121 L1

Table 1 Command output

Field Description
SystemID System ID of the neighbor.
Interface Interface connected to the neighbor.
Nexthop Next hop of the adjacency segment.
Label Incoming label.
Type Link adjacency type of the interface.

display isis segment-routing global-block


Use display isis segment-routing global-block to display IS-IS SRGB information.

1
Syntax
display isis segment-routing global-block [ level-1 | level-2 ]
[ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
level-1: Specifies Level-1 SRGB.
level-2: Specifies Level-2 SRGB.
process-id: Specifies an IS-IS process ID in the range of 1 to 65535. If you do not specify this
argument, the command displays the SRGBs of all IS-IS processes.
Usage guidelines
If you do not specify the level-1 or level-2 keyword, the command displays information about
both the Level-1 SRGB and Level-2 SRGB.
Examples
# Display information about the SRGBs for IS-IS process 1.
<Sysname> display isis segment-routing global-block 1

Segment routing global block information for IS-IS(1)


-----------------------------------------------------

Level-1 SRGB
-------------------------
System ID Base Range
-------------------------------------------------------------------------------
0000.0000.0011 16666 5557
0000.0000.0012 18012 4001

Table 2 Command output

Field Description
System ID System ID of the neighbor.
Base Minimum label value of the SRGB.
Range Number of labels in the SRGB.

Related commands
segment-routing global-block

display mpls static-sr-mpls


Use display mpls static-sr-mpls to display static SRLSP and adjacency segment
information.

2
Syntax
display mpls static-sr-mpls { lsp [ lsp-name ] | adjacency
[ adjacency-path-name ] }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
lsp: Displays static SRLSP information.
lsp-name: Specifies a static SRLSP by its name, a case-sensitive string of 1 to 15 characters. If
you do not specify this argument, the command displays information about all static SRLSPs.
adjacency: Displays static adjacency segment information.
adjacency-path-name: Specifies a static adjacency segment by its name, a case-sensitive
string of 1 to 15 characters. If you do not specify this argument, the command displays information
about all static adjacency segments.
Examples
# Display information about all static SRLSPs.
<Sysname> display mpls static-sr-mpls lsp lsp1
Name : lsp1
Type : LSP
In-Label : -
Out-Label : 60,70,80
Out-Interface : -
Nexthop : -
State : Up

Table 3 Command output

Field Description
Name Name of the static SRLSP or adjacency segment.
Information type:
Type • LSP—Static SRLSP information.
• Adjacency—Adjacency segment information.
In-Label Incoming label.
Out-Label Outgoing label.
Out-Interface Output interface.
Nexthop Next hop address.
Status of the static SRLSP or adjacency segment:
State • Down—The static SRLSP or adjacency segment is not available.
• Up—The static SRLSP or adjacency segment is available.

Related commands
static-sr-mpls adjacency

3
static-sr-mpls lsp

display mpls static-sr-mpls prefix


Use display mpls static-sr-mpls prefix to display static prefix segment information.
Syntax
display mpls static-sr-mpls prefix [ path lsp-name | destination
ip-address [ mask | mask-length ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
path lsp-name: Displays static prefix segment information for the specified static SRLSP. The
lsp-name argument specifies a static SRLSP by its name, a case-sensitive string of 1 to 15
characters.
destination ip-address: Displays static prefix segment information for the specified
destination address. The ip-address argument specifies a destination address.
mask: Specifies the destination address mask.
mask-length: Specifies the mask length, in the range of 0 to 32.
Usage guidelines
If you do not specify any parameters, this command displays information about all static prefix
segments.
Examples
# Display information about all static prefix segments.
<Sysname> display mpls static-sr-mpls prefix
Prefix Name : prefixname
Destination : 2.2.2.2/32
In-Label : 1024
Active : Yes(1)
Out-Interface : GE3/1/1
Nexthop : 10.0.0.2
Out-Label : 16000
Status : up
Out-Interface : GE3/1/2
Nexthop : 11.0.0.2
Out-Label : 16000
Status : down(No Route)
Out-Interface : GE3/1/3
Nexthop : 12.0.0.2
Out-Label : 16000
Status : down(No Mpls)

4
Table 4 Command output

Field Description
Prefix Name Name of the prefix segment.
Destination Destination IP address of the prefix segment.
In-Label Incoming label of the prefix segment.
Status of the prefix segment:
• Yes(count)—The prefix segment is active. The value of count represents the number
Active
of egresses in up status.
• No—The prefix segment is inactive.
Out-Interface Outgoing interface of the prefix segment.
Nexthop Next hop of the prefix segment.
Out-Label Outgoing label of the prefix segment.
Status of the egress:
• down—The egress is inactive. The cause is displayed in brackets, which can be No
Route or No Mpls. No Route means that the device has no route to reach the
destination IP address over the outgoing interface. No Mpls means that MPLS is
Status disabled on the output interface.
• up—The egress is active.
• duplicate—An egress conflict has occurred because the output interface is already
used by another prefix segment.

Related commands
static-sr-mpls prefix

display ospf segment-routing global-block


Use display ospf segment-routing global-block to display OSPF SRGB information.
Syntax
display ospf [ process-id ] [ area area-id ] segment-routing global-block
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process ID in the range of 1 to 65535. If you do not specify this
argument, the command displays the SRGBs of all OSPF processes.
area area-id: Specifies an area by its ID. The area ID can be a value in dotted decimal notation
or a decimal value in the range of 0 to 4294967295. If you specify a decimal value, the system
automatically transforms it to a value in dotted decimal notation. If you do not specify this option, the
command displays the SRGBs of all areas.
Examples
# Display the SRGBs of all OSPF processes.
<Sysname> display ospf segment-routing global-block

5
OSPF Process 1 with Router ID 1.1.1.1
Segment Routing Global Block

Area: 0.0.0.0
Router ID Min SID Max SID Total
1.1.1.1 16000 24000 8001
2.2.2.2 18000 18999 1000
3.3.3.3 16000 24000 8001
4.4.4.4 17000 17999 1000
5.5.5.5 16000 16999 1000

Table 5 Command output

Field Description
Router ID Router ID of the device or the neighbor.
Min SID Minimum label value of the SRGB.
Max SID Maximum label value of the SRGB.
Total Number of labels in the SRGB.

Related commands
segment-routing global-block

isis prefix-sid
Use isis prefix-sid to configure an IS-IS prefix SID.
Use undo isis prefix-sid to restore the default.
Syntax
isis prefix-sid { absolute absolute-value | index index-value }
[ n-flag-clear | { explicit-null | no-php } ] *
undo isis prefix-sid
Default
No IS-IS prefix SID is configured.
Views
Loopback interface view
Predefined user roles
network-admin
Parameters
absolute absolute-value: Specifies an absolute value as the prefix SID. The
absolute-value argument is in the range of 0 to 1048575.
index index-value: Specifies an index value. The index-value argument is in the range of 0
to 1048575.
n-flag-clear: Sets the Node-SID flag bit of the prefix SID to 0 to use the prefix SID for a group of
SR nodes. If you do not specify this keyword, the flag bit is 1 and the prefix SID is used for a single
SR node.

6
explicit-null: Sets the Explicit-null flag bit of the prefix SID to 1. This setting requires that the
upstream neighbor uses an explicit null label to replace the prefix SID. If you do not specify this
keyword, the flag bit is 0 and the upstream neighbor continues to forward the packet based on the
prefix SID. For more information about the explicit null label, see MPLS basics configuration in MPLS
Configuration Guide. This keyword is not supported if the loopback interface belongs to a VPN
instance.
no-php: Sets the P-flag bit of the prefix SID to 1 so the penultimate hop does not pop out the SID. If
you do not specify this keyword, the P-flag bit is 0 and the penultimate hop pops out the SID.
Usage guidelines
An absolute value used as the prefix SID must be in the SRGB of the node.
If you specify an index value, the sum of the index value and the SRGB base value is used as the
prefix SID. The prefix SID must be in the SRGB of the node.
To use a prefix SID for a group of SR nodes in anycast scenarios, specify the n-flag-clear
keyword to set the Node-SID flag bit of the prefix SID to 0.
To configure an IS-IS prefix SID, you must enable an IS-IS process on the loopback interface.
Examples
# Configure index value 20 as the IS-IS prefix SID on loopback interface 1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname-LoopBack1] isis enable 1
[Sysname-LoopBack1] isis prefix-sid index 20

mpls te static-sr-mpls
Use mpls te static-sr-mpls to bind a static SRLSP to an MPLS TE tunnel interface.
Use undo mpls te static-sr-mpls to unbind a static SRLSP from an MPLS TE tunnel
interface.
Syntax
mpls te static-sr-mpls lsp-name [ backup ]
undo mpls te static-sr-mpls lsp-name
Default
An MPLS TE tunnel interface does not use any static SRLSPs.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
lsp-name: Specifies a static SRLSP by its name, a case-sensitive string of 1 to 15 characters. The
specified static SRLSP must be already created by using the static-sr-mpls lsp command.
backup: Specifies the backup static SRLSP. If you do not specify this keyword, this command
specifies the main static SRLSP.
Usage guidelines
Execute this command only on the ingress node of a static SRLSP.

7
This command takes effect only if you have configured the mpls te signaling static
command in tunnel interface view.
You can specify the backup keyword to bind a backup static SRLSP only if both the main and
backup SRLSPs are established by using the adjacency segment method.
If you execute both the mpls te static-sr-mpls and mpls te static-cr-lsp commands
on the device, only the mpls te static-cr-lsp command takes effect. For the mpls te
static-sr-mpls command to take effect, execute the undo mpls te static-cr-lsp
command.
Examples
# Bind static SRLSP static-sr-3 to MPLS TE tunnel interface 0.
<Sysname> system-view
[Sysname] interface tunnel 0 mode mpls-te
[Sysname-Tunnel0] mpls te static-sr-mpls static-sr-3

Related commands
display mpls te tunnel-interface (MPLS Command Reference)
mpls te signaling (MPLS Command Reference)
mpls te static-cr-lsp (MPLS Command Reference)
static-sr-mpls lsp

ospf prefix-sid
Use ospf prefix-sid to configure an OSPF prefix SID.
Use undo ospf prefix-sid to restore the default.
Syntax
ospf process-id prefix-sid { absolute absolute-value | index index-value }
[ n-flag-clear ] [ explicit-null ]
undo ospf process-id prefix-sid
Default
No OSPF prefix SID is configured.
Views
Loopback interface view
Predefined user roles
network-admin
Parameters
process-id: Specifies an OSPF process ID in the range of 1 to 65535.
absolute absolute-value: Specifies an absolute value as the prefix SID. The
absolute-value argument is in the range of 0 to 1048575.
index index-value: Specifies an index value. The index-value argument is in the range of 0
to 1048575.
n-flag-clear: Sets the Node-SID flag bit of the prefix SID to 0 to use the prefix SID for a group of
SR nodes. If you do not specify this keyword, the flag bit is 1 and the prefix SID is used for a single
SR node.

8
explicit-null: Sets the Explicit-null flag bit of the prefix SID to 1. This setting requires that the
upstream neighbor uses an explicit null label to replace the prefix SID. If you do not specify this
keyword, the flag bit is 0 and the upstream neighbor continues to forward the packet based on the
prefix SID. For more information about the explicit null label, see MPLS basics configuration in MPLS
Configuration Guide. This keyword is not supported if the loopback interface belongs to a VPN
instance.
Usage guidelines
An absolute value used as the prefix SID must be in the SRGB of the node.
If you specify an index value, the sum of the index value and the SRGB base value is used as the
prefix SID. The prefix SID must be in the SRGB of the node.
To use a prefix SID for a group of SR nodes in anycast scenarios, specify the n-flag-clear
keyword to set the Node-SID flag bit of the prefix SID to 0.
The configured OSPF prefix SID takes effect only if the OSPF process enabled on the loopback
interface is the same as the OSPF process associated with the prefix SID.
Examples
# Configure index value 20 as the OSPF prefix SID on loopback interface 1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname-LoopBack1] ospf 1 prefix-sid index 20

segment-routing adjacency enable


Use segment-routing adjacency enable to enable MPLS SR adjacency label allocation.
Use undo segment-routing adjacency enable to disable MPLS SR adjacency label
allocation.
Syntax
segment-routing adjacency enable
undo segment-routing adjacency enable
Default
MPLS SR adjacency label allocation is disabled.
Views
IS-IS IPv4 unicast address family view
OSPF view
Predefined user roles
network-admin
Usage guidelines
For this command to take effect, you must enable MPLS SR.
Examples
# Enable MPLS SR adjacency label allocation for IS-IS process 1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] address-family ipv4
[Sysname-isis-1-ipv4] segment-routing adjacency enable

# Enable MPLS SR adjacency label allocation for OSPF process 1.

9
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] segment-routing adjacency enable

Related commands
segment-routing mpls

segment-routing global-block
Use segment-routing global-block to configure the MPLS SRGB.
Use undo segment-routing global-block to restore the default.
Syntax
segment-routing global-block minimum-value maximum-value
undo segment-routing global-block
Default
The minimum label value is 16000. The maximum label value is 24000.
Views
IS-IS view
OSPF view
Predefined user roles
network-admin
Parameters
minimum-value: Specifies the minimum label value, in the range of 16000 to 23999.
maximum-value: Specifies the maximum label value, in the range of 16001 to 24000.
Usage guidelines
To configure the SRGB successfully, make sure the SRGB contains the configured prefix SID.
Examples
# Configure the MPLS SRGB to be from 17000 to 22000 for IS-IS process 1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] segment-routing global-block 17000 22000

# Configure the MPLS SRGB to be from 17000 to 22000 for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] segment-routing global-block 17000 22000

segment-routing mpls
Use segment-routing mpls to enable MPLS SR.
Use undo segment-routing mpls to disable MPLS SR.
Syntax
segment-routing mpls

10
undo segment-routing mpls
Default
MPLS SR is disabled.
Views
IS-IS IPv4 unicast address family view
OSPF view
Predefined user roles
network-admin
Usage guidelines
For MPLS SR to take effect, perform the following tasks before configuring the IGP to support MPLS
SR:
• If the IGP is IS-IS, set the cost style to wide, compatible, or wide-compatible. For more
information about the cost style, see IS-IS configuration in Layer 3—IP Routing Configuration
Guide.
• If the IGP is OSPF, enable opaque LSA reception and advertisement capability. For more
information about the capability, see OSPF configuration in Layer 3—IP Routing Configuration
Guide.
Examples
# Enable MPLS SR in IS-IS IPv4 unicast address family view of IS-IS process 1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] cost-style wide
[Sysname-isis-1] address-family ipv4
[Sysname-isis-1-ipv4] segment-routing mpls

# Enable MPLS SR for OSPF process 1.


<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] segment-routing mpls

Related commands
cost-style (Layer 3—IP Routing Command Reference)
opaque-capability enable (Layer 3—IP Routing Command Reference)

segment-routing sr-prefer
Use segment-routing sr-prefer to configure the device to prefer SRLSPs in traffic
forwarding.
Use undo segment-routing sr-prefer to restore the default.
Syntax
segment-routing sr-prefer [ prefix-list prefix-list-name ]
undo segment-routing sr-prefer
Default
The device prefers LDP LSPs in traffic forwarding.

11
Views
IS-IS IPv4 unicast address family view
OSPF view
Predefined user roles
network-admin
Parameters
prefix-list prefix-list-name: Specifies an IP address prefix list by its name, a
case-sensitive string of 1 to 63 characters. The device preferentially uses SRLSPs to forward traffic
destined for addresses on the prefix list, and preferentially uses LDP LSPs to forward traffic destined
for other addresses. If you do not specify an IP address prefix list, the device preferentially uses
SRLSPs to forward all traffic.
Usage guidelines
This command determines whether the device prefers SRLSPs or LDP LSPs when both SRLSPs
and LDP LSPs are available for traffic forwarding.
This command takes effect only when MPLS SR is enabled and the SRLSPs use prefix SIDs.
Examples
# Configure the device to preferentially use SRLSPs established by OSPF to forward all traffic.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] segment-routing sr-prefer

# Configure the device to preferentially use SRLSPs established by OSPF to forward traffic that is
identified by prefix list 8.
<Sysname> system-view
[Sysname] ip prefix-list 8 permit 4.4.4.4 32
[Sysname] ospf 1
[Sysname-ospf-1] segment-routing sr-prefer prefix-list 8

Related commands
ip prefix-list (Layer 3—IP Routing Command Reference)
segment-routing mpls

static-sr-mpls adjacency
Use static-sr-mpls adjacency to configure an adjacency segment for static MPLS SR.
Use undo static-sr-mpls adjacency to delete an adjacency segment.
Syntax
static-sr-mpls adjacency adjacency-path-name in-label label-value
{ nexthop ip-address | outgoing-interface interface-type
interface-number }
undo static-sr-mpls adjacency adjacency-path-name
Default
No adjacency segments exist.
Views
System view

12
Predefined user roles
network-admin
Parameters
adjacency-path-name: Specifies the adjacency segment name, a case-sensitive string of 1 to
15 characters.
in-label label-value: Specifies the incoming label, in the range of 16 to 1009152.
nexthop ip-address: Specifies the next hop address.
outgoing-interface interface-type interface-number: Specifies an output
interface by its type and number. The output interface must be a P2P interface.
Usage guidelines
Execute this command on all nodes of a static SRLSP.
If you specify the next hop address, make sure the following requirements are met:
• The device has a route to reach the next hop address.
• MPLS is enabled on the output interface of the route.
If you specify an output interface, make sure the following requirements are met:
• The interface is up.
• The interface can receive direct routes.
• MPLS is enabled on the interface.
The incoming label specified by this command must be different than existing static LSPs, static PWs,
and static CRLSPs. If not, the configured adjacency segment is unavailable. The adjacency segment
cannot become available even if you change the incoming label of the static LSP, static PW, or static
CRLSP. To resolve this problem, you must delete the existing adjacency segment and configure a
new one with a different incoming label.
Examples
# Configure an adjacency segment named adj1. Set the incoming label to 100 and the next hop
address to 12.2.1.2.
<Sysname> system-view
[Sysname] static-sr-mpls adjacency adj1 in-label 100 nexthop 12.2.1.2

Related commands
display static-sr-mpls
static-sr-mpls lsp

static-sr-mpls lsp
Use static-sr-mpls lsp to configure a static SRLSP.
Use undo static-sr-mpls lsp to delete a static SRLSP.
Syntax
static-sr-mpls lsp lsp-name out-label out-label-value&<1-14>
undo static-sr-mpls lsp lsp-name
Default
No static SRLSPs exist.

13
Views
System view
Predefined user roles
network-admin
Parameters
lsp-name: Specifies the static SRLSP name, a case-sensitive string of 1 to 15 characters.
out-label out-label-value&<1-14>: Specifies a space-separated list of up to 14 outgoing
labels, corresponding to the labels from top to bottom in the label stack. The value range for the
out-label-value argument is 0, 3, and 16 to 1048575.
Usage guidelines
Execute this command only on the ingress node of a static SRLSP.
The outgoing labels represent an ordered list of labels allocated for the adjacencies or nodes that a
static SRLSP traverses. The top label is the label that the ingress node allocates for the adjacency or
destination prefix.
Examples
# Configure a static SRLSP named lsp1. Specify outgoing labels 100 and 200 for the SRLSP.
<Sysname> system-view
[Sysname] static-sr-mpls lsp lsp1 out-label 100 200

Related commands
static-sr-mpls adjacency

static-sr-mpls prefix
Use static-sr-mpls prefix to configure a prefix segment for static MPLS SR.
Use undo static-sr-mpls prefix to delete a prefix segment.
Syntax
static-sr-mpls prefix prefix-path-name destination ip-address { mask |
mask-length } in-label in-label-value [ { nexthop ip-address |
outgoing-interface interface-type interface-number } out-label
out-label-value ]
undo static-sr-mpls prefix prefix-path-name [ destination ip-address
{ mask | mask-length } in-label in-label-value [ nexthop ip-address |
output-interface interface-type interface-number ] ]
Default
No prefix segments exist.
Views
System view
Predefined user roles
network-admin
Parameters
prefix-path-name: Specifies the prefix segment name, a case-sensitive string of 1 to 15
characters.
destination ip-address: Specifies the destination IP address.

14
mask: Specifies the mask.
mask-length: Specifies the mask length, in the range of 0 to 32.
in-label label-value: Specifies the incoming label in the range of 16000 to 24000.
nexthop ip-address: Specifies the next hop address.
outgoing-interface interface-type interface-number: Specifies an output
interface by its type and number. The output interface must be a P2P interface.
out-label out-label-value: Specifies the outgoing label, in the range of 0, 3, and 16 to
1048575.
Usage guidelines
Execute this command on all nodes of a static SRLSP.
A prefix segment must use the next hop or output interface of the optimal route to the destination
address of the prefix segment. You can configure multiple prefix segments to the destination address
for load sharing if the optimal route has more than one next hops or output interfaces. To avoid
configuration failure, make sure all prefix segments use the same prefix segment name, and
incoming label.
If you specify only the prefix-path-name argument, the undo static-sr-mpls prefix
command deletes all prefix segments with the specified name. If you specify all parameters, only the
prefix segment that matches the specified name, destination IP address, and next hop or output
interface is deleted.
Examples
# Configure a prefix segment named prefix1. Set the destination IP address, incoming label,
outgoing label, and next hop to 2.2.2.2, 16000, 16001, and 10.0.0.2, respectively.
<Sysname> system-view
[Sysname] static-sr-mpls prefix prefix1 destination 2.2.2.2 32 in-label 16000 nexthop
10.0.0.2 out-label 16001

Related commands
display mpls static-sr-mpls prefix

15