- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-MPLS SR commands | 131.58 KB |
display isis segment-routing adjacency
display isis segment-routing global-block
display mpls static-sr-mpls prefix
display ospf segment-routing global-block
segment-routing adjacency enable
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 GE1/0/1 10.123.110.21 24122 L1
0000.0000.0012 GE1/0/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.
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.
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. |
Type |
Information 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. |
State |
Status of the static SRLSP or adjacency segment: · 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
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 : GE1/0/1
Nexthop : 10.0.0.2
Out-Label : 600000
Status : up
Out-Interface : GE1/0/2
Nexthop : 11.0.0.2
Out-Label : 600002
Status : down(No Route)
Out-Interface : GE1/0/3
Nexthop : 12.0.0.2
Out-Label : 600001
Status : down(No Mpls)
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. |
Active |
Status of the prefix segment: · Yes(count)—The prefix segment is active. The value of count represents the number 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 |
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 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
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 ]
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.
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.
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 absolute 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.
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.
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.
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 absolute 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.
<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
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.
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
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 10240.
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-n>
undo static-sr-mpls lsp lsp-name
Default
No static SRLSPs exist.
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-n>: Specifies a space-separated list of up to n 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. The value of n is 15.
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.
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