opcode end-dt4

Function

The opcode end-dt4 command configures a static SRv6 End.DT4 SID operation code (Opcode).

The undo opcode end-dt4 command deletes a static SRv6 End.DT4 SID operation code.

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

Format

opcode func-opcode end-dt4 [ vpn-instance vpn-instance-name [ evpn | evpn-l3vpn ] ]

undo opcode func-opcode [ end-dt4 [ vpn-instance vpn-instance-name [ evpn | evpn-l3vpn ] ] ]

Parameters

Parameter Description Value
func-opcode

Specifies a static SRv6 End.DT4 SID operation code.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

vpn-instance vpn-instance-name

Displays information about local SRv6 SID tables based on a specified VPN instance name.

If this parameter is not configured, it means that the End.DT4 SID is configured for the public network instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

evpn

EVPN protocol.

-

evpn-l3vpn

EVPN and L3VPN protocol.

-

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 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 a BGP 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.DT4 (short for decapsulation and specific IPv4 table lookup) supports packet decapsulation and lookup in a specified IPv4 routing table for packet forwarding. End.DT4 SIDs are mainly used in L3VPNv4 scenarios as per-VPN SIDs.

End.DT4 can be disassembled into End + D + T4, where D indicates decapsulation and T4 indicates IPv4 table lookup for forwarding. Therefore, each End.DT4 SID needs to be bound to an IPv4 routing table, which can be either the IPv4 routing table of a VPN instance or a common IPv4 routing table.

The End.DT4 SID instruction includes the following operations:

  1. Removes the outer IPv6 header and SRH.
  2. Searches the IPv4 routing table bound to the End.DT4 SID to forward the inner IPv4 packet.

Precautions

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

When configuring this command:

  • If evpn or evpn-l3vpn parameters are not configured, then End.DT4 SID is only used for BGP L3VPN.
  • If evpn parameters are configured, then End.DT4 SID is only used for EVPN L3VPN.
  • If the evpn-l3vpn parameter is configured, the End.DT4 SID is used for both BGP L3VPN and EVPN L3VPN.

Example

# Configure the static End.DT4 SID operation code.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] quit
[*HUAWEI] segment-routing ipv6
[*HUAWEI-segment-routing-ipv6] locator test1 ipv6-prefix 2001:DB8:100:: 64 static 32
[*HUAWEI-segment-routing-ipv6-locator] opcode ::300 end-dt4 vpn-instance vpn1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >