opcode compress end

Function

The opcode compress end command configures an opcode for static compressed SRv6 End SIDs.

The undo opcode compress end command deletes the opcode configured for static compressed SRv6 End SIDs.

By default, no static SRv6 End SID operation code is configured.

Format

opcode compress func-opcode end { no-flavor | psp | psp-usp-usd | psp-usp-usd-coc }

undo opcode compress func-opcode end [ no-flavor | psp | psp-usp-usd | psp-usp-usd-coc ]

Parameters

Parameter Description Value
func-opcode

Specifies the operation code of an static SRv6 End SID.

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.

-

psp-usp-usd-coc

Specifies the PSP, USP, USD, and COC flags. The PSP flag indicates that the penultimate segment of an SRH is popped. The USP flag indicates that the last segment of an SRH is popped. The USD flag indicates that the last segment of an SRH is decapsulated, that is, the IPv6 header and all extension headers are popped. The COC flag indicates that the header is compressed.

COC is a new behavior related to compressed SIDs. It is installed in the local SID table and is used to identify whether the current C-SID is the last C-SID of the current block (0 indicates the last C-SID and 1 indicates the non-last C-SID).

-

compress

Specifies the compression function.

-

Views

Segment routing IPv6 locator view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
segr write

Usage Guidelines

Usage Scenario

An SRv6 SID is a 128-bit IPv6 address. The SRv6 SID format is Locator:Function:Args. The Function field is also called Opcode. Configuring different Opcodes is equivalent to defining different functions. Opcodes can be dynamically allocated using an IGP or statically configured using the opcode command.

The compressed static Opcode must be configured in the range of the compressed static segment to prevent the conflict with the compressed Opcode dynamically allocated by the IGP protocol. The non-compressed static segment Opcode must be configured in the range of the non-compressed static segment to prevent conflicts with the non-compressed Opcode dynamically allocated by the IGP. The length range of the static opcode to be compressed is determined by the compress-static compress-length parameter in the locator command. The length range of an uncompressed static opcode is determined by the static static-length parameter in the locator command.

After various types of opcodes are statically configured using the opcode command, the locator, compressed opcode, and Args form a unique SRv6 SID, and the locator, non-compressed opcode, and Args form a unique SRv6 SID. After an SRv6 SID is generated, it is added to the local SID table and can be advertised using a routing protocol. During actual forwarding, the locator part in an SRv6 SID is used to help other nodes on the network perform route addressing, find the node that generates the SRv6 SID, and forward the SRv6 packet to this node. The opcode part is used to instruct the node that generates the SRv6 SID to perform corresponding function operations.

End is the most basic SRv6 instruction. The SID bound to the End instruction is called End SID, which indicates a node. The End SID may instruct a network node to forward a packet to a node that advertises the SID. When the packet arrives at the node, the node executes an End instruction to process the packet. The End instruction reduces the SL value by 1, obtains the next SID from the SRH based on the SL value, updates the SID to the destination address field in the IPv6 packet header, and then searches the forwarding table.

Precautions

To ensure proper forwarding, the configured static SIDs cannot conflict with the IPv6 addresses configured on interfaces.

Example

# Configure the compressed static SRv6 End SID opcode.
<HUAWEI> system-view
[~HUAWEI] segment-routing ipv6
[*HUAWEI-segment-routing-ipv6] locator test1 ipv6-prefix 2001:DB8:3:: 64 compress block 48 compress-static 10 static 20
[*HUAWEI-segment-routing-ipv6-locator] opcode compress ::100 end no-flavor
[*HUAWEI-segment-routing-ipv6-locator] opcode compress ::101 end psp
[*HUAWEI-segment-routing-ipv6-locator] opcode compress ::102 end psp-usp-usd
[*HUAWEI-segment-routing-ipv6-locator] opcode compress ::103 end psp-usp-usd-coc
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >