Ping and Traceroute Operational Commands
IP Ping
The IP ping utility is used to test the reachability of a destination IP address and to measure the time taken for packets to travel between the source and the destination.
IP Ping in the Default Instance
The ping command allows you to ping to a destination to check if a device is reachable. When issued in the default instance, the command validates reachability using the default routing table.
Syntax
destination-ip |
Specify the IPv4 destination IP address to ping. |
|---|---|
|
Specify the source interface used to send the ping packets. |
|
Number of ping packets to send. (Default: 5) |
|
Sets the |
|
Time interval between packets in seconds. (Default: 1 second). |
|
Subsequent address family identifier. Supported options include 'unicast', 'multicast', and 'labeled-unicast'. Default is 'unicast'. |
|
Size of the ping packet in bytes. (Default: 60 bytes). |
|
IPv4 address to be used as the source of the ping packets. |
|
Time-to-live value applied to outgoing packets. Default value is 255. |
|
Type of Service field used for marking packets. Applicable to IP header only. Default value 0. |
|
Enables to force ICMP echo requests through the specified exit interface if route is resolved via that interface. |
Example:
The following ping command sends ICMP echo requests (in the default instance) to a IPv4 destination address to verify reachability and measures round-trip latency.
The output shows a response received from the destination that includes the icmp_seq (sequence number of the request), ttl (time-to-live value of the returned packet) and time (round-trip latency in milliseconds). The statistics summary displays the number of packets sent/received and the packet-loss percentage, indicating overall connectivity quality.
admin@rtbrick: op> ping 198.51.100.111 68 bytes from 198.51.100.111: icmp_seq=1 ttl=64 time=11.8707 ms 68 bytes from 198.51.100.111: icmp_seq=2 ttl=64 time=1.9824 ms 68 bytes from 198.51.100.111: icmp_seq=3 ttl=64 time=5.0726 ms 68 bytes from 198.51.100.111: icmp_seq=4 ttl=64 time=5.6529 ms 68 bytes from 198.51.100.111: icmp_seq=5 ttl=64 time=10.6588 ms Statistics: 5 sent, 5 received, 0% packet loss
To access the RESTCONF API that corresponds to this CLI, click
here.
IP Ping in a Specific Instance and AFI/SAFI
This command enables you to send ping requests to a destination within a selected routing instance or VRF, rather than the default global instance. You can also choose the required address family (IPv4 or IPv6). You can verify connectivity to check reachability issues in multi-VRF deployments.
Syntax
destination-ip |
IPv4 destination address to ping. |
|---|---|
|
Name of the instance in which the ping must be executed. |
|
Address Family Identifier. |
|
Subsequent address family identifier. Supported options include 'unicast', 'multicast', and 'labeled-unicast'. Default is 'unicast' |
|
Source interface used to send the ping packets. |
|
Number of ping packets to transmit. (Default: 5). |
|
Set the |
|
Time interval between packets in seconds. (Default: 1 second). |
|
Size of the ping packet in bytes. (Default: 60 bytes). |
|
IPv4 address to be used as the source of the ping packets. |
|
Time-to-live value applied to outgoing packets. Default value is 255. |
|
Type of Service field used for marking packets. Applicable to IP header only. Default value is 0. |
| AFI and SAFI are optional attributes. If they are not explicitly specified, the system defaults to AFI 'IPv6' and SAFI 'unicast'. |
Example:
The following example shows how to ping the destination address 198.51.100.80 within the routing instance vrf1. This command specifies the address family as IPv4 and sets the subsequent address family identifier to labeled-unicast. It verifies connectivity when MPLS labels are used for forwarding traffic within the network. The output displays the reply packet size, sequence number (icmp_seq), returned time-to-live (ttl), and round-trip time (time). The output also shows that all 5 packets were received with no packet loss, indicating that the destination is reachable over the labeled IPv4 path.
admin@rtbrick: op> ping 198.51.100.80 instance vrf1 afi ipv4 safi labeled-unicast 68 bytes from 198.51.100.80: icmp_seq=1 ttl=64 time=18.1306 ms 68 bytes from 198.51.100.80: icmp_seq=2 ttl=64 time=32.1058 ms 68 bytes from 198.51.100.80: icmp_seq=3 ttl=64 time=19.8205 ms 68 bytes from 198.51.100.80: icmp_seq=4 ttl=64 time=20.0144 ms 68 bytes from 198.51.100.80: icmp_seq=5 ttl=64 time=32.0085 ms Statistics: 5 sent, 5 received, 0% packet loss
To access the RESTCONF API that corresponds to this CLI, click
here.
IPv6 Ping
The IPv6 ping utility is used to verify the reachability of an IPv6 destination by sending ICMPv6 echo requests. It helps to check IPv6 connectivity and measure basic round-trip delay. It is useful for troubleshooting IPv6 networks.
IPv6 Ping in the Default Instance
The ping command allows you to ping to an IPv6 destination to check an IPv6 destination in the default routing instance. It helps to verify whether a device is reachable over IPv6 and provides basic round-trip time and connectivity information.
Syntax:
destination-ipv6 |
IPv6 destination address. |
|---|---|
|
Source interface to use for sending packets. |
|
Number of ping packets to send (Default: 5). |
|
Sets the 'do-not-fragment' (DF) bit in IP packet header. |
|
Interval time between the successive packets (Default: 1 second). |
|
Size of the ping packet in bytes (Default: 60 bytes). |
|
IPv6 source address to use for the ping. |
|
Time-to-Live value for the packet. Default value is 255. |
|
Type of Service (TOS) value to use in the packet. Applicable to IP header only. Default value 0 |
Example:
The following ping command sends ICMP echo requests (in the default instance) to a IPv6 destination address to verify reachability and measures round-trip latency. The device successfully reached the IPv6 address '2001:db8:0:42::'. It sends 5 ICMPv6 echo requests and received 5 replies with 0 packet loss. The output shows the icmp_seq (sequence number of the request), ttl (time-to-live value of the returned packet) and time (round-trip latency in milliseconds) parameters. The statistics summary displays the number of packets sent/received and the packet-loss percentage.
admin@rtbrick: op> ping 2001:db8:0:42:: 68 bytes from 2001:db8:0:42::: icmp_seq=1 ttl=64 time=.0503 ms 68 bytes from 2001:db8:0:42::: icmp_seq=2 ttl=64 time=.0321 ms 68 bytes from 2001:db8:0:42::: icmp_seq=3 ttl=64 time=.0314 ms 68 bytes from 2001:db8:0:42::: icmp_seq=4 ttl=64 time=.0325 ms 68 bytes from 2001:db8:0:42::: icmp_seq=5 ttl=64 time=.0354 ms Statistics: 5 sent, 5 received, 0% packet loss
IPv6 Ping in a Specific Instance and AFI/SAFI
This functionality allows you to ping an IPv6 destination within a selected routing instance (VRF). You can specify the IPv6 address family to ensure the ping is executed using the correct protocol. It helps to validate IPv6 connectivity for services operating outside the default instance and to troubleshoot reachability in multi-VRF environments.
Syntax
destination-ipv6 |
IPv6 destination address. |
|---|---|
|
Name of the instance on which ping must be executed. |
|
IPv4 Address Family Identifier. |
|
Subsequent address family identifier. Supported options include unicast, multicast, and labeled-unicast. Default is unicast. |
|
Source interface to use for sending packets. |
|
Number of ping packets to send (Default: 5). |
|
Sets the |
|
Interval time between successive packets (Default: 1 second). |
|
Size of the ping packet (Default: 60). |
|
IPv6 source address. |
|
Time-to-live value to be used in the packet. Default value is 255. |
|
Type of Service (ToS) value to use in packet. Applicable to IP header only. Default value 0. |
| AFI and SAFI are optional attributes. If they are not explicitly specified, the system defaults to AFI 'IPv6' and SAFI 'unicast'. |
Example:
In the following example, the command sends ICMP echo requests to the IPv6 destination address 2001:db8:0:42::. It verifies IPv6 connectivity over an MPLS labeled-unicast path within VRF named 'abc', and the output confirms successful, low-latency reachability with zero packet loss.
admin@rtbrick: op> ping 2001:db8:0:42:: instance abc afi ipv6 safi labeled-unicast 68 bytes from 2001:db8:0:42::: icmp_seq=1 ttl=64 time=.0503 ms 68 bytes from 2001:db8:0:42::: icmp_seq=2 ttl=64 time=.0321 ms 68 bytes from 2001:db8:0:42::: icmp_seq=3 ttl=64 time=.0314 ms 68 bytes from 2001:db8:0:42::: icmp_seq=4 ttl=64 time=.0325 ms 68 bytes from 2001:db8:0:42::: icmp_seq=5 ttl=64 time=.0354 ms Statistics: 5 sent, 5 received, 0% packet loss
IP Traceroute
IP Traceroute in the Default Instance
This command traces the path taken by packets to a specified IP destination using the default routing instance.
Syntax:
destination-ip |
IPv4 destination address. |
|---|---|
|
Name of the source interface. |
|
Number of probe packets sent per hop (Default: 3). |
|
Subsequent address family identifier. Supported options include unicast, multicast, and labeled-unicast. Default is unicast. |
|
Time interval between probe packets (Default: 1 second). |
|
Size of each traceroute packet in bytes (Default: 60). |
|
Source IP address . |
|
Maximum number of hops before the TTL expires (Default: 30). |
Example:
This following traceroute command output shows a traceroute to destination 198.51.100.80 using the default settings (maximum 30 hops and 60-byte packets). The trace completes in two hops and displays the intermediate router at 198.51.100.90 followed by the destination, along with the round-trip time for three probe packets at each hop.
admin@rtbrick: op> traceroute 198.51.100.80 traceroute to 198.51.100.80, 30 hops max, 60 byte packets 1 198.51.100.90 39.401 ms 19.919 ms 20.074 ms 2 198.51.100.80 55.544 ms 36.765 ms 45.989 ms
To access the RESTCONF API that corresponds to this CLI, click
here.
IP Traceroute in Specific Instance and AFI/SAFI
This command performs a traceroute to a specified IP destination using the routing table of a specific VRF.
Syntax:
| destination-ip | IPv4 destination address. |
|---|---|
|
Name of the routing instance in which the traceroute is executed. |
|
Specifies the IP address family to use. |
|
Subsequent address family identifier. Supported options include unicast, multicast, and labeled-unicast. Default is unicast. |
|
Name of the source interface used to send traceroute probe packets. |
|
Number of probe packets sent to each hop. (Default: 3). |
|
Time interval between packets in seconds. (Default: 1 second). |
|
Size of the probe packet in bytes. (Default: 60 bytes). |
|
Source IP address for the traceroute probes. |
|
Maximum number of hops before the TTL expires. (Default: 30). |
| AFI and SAFI are optional attributes. If they are not explicitly specified, the system defaults to AFI 'IPv6' and SAFI 'unicast'. |
In the following example, the traceroute command verifies IPv4 MPLS LSP connectivity (AFI IPv4, SAFI labeled-unicast) from the specified source interface/IP. The output shows label-switched forwarding and successful reachability of the destination 198.51.100.80 in the next hop. It indicates correct MPLS label distribution and forwarding along the path.
supervisor@rtbrick.net: cfg> traceroute 198.51.100.80 instance default afi ipv4 safi labeled-unicast source-interface
ifl-0/0/0/1 source-ip 198.51.100.55
traceroute to 198.51.100.80 30 hops max, 60 byte packets
1 198.51.100.12 4.961 ms .421 ms .503 ms
MPLS Label=20071 Exp=0 TTL=1 S=1
2 198.51.100.80 .995 ms 6.456 ms .813 ms
| For the MPLS transport, it displays the ingress labels in each hop. |
IPv6 Traceroute
IPv6 Traceroute in the Default Instance
This command allows you to traceroute the hop-by-hop path to a given IP destination.
Syntax
| destination-ipv6 | IPv6 destination address. |
|---|---|
|
Source interface name. |
|
Number of packets sent per hop (Default: 3) |
|
Interval time between packets, in seconds (Default: 1) |
|
Size of the traceroute packet in bytes (Default: 60) |
|
IPv6 source address. |
|
Maximum number of hops before the TTL expires (Default: 30). |
The following example shows the IPv6 traceroute traces the hop-by-hop path to IPv6 destination (2001:db8:0:75::)> It shows the successful reachability within two hops and reporting round-trip latency for each hop using default traceroute parameters.
admin@rtbrick: op> traceroute 2001:db8:0:75:: traceroute to 2001:db8:0:75:: 30 hops max, 60 byte packets 1 2001:db8:0:90:: 21.247 ms 20.232 ms 20.052 ms 2 2001:db8:0:75:: 50.124 ms 59.822 ms 40.032 ms
IPv6 Traceroute in a Specific Instance and AFI/SAFI
This command allows you to traceroute to a particular IPv6 destination in a specific VRF.
Syntax
| destination-ipv6 | IPv6 destination address. |
|---|---|
|
Instance on which the traceroute command must be executed. |
|
Address Family Identifier (AFI). |
|
Subsequent address family identifier. Supported options include unicast, multicast, and labeled-unicast. Default is unicast. |
|
Name of the source interface. |
|
Number of packets for each hop (Default, 3). |
|
The interval period between the packets (Default, 1 second). |
|
Size of the traceroute packet (Default, 60). |
|
Source IPv6 address. |
|
Maximum number of hops before the TTL expires (Default, 30) |
| The AFI and SAFI attributes are optional. If not specified, the default AFI is 'IPv6' and the default SAFI 'unicast'. |
The following example traceroute verifies IPv6 reachability (to 2001:db8:0:75::) using MPLS labeled-unicast in the default routing instance. The probe is sourced from ifl-0/0/0/1 (2001:db8:0:11::). The first hop is an MPLS hop (with the label 20072 and TTL=1). The destination is reached in the second hop.
supervisor@rtbrick.net: cfg> traceroute 2001:db8:0:75:: instance default afi ipv6 safi labeled-unicast source-interface
ifl-0/0/0/1 source-ip 2001:db8:0:11::
traceroute to 2001:db8:0:75:: 30 hops max, 60 byte packets
1 2001:db8:0:90:: 6.782 ms .306 ms 6.380 ms
MPLS Label=20072 Exp=0 TTL=1 S=1
2 2001:db8:0:75:: .434 ms .657 ms .844 ms
| For MPLS transport paths, the output displays the ingress MPLS label at each hop. |
LSP Ping
The ping mpls command allows you to ping to an MPLS labelled switch path destination to see if a networked device is reachable.
Syntax:
| Attribute | Description |
|---|---|
|
Specifies the type of FEC to help the device identify the exact type. Default 'fec-type' is LDP. |
|
Specify the instance name. |
|
Specify the interval time (in seconds) between successive ping packets to send. |
|
The size of the PAD TLV to be included in the MPLS Echo Request packet. (Default: 60 bytes). |
|
Total number ping attempts the device sends to the destination. Default 3. |
|
Maximum number of hops the packet traverse (Default: 30). |
|
Specify the source IP address for the MPLS Echo Request. |
Example: LSP ping for a prefix
In the following example, the MPLS ping verifies LDP-based MPLS connectivity to the FEC 62.154.10.70/32 by sending MPLS echo requests along the label-switched path. All probes are successfully replied. The output shows 0 percent packet loss and stable round-trip times. The RTTs range from 7.61 ms to 47.30 ms confirms that the MPLS LSP to the destination is reachable and operational.
supervisor@rtr:op> ping mpls 62.154.10.70/32 Sending 5 MPLS Echos to ldp FEC 62.154.10.70/32 Success: Response from 217.239.37.58 : Egress for the FEC: seq = 1 rtt = 47.30 ms Success: Response from 217.239.37.58 : Egress for the FEC: seq = 2 rtt = 13.96 ms Success: Response from 217.239.37.58 : Egress for the FEC: seq = 3 rtt = 10.65 ms Success: Response from 217.239.37.58 : Egress for the FEC: seq = 4 rtt = 7.61 ms Success: Response from 217.239.37.58 : Egress for the FEC: seq = 5 rtt = 14.85 ms ---62.154.10.70/32 mpls ping statistics --- 5 sent, 5 received, 0 errors, 0% loss, time 5001.93 ms rtt min/avg/max = 7.61/18.88/47.30 ms
Example: LSP ping for a FEC type
In the following example, the MPLS ping tests MPLS reachability to the FEC 62.154.20.70/32 using ISIS FEC. MPLS echo requests are sent along the IS-IS–signaled label-switched path. Four replies are received from 217.239.37.58. It is identified as the egress LSR for this FEC. While one probe does not receive a response, resulting in 20% packet loss. The measured RTTs range from 11.23 ms to 34.01 ms. It indicates that the MPLS LSP is reachable, though with an intermittent loss observed.
supervisor@rtr:op> ping mpls 62.154.20.70/32 fec-type isis Sending 5 MPLS Echos to isis FEC 62.154.20.70/32 Success: Response from 217.239.37.58: Egress for the FEC: seq = 2 rtt = 27.97 ms Success: Response from 217.239.37.58: Egress for the FEC: seq = 3 rtt = 16.76 ms Success: Response from 217.239.37.58: Egress for the FEC: seq = 4 rtt = 34.01 ms Success: Response from 217.239.37.58: Egress for the FEC: seq = 5 rtt = 11.23 ms ---62.154.10.70/32 mpls ping statistics --- 5 sent, 4 received, 0 errors, 20% packet loss, time 5001.93 ms rtt min/avg/max = 11.23/19.88/34.01 ms
To access the RESTCONF API that corresponds to this CLI, click
here.
MPLS LSP Traceroute
The traceroute mpls command is used to trace the path of an MPLS Label Switched Path (LSP) hop by hop.
Syntax:
| Attribute | Description |
|---|---|
|
Without any option, the command traceroute for the specified prefix. |
|
Specifies the type of FEC to help the device identify the exact type. Default 'fec-type' is LDP. |
|
Specify the instance name. Instance in which the prefix needs to be looked up (Default: 'default') |
|
Maximum number of hops (Default: 30). |
|
The size of the PAD TLV to be included in the MPLS Echo Request packet. (Default: 60 bytes). |
|
Specify the wait time (in seconds) to receive the response. (1-60). |
|
Number of packets to be repeated with same TTL. Default 3. |
|
Source IP address. |
Example: LSP traceroute for a FEC type
The following example shows the MPLS traceroute traces the LDP-signaled label-switched path to the FEC 192.168.0.40/32 by sending MPLS echo requests with increasing TTL values. The output shows three MPLS hops in the LSP. At each transit hop, labels are swapped. It confirms correct LDP label forwarding. The final hop (34.0.0.4) is identified as the egress LSR for the FEC. All probes are successfully received (0% loss), with measured RTTs at each hop.
Sending MPLS echoes to ldp FEC 192.168.0.40/32 for traceroute TTL Address Label Protocol Down Addr Down Label Status RTT 1 12.0.0.2 519942 ldp 23.0.0.3 519938 Label switched at stack-depth 1 45.15ms, 3.20ms, 3.21ms 2 23.0.0.3 519938 ldp 34.0.0.4 3 Label switched at stack-depth 1 3.18ms, 4.25ms, 2.17ms 3 34.0.0.4 3 ldp - - Egress for the FEC 37.18ms, 4.23ms, 3.22ms --- 192.168.0.40/32 mpls traceroute statistics --- 9 sent, 9 received, 0 errors, 0.00% loss, time 17617.15 ms
To access the RESTCONF API that corresponds to this CLI, click
here.
Show Commands
Show OAM MPLS
The command displays LSP ping command details.
Syntax:
| Option | Description |
|---|---|
|
Displays MPLS LSP ping statistics. |
Example: OAM MPLS LSP Ping statistics
The show oam mpls statistics output indicates that no MPLS OAM activity has occurred on the device. No MPLS echo requests or replies have been sent or received. All transmit and receive error counters remain at zero. It indicates that MPLS OAM is currently idle, with no tests.
supervisor@Brtbrick.net: cfg> show oam mpls statistics Sent Statistics: MPLS echo request sent : 0 MPLS echo reply sent : 0 Sent error : 0 Sent error - No table : 0 Sent error - No FEC : 0 Sent error - No Adjacency : 0 Sent error - No MPLS Adjacency : 0 Sent error - No interface : 0 Sent error - Encode failure : 0 Received Statistics: MPLS echo received : 0 MPLS echo request received : 0 MPLS echo reply received : 0 Receive error - L3 decode : 0 Receive error - header decode : 0 Receive error - TLV decode : 0 Receive error - FEV TLV decode : 0 Receive error - unsupported FEV : 0 Receive error - no session : 0
Show OAM IP Statistics
The 'show oam ip statistics' command displays information about sent and received OAM IP packet counters.
Syntax:
The following example show command output displays the sent and received statistics for an echo request message.
supervisor@rtbrick: cfg> show oam ip statistics Sent Statistics: Echo request sent : 0 Sent error : 0 Sent error - no table : 0 Sent error - no route : 2 Sent error - no adjacency : 0 Sent error - no interface : 0 Sent error - encode failure : 0 Received Statistics: Echo reply received : 0 Echo reply - TTL expired : 0 Echo reply - destination unreachable : 0 Receive error - L3 decode : 0 Receive error - no session : 0