Tracert can be used to test the path information of an SRv6 network.
After configuring SRv6, you can perform the following configurations in any view of a client.
To test the failure point on an SRv6 network, run the tracert ipv6-sid [ -f first-hop-limit | -m max-hop-limit | -p port-number | -q probes | -w timeout | -s packetsize | -a source-ipv6-address ] * [ overlay ] sid & <1-11> command on the ingress to specify SRv6 SIDs to initiate a tracert test to the egress.
<HUAWEI> tracert ipv6-sid 2001:DB8:10::1 2001:DB8:20::2 2001:DB8:30::3
traceroute ipv6-sid 2001:DB8:10::1 2001:DB8:20::2 2001:DB8:30::3 30 hops max,60 bytes packet
1 2001:DB8:1:2::21(SRH: 2001:DB8:30::3, 2001:DB8:20::2, 2001:DB8:10::1, SL=2) 5 ms 3 ms 2 ms
2 2001:DB8:2:3::31(SRH: 2001:DB8:30::3, 2001:DB8:20::2, 2001:DB8:10::1, SL=1) 5 ms 2 ms 2 ms
3 2001:DB8:30::3(SRH: 2001:DB8:30::3, 2001:DB8:20::2, 2001:DB8:10::1, SL=1) 5 ms 10 ms 0.759 ms
In a network slicing scenario, to test the failure point on an SRv6 network, run the tracert ipv6-sid [ -f first-hop-limit | -m max-hop-limit | -p port-number | -q probes | -w timeout | -s packetsize | -a source-ipv6-address ] * [ overlay ] sid & <1-11> [ network-slice sliceid [ force-match-slice ] ] command on the ingress to specify SRv6 SIDs to initiate a tracert test to the egress.
The force-match-slice keyword is used to forcibly match network slices and takes effect only for segment lists with slice attributes.
<HUAWEI> tracert ipv6-sid 2001:DB8:10::1 2001:DB8:20::2 2001:DB8:30::3 network-slice 100 force-match-slice
traceroute ipv6-sid 2001:DB8:10::1 2001:DB8:20::2 2001:DB8:30::3 30 hops max,60 bytes packet
1 2001:DB8:1:2::21(SRH: 2001:DB8:30::3, 2001:DB8:20::2, 2001:DB8:10::1, SL=2, Slice-ID:100) 5 ms 3 ms 2 ms
2 2001:DB8:2:3::31(SRH: 2001:DB8:30::3, 2001:DB8:20::2, 2001:DB8:10::1, SL=1, Slice-ID:100) 5 ms 2 ms 2 ms
3 2001:DB8:30::3(SRH: 2001:DB8:30::3, 2001:DB8:20::2, 2001:DB8:10::1, SL=1, Slice-ID:100) 5 ms 10 ms 0.759 ms
An End.OP SID (OAM endpoint with punt) is an OAM SID that specifies the punt behavior to be implemented for OAM packets. You can run the remote end-op command or specify an End.OP SID to enable Device A to initiate a tracert operation. Note that if the last SID of an SRv6 TE Policy segment list is an End.X SID or binding SID, the remote end-op command does not take effect. In this case, you need to specify an End.OP SID or the destination parameter when running the tracert srv6-te policy command. An End.OP SID must have been configured before you specify the end-op parameter.
The SRv6 view is displayed.
The locator view is displayed.
Ensure that the locator has been created and advertised through IS-IS. The locator is also used by the created SRv6 TE Policy.
An opcode is configured for an End.OP SID.
The configuration is committed.
<HUAWEI> tracert srv6-te policy policy-name test end-op 2001:DB8:2::1 -a 2001:DB8:1::1 -p 5 -m 20 -tc 0
Trace Route srv6-te policy : 100 data bytes, press CTRL_C to break
srv6-te policy's segment list:
Preference: 200; Path Type: primary; Protocol-Origin: local; Originator: 0, 0.0.0.0; Discriminator: 200; Segment-List ID: 1; Xcindex: 1; end-op: 2001:DB8:2::1
TTL Replier Time Type SRH
0 Ingress <SRH: 2001:DB8:1::F:1, 2001:DB8:2::F:1, 2001:DB8:2::1, SL=2>
1 2001:DB8:A::192:168:103:2 22 ms Transit <SRH: 2001:DB8:1::F:1, 2001:DB8:2::F:1, 2001:DB8:2::1, SL=2>
2 2001:DB8:A::192:168:106:2 10 ms Transit <SRH: 2001:DB8:1::F:1, 2001:DB8:2::F:1, 2001:DB8:2::1, SL=1>
3 2001:DB8:2::1 4 ms Egress
The force-match-slice keyword is used to forcibly match network slices and takes effect only for segment lists with slice attributes.
<HUAWEI> tracert srv6-te policy policy-name policy1 force-match-slice
Trace Route srv6-te policy : 100 data bytes, press CTRL_C to break
srv6-te policy's segment list:
Preference: 100; Path Type: primary; Protocol-Origin: local; Originator: 0, 0.0.0.0; Discriminator: 100; Segment-List ID: 1; Xcindex: 1
TTL Replier Time Type SRH
0 Ingress <SRH: 2001:DB8:120::1:0:0, 2001:DB8:130::1:0:0, 2001:DB8:130::100, SL=2, Slice-ID:100>
1 2001:DB8:10::2 61 ms Transit <SRH: 2001:DB8:120::1:0:0, 2001:DB8:130::1:0:0, 2001:DB8:130::100, SL=2, Slice-ID:100>
2 2001:DB8:130::100 4 ms Egress <SRH: 2001:DB8:120::1:0:0, 2001:DB8:130::1:0:0, 2001:DB8:130::100, SL=1, Slice-ID:100>