ping [ip] source [intf] repeat [n]
The extended ping command allows you to specify the source interface and repeat count to test connectivity from a specific interface with a custom number of echo requests.
ping [ip] source [intf] repeat [n]When to Use This Command
- Verify connectivity from a specific loopback interface to a remote host for troubleshooting routing issues.
- Test link reliability by sending a large number of pings (e.g., 100) to check for packet loss.
- Confirm that a particular interface (e.g., GigabitEthernet0/1) can reach a destination when multiple paths exist.
- Perform stress testing on a network link by sending repeated pings with a short interval.
Command Examples
Extended ping from Loopback0 to 10.0.0.1 with 10 repeats
ping 10.0.0.1 source loopback 0 repeat 10Type escape sequence to abort. Sending 10, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds: Packet sent with a source address of 192.168.1.1 !!!!!!!!!! Success rate is 100 percent (10/10), round-trip min/avg/max = 1/2/4 ms
The command sends 10 ICMP echo requests from source IP 192.168.1.1 (Loopback0) to 10.0.0.1. Each '!' indicates a successful reply. The success rate is 100% with RTT min 1ms, avg 2ms, max 4ms.
Extended ping from GigabitEthernet0/1 to 192.168.2.1 with 5 repeats
ping 192.168.2.1 source gigabitethernet 0/1 repeat 5Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: Packet sent with a source address of 172.16.1.1 .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 1/2/3 ms
The first packet timed out ('.'), but the remaining four succeeded. The success rate is 80% (4/5). RTT values are low, indicating good performance for successful packets.
Understanding the Output
The output begins with 'Type escape sequence to abort.' indicating you can press Ctrl+^ to stop. Then it shows the number of packets, size, destination, and timeout. 'Packet sent with a source address of ...' confirms the source IP used. Each character represents a reply: '!' success, '.' timeout, 'U' destination unreachable, 'N' network unreachable, 'P' protocol unreachable, 'Q' source quench, 'M' could not fragment, '?' unknown. The summary line shows success rate (percentage and fraction) and round-trip time statistics (minimum, average, maximum in milliseconds). A 100% success rate with low RTT indicates good connectivity; packet loss or high RTT suggests network issues.
CCNA Exam Tips
Remember that the 'source' keyword requires an interface name, not an IP address; the router uses the interface's primary IP.
The 'repeat' option is essential for testing link reliability; CCNA may ask about interpreting success rates.
Know that extended ping can be used to test policy-based routing by sourcing from a specific interface.
In the exam, be prepared to identify the source IP used based on the interface specified.
Common Mistakes
Using an IP address instead of an interface name after 'source' (e.g., 'source 192.168.1.1' is invalid).
Forgetting that the source interface must have an IP address configured; otherwise the command fails.
Assuming the repeat count includes the first packet; it does—repeat 10 sends 10 packets total.
Related Commands
ping [ip]
The ping command sends ICMP echo requests to a destination IP address to test network connectivity and measure round-trip time.
show ip interface brief
Displays a summary of all IP interfaces on the device, including their IP address, status, and protocol state, used for quick verification of interface configuration and connectivity.
traceroute [ip]
Traces the route packets take from the source device to a destination IP address, showing each hop along the path, used to diagnose network path issues and latency.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions