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.
Static operation codes must be configured within the static operation code segment. 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. 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.DX2 (short for decapsulation and L2 cross-connect) supports packet decapsulation and forwarding through a specified Layer 2 outbound interface. End.DX2 SIDs are mainly used in Layer 2 Virtual Private Network (L2VPN) and EVPN VPWS scenarios.
End.DX2 can be disassembled into End + D + X2, where D indicates decapsulation, and X2 indicates cross-connect (meaning that a packet needs to be directly forwarded through a specified Layer 2 interface). Therefore, each End.DX2 SID needs to be bound to a Layer 2 outbound interface.
The End.DX2 SID instruction includes the following operations:
- Removes the outer IPv6 header and SRH.
- Forwards the inner Ethernet frame to the Layer 2 outbound interface bound to the End.DX2 SID.
Precautions
To ensure proper forwarding, configured static SIDs and IPv6 addresses configured on interfaces cannot conflict with each other.