Search

How to specify the number of packets sent in ping command

When you run ping command on a Windows machine, the default behavior is to send four ICMP Echo Request packets to destination computer. Ping command then analyze the results by checking ICMP Echo Reply packets from the remote destination computer and display the results in command prompt.

The default nature of sending ICMP Echo Request packets to a remote computer is as shown below.

ping-default-behaviour-number-of-packets.jpg

For some reasons, if you want to specify the exact number of ICMP Echo Request packets sent, you can use -n option of ping command as shown before. In this case I had specified 8 as the number of ICMP Echo Request packets for ping command to send.

ping-command-specify-number-of-packets.jpg

If you want to exit the ping command in between, you may use Control + C key combination.

Related Tutorials
• Internet Control Message Protocol, ICMP, How ICMP Work, ICMP Header, ICMP Message Header
• ICMP message types
• ICMP Echo Request and Echo Reply messages
• ICMP Destination Unreachable messages
• ICMP Source Quench messages
• ICMP Router Advertisement messages
• ICMP Router Solicitation messages
• ICMP Time Exceeded messages
• ICMP Parameter Problem messages
• ICMP Timestamp Request and Timestamp Reply messages
• ICMP Photuris messages
• Ping command tool
• Ping command options
• How to show remote computer name in ping command output
• How to ping continuously
• How to specify the size of data to send in ping command
• What is Ping of death (PoD) network attack
• Traceroute/tracert command tool
• Tracert command options
• Pathping command tool
• Pathping command options
• Difference between ping, traceroute/tracert and pathping