The opcode end-x command configures a static SRv6 End.X SID opcode.
The undo opcode end-x command deletes the configured static SRv6 End.X SID opcode.
By default, no static SRv6 End.X SID operation code is configured.
opcode func-opcode end-x interface { interface-name | interface-type interface-number } nexthop nexthop-address { no-flavor | psp | psp-usp-usd }
undo opcode func-opcode end-x interface { interface-name | interface-type interface-number } nexthop nexthop-address [ no-flavor | psp | psp-usp-usd ]
Parameter | Description | Value |
---|---|---|
func-opcode |
Specifies a static SRv6 End.X SID operation code. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
interface interface-name |
Specifies the interface name. |
- |
interface-type |
Specifies the interface type. |
- |
interface-number |
Specifies the interface number. |
- |
nexthop nexthop-address |
Specifies the next-hop address. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
no-flavor |
Cancels the flavor attribute. After this parameter is configured, only the USP (last segment of SRH pops up) tag is available by default. |
- |
psp |
Specifies the PSP flag. |
- |
psp-usp-usd |
Specifies the PSP, USP, and USD flags. The PSP flag indicates that the penultimate segment of an SRH is popped up. The USP flag indicates that the last segment of an SRH is popped up. The USD flag indicates that the last segment of an SRH is decapsulated, that is, the IPv6 header and all extension headers are popped up. The USD flag is often used in scenarios where an SRv6 TE Policy does not have a service SID (for example, an IPv4 public network does not carry an End.DT4 SID and is redirected to an SRv6 TE Policy). When packets are forwarded to the device where the last segment of the SID resides, the packets can be properly decapsulated. |
- |
no-psp |
Disables penultimate segment pop of the SRH (PSP). This field is deprecated and is used only for configuration restoration. |
- |
Usage Scenario
An SRv6 SID is a 128-bit IPv6 address expressed in the Locator:Function:Args format. The Function field is also called Opcode, and different operation codes define different functions. Operation codes can be dynamically assigned using an IGP or be configured using the opcode command.
Static operation codes must be configured within the static operation code segment to prevent conflicts with dynamically assigned operation codes. The length of a static operation code segment is configured through the static static-length parameter in the locator command to determine the number of static operation codes that can be configured in a specified locator range. After you run the opcode command to configure various types of operation codes, the Locator, Opcode, and Args fields form a unique SRv6 SID. The SRv6 SID is then added to the local SID table on the device and also advertised externally through a routing protocol. In forwarding, the Locator field in the SRv6 SID instructs other nodes to find the SRv6 SID generation node through addressing and forward SRv6 packets to the node; the Opcode field instructs the SRv6 SID generation node to implement corresponding functions. End.X (short for Layer-3 cross-connect) supports packet forwarding to a Layer 3 adjacency over a specified link. End.X SIDs can be used in scenarios including Topology Independent Loop Free Alternate (TI-LFA) and strict explicit path-based Traffic Engineering (TE). In essence, End.X SIDs are developed based on End SIDs. End.X can be disassembled into End + X, where X indicates cross-connect (meaning that a packet needs to be directly forwarded to a specified Layer 3 adjacency). Therefore, each End.X SID needs to be bound to one or a group of Layer 3 adjacencies. The End.X SID instruction includes the following operations:Precautions
To ensure proper forwarding, the configured static SIDs cannot conflict with the IPv6 addresses configured on interfaces.
<HUAWEI> system-view [~HUAWEI] segment-routing ipv6 [*HUAWEI-segment-routing-ipv6] locator test1 ipv6-prefix 100:: 64 static 32 [*HUAWEI-segment-routing-ipv6-locator] opcode ::200 end-x interface GigabitEthernet0/1/0 nexthop 400::100 no-flavor [*HUAWEI-segment-routing-ipv6-locator] opcode ::201 end-x interface GigabitEthernet0/1/0 nexthop 400::100 psp [*HUAWEI-segment-routing-ipv6-locator] opcode ::202 end-x interface GigabitEthernet0/1/0 nexthop 400::100 psp-usp-usd