Overview
On an SRv6 network, the control plane (responsible for SRv6 tunnel establishment) cannot detect failures to forward data over SRv6, making network maintenance difficult. SRv6 SID ping and tracert can be used to detect such faults and quickly locate faulty nodes. Both SRv6 SID ping and tracert check network connectivity and host reachability, and SRv6 SID tracert can also locate failure points.
SRv6 SID Ping
On the network shown in Figure 1, DeviceA, DeviceB, and DeviceC are SRv6-capable, and an SRv6 path is established between DeviceA and DeviceC.
Figure 1 SRv6 SID ping or tracert
The following describes the ping operation process when an SRv6 SID ping operation is initiated on DeviceA.
- Segment-by-segment measurement is implemented using the SRH O-bit in the SRv6 OAM protocol extension.
- To initiate a ping operation to DeviceC, DeviceA specifies SRv6 SIDs (End SID and End.X SID) for DeviceB and an End SID for DeviceC, in that order. It then constructs and sends an ICMPv6 Echo Request message.
- After receiving the ICMPv6 Echo Request message, DeviceB sends an ICMPv6 Echo Reply message to DeviceA and forwards the ICMPv6 Echo Request message to DeviceC.
- If SRv6 is enabled on DeviceB, DeviceB forwards the ICMPv6 Echo Request message based on the Segment Routing header (SRH).
- If SRv6 is disabled on DeviceB, DeviceB forwards the ICMPv6 Echo Request message based on the route.
- After receiving the ICMPv6 Echo Request message, DeviceC sends an ICMPv6 Echo Reply message to DeviceA.
- For a non-segment-by-segment test, if the End.OP SID in the SRv6 OAM extension is used to implement the test, the End.OP SID must be configured on DeviceC.
- To initiate a ping operation to DeviceC, DeviceA specifies an End.OP SID and an End SID for DeviceC, and constructs and sends an ICMPv6 Echo Request message.
- After receiving the ICMPv6 Echo Request message, DeviceB forwards the message to DeviceC.
- If SRv6 is enabled on DeviceB, DeviceB forwards the ICMPv6 Echo Request message based on the SRH.
- If SRv6 is disabled on DeviceB, DeviceB forwards the ICMPv6 Echo Request message based on the route.
- After receiving the ICMPv6 request packet, DeviceC determines that the SID type is End.OP SID and checks whether the next-layer SID is DeviceC's End SID.
- If the next-layer SID is DeviceC's End SID, the check succeeds. DeviceC then sends an ICMPv6 Echo Reply message to DeviceA. In this case, you can view detailed information about the ping operation on DeviceA.
- If the next-layer SID is not DeviceC's End SID, the check fails. DeviceC then discards the ICMPv6 Echo Request message. In this case, a message is displayed on DeviceA, indicating that the ping operation times out.
If an End SID is used for the test:
- To initiate a ping operation to DeviceC, DeviceA specifies an End SID for DeviceC, and constructs and sends an ICMPv6 Echo Request message.
- After receiving the ICMPv6 Echo Request message, DeviceB forwards the message to DeviceC.
- If SRv6 is enabled on DeviceB, DeviceB forwards the ICMPv6 Echo Request message based on the SRH.
- If SRv6 is disabled on DeviceB, DeviceB forwards the ICMPv6 Echo Request message based on the route.
- After receiving the ICMPv6 Echo Request message, DeviceC determines that the SID type is End SID and checks whether the upper-layer protocol header is ICMPv6.
- If the upper-layer protocol header is ICMPv6, the check succeeds. DeviceA then sends an ICMPv6 Echo Reply message to DeviceA. In this case, you can view detailed information about the ping operation on DeviceA.
- If the upper-layer protocol header is not ICMPv6, the check fails, and the ICMPv6 Echo Request message is discarded. In this case, a message is displayed on DeviceA, indicating that the ping operation times out.
SRv6 SID Tracert
The following describes the tracert operation process when an SRv6 SID tracert operation is initiated on DeviceA, as shown in Figure 1:
- Overlay measurement is implemented using the SRH O-bit in the SRv6 OAM protocol extension.
- To initiate a tracert operation to DeviceC, DeviceA specifies SRv6 SIDs (End SID and End.X SID) for DeviceB and an End SID for DeviceC, in that order. It then constructs a UDP packet and encapsulates an SRH into the packet for forwarding. In this case, the value of the Hop Limit field (equivalent to the TTL field of IPv4) in the IPv6 packet header is set to 64 and decrements by 1 each time the packet passes through a device. When the value of the Hop Limit field is 0, the packet is discarded, and an ICMPv6 Time Exceeded message is then sent to DeviceA.
- After receiving the UDP packet, DeviceB changes the value of the Hop Limit field to 63, sends an ICMPv6 Port Unreachable message to DeviceA, and forwards the UDP packet to DeviceC.
- If SRv6 is enabled on DeviceB, DeviceB forwards the UDP packet based on the SRH.
- If SRv6 is disabled on DeviceB, DeviceB forwards the UDP packet based on the route.
- After receiving the UDP packet, DeviceC changes the value of the Hop Limit field to 62. DeviceC then sends an ICMPv6 Port Unreachable message to DeviceA.
- For a non-overlay test, if the End.OP SID in the SRv6 OAM extension is used to implement the test, an End.OP SID must be configured on DeviceC.
- To initiate a tracert operation to DeviceC, DeviceA specifies an SRv6 SID for DeviceB and an End SID for DeviceC, in that order. It then constructs a UDP packet and encapsulates an SRH into the packet for forwarding. In this case, the value of the Hop Limit field in the IPv6 header is set to 1 and decrements by 1 each time the packet passes through a device. When the value is 0, the packet is discarded, and an ICMPv6 Time Exceeded message is then sent to DeviceA.
- After receiving the UDP packet, DeviceB changes the value of the Hop Limit field to 0 and sends an ICMPv6 Time Exceeded message to DeviceA.
- After receiving the ICMPv6 Time Exceeded message from DeviceB, DeviceA increments the value of the Hop Limit field by 1 (the value now becomes 2) and continues to send the UDP packet.
- After receiving the UDP packet, DeviceB changes the value of the Hop Limit field to 1 and sends the packet to DeviceC.
- If SRv6 is enabled on DeviceB, DeviceB forwards the UDP packet based on the SRH.
- If SRv6 is disabled on DeviceB, DeviceB forwards the UDP packet based on the route.
- After receiving the UDP packet, DeviceC changes the value of the Hop Limit field to 0. DeviceC then determines that the SID type is End.OP SID and checks whether the next-layer SID is DeviceC's End SID.
- If the next-layer SID is DeviceC's End SID, the check succeeds. DeviceC then sends an ICMPv6 Port Unreachable message to DeviceA. In this case, you can view detailed information about the tracert operation on DeviceA.
- If the next-layer SID is not DeviceC's End SID, the check fails. DeviceC then discards the UDP packet. In this case, a message is displayed on DeviceA, indicating that the tracert operation times out.
If an End SID is used for the test:
- To initiate a tracert operation to DeviceC, DeviceA specifies an SRv6 SID for DeviceB and an End SID for DeviceC, in that order. It then constructs a UDP packet and encapsulates an SRH into the packet for forwarding. In this case, the value of the Hop Limit field in the IPv6 header is set to 1 and decrements by 1 each time the packet passes through a device. When the value is 0, the packet is discarded, and an ICMPv6 Time Exceeded message is then sent to DeviceA.
- After receiving the UDP packet, DeviceB changes the value of the Hop Limit field to 0 and sends an ICMPv6 Time Exceeded message to DeviceA.
- After receiving the ICMPv6 Time Exceeded message from DeviceB, DeviceA increments the value of the Hop Limit field by 1 (the value now becomes 2) and continues to send the UDP packet.
- After receiving the UDP packet, DeviceB changes the value of the Hop Limit field to 1 and sends the packet to DeviceC.
- If SRv6 is enabled on DeviceB, DeviceB forwards the UDP packet based on the SRH.
- If SRv6 is disabled on DeviceB, DeviceB forwards the UDP packet based on the route.
- After receiving the UDP packet, DeviceC changes the value of the Hop Limit field to 0. DeviceC then determines that the SID type is End SID and checks whether the upper-layer protocol header is UDP.
- If the upper-layer protocol header is UDP, the check is successful. DeviceC then sends an ICMPv6 Port Unreachable message to DeviceA. In this case, you can view detailed information about the tracert operation on DeviceA.
- If the upper-layer protocol header is not UDP, the check fails and the UDP packet is discarded. In this case, a message is displayed on DeviceA, indicating that the tracert operation times out.