How to Set a Ping Packet Size

By Jamie Wilson

One of the most handy tools for testing connectivity to remote hosts is the ping utility found in most operating systems. Named after sonar pinging, the tool sends Internet Control Message Protocol (ICMP) packets to a remote host and measures the time it takes to get there and back, helping you determine if a host is online and if there are problems reaching that host. The default packet size should be sufficient for most cases, but it's possible to change it to meet your specific testing needs.

Step 1

Open a terminal window so you can work from the command line.

Step 2

Type "ping -s" and press enter. Windows users will need to use "-l" instead of "-s." The default packet size is 56 bytes for Linux and Mac pings, and 32 bytes in Windows. The actual packet size will be slightly larger than what you enter due to the addition of the ICMP header information attached to the ping.

Step 3

Stop the pings by pressing "ctrl+c" ("^c" in Mac OS X).

Tips & Warnings

  • Limit the number of pings sent by using the "-c" option in Linux and Mac, or "-n" in Windows.