- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-SR-MPLS commands | 77.71 KB |
SR-MPLS commands
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 1 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 |
Outgoing 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 : Vlan2
Nexthop : 10.0.0.2
Out-Label : 600000
Status : up
Out-Interface : Vlan3
Nexthop : 11.0.0.2
Out-Label : 600002
Status : down(No Route)
Out-Interface : Vlan4
Nexthop : 12.0.0.2
Out-Label : 600001
Status : down(No Mpls)
Table 2 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 outgoing interface. · up—The egress is active. · duplicate—An egress conflict has occurred because the outgoing interface is already used by another prefix segment. |
Related commands
static-sr-mpls prefix
static-sr-mpls adjacency
Use static-sr-mpls adjacency to configure an adjacency segment for static SR-MPLS.
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 1023.
nexthop ip-address: Specifies the next hop address.
outgoing-interface interface-type interface-number: Specifies an outgoing interface by its type and number. The outgoing 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 outgoing interface of the route.
If you specify an outgoing 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 and static PWs. 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 or static PW. 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-4>
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-4>: Specifies a space-separated list of up to 4 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 SR-MPLS.
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 | outgoing-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 outgoing interface by its type and number. The outgoing 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 outgoing interface of the optimal route (non-BGP 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 outgoing 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 outgoing 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