Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The switches you can use with ping depend on where you run it. Windows commonly uses -n to set the request count and -w for a per-reply timeout; Linux commonly uses -c for the count and -w for an overall deadline. Network appliances have their own commands and options, so check the device’s manual or built-in help.

Common Windows ping switches

Windows’ ping command offers options for request count, packet size, address family, timing, and IP behavior. The documented options below are described in the CompTIA Network+ Student Guide and this Windows ping command reference.

Switch What it does
-t Continues sending Echo Requests until you interrupt the command.
-a Resolves an IP address to a hostname.
-n count Sends the specified number of Echo Requests.
-l size Sets the ICMP data buffer size.
-f Sets the IPv4 Don’t Fragment flag.
-i TTL Sets the IP Time To Live value.
-w timeout Sets the per-reply timeout in milliseconds.
-4 / -6 Forces IPv4 or IPv6 when pinging a hostname.
-r count Records the route for the specified number of hops, where supported.
-s count Records timestamps for the specified number of hops, where supported.
-j host-list Uses loose source routing; support is legacy or limited.
-k host-list Uses strict source routing; support is legacy or limited.

Send a fixed number of pings

Use -n followed by the request count. For example, ping -n 5 example.com sends five Echo Requests on Windows.

Keep pinging until interrupted

Use -t, as in ping -t example.com. Stop it with Ctrl+C to end the run and display the results.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
NETGEAR 8-Port Gigabit Ethernet Easy Smart Managed Network Switch (GS308E)
  • PLUG-AND-PLAY GIGABIT MANAGED SWITCH: 8 x 1Gbps auto-negotiating ports work the moment you plug in — full-gigabit speed over Cat5e/Cat6 cabling.
  • MANAGED, WITHOUT THE COMPLEXITY: Easy Smart web GUI on Windows, Mac or Linux — no app or Windows-only utility, unlike many competing switches.
  • SEGMENT & PRIORITIZE TRAFFIC: Up to 64 VLANs, QoS, IGMP snooping and port mirroring keep voice, video and data fast, secure and organized.
  • BUILT-IN PROTECTION: Auto DoS prevention, loop detection, broadcast storm control and cable test keep your network stable and easy to troubleshoot.
  • RELIABLE 24/7 BACKBONE: Rugged fanless metal housing runs cool and silent at 0 dBA — the managed switch trusted in homes, offices and small business.

Set the reply timeout

Use -w with a value in milliseconds. For example, ping -n 5 -w 1000 example.com requests five replies and allows up to 1,000 milliseconds for each reply. This is a per-reply timeout, not a total run deadline.

Choose IPv4 or IPv6

Use -4 or -6 when you want to force the address family for a hostname, for example ping -4 example.com.

Rank #2
Sale
NETGEAR 5-Port Gigabit Ethernet Easy Smart Managed Network Switch (GS305E)
  • GIGABIT ETHERNET PORTS: Features 5 x 1.0Gbps Ethernet ports for high-speed connectivity. Auto-negotiating ports detect the optimal speed for connected devices and work with existing Cat5e or Cat6 Ethernet cables.
  • EASY SMART MANAGED NETWORK SWITCH: Intuitive software interface offers Easy Smart Managed Essentials capabilities to configure VLANs, prioritize traffic with QoS, monitor ports, and manage network security for small businesses.
  • FLEXIBLE MOUNTING OPTIONS: Compact metal design supports desktop or wall-mount placement for versatile installation.
  • SILENT & ENERGY-EFFICIENT OPERATION: Fanless design ensures silent performance, while IEEE 802.3az Energy Efficient Ethernet reduces power consumption without compromising high-speed network performance.
  • REGIONAL COMPATIBILITY: Made for use in U.S. & CA only

Linux and Unix use different option names

Do not assume Windows switches work the same way on Linux or Unix. Option names and behavior vary by implementation. Common examples documented in the Linux ping(8) manual include:

Example option Common use
-c 5 Sends five requests.
-q Shows summary-only output.
-s 100 Sets the payload size to 100 bytes.
-w 5 Sets a five-second overall deadline.
-V Displays version information.
-f Enables flood mode, which is normally restricted to privileged users.

For example, ping -c 5 example.com is the common Linux equivalent of Windows’ ping -n 5 example.com for sending a fixed number of requests. The similar-looking -w option has different timing semantics in these examples: Windows uses a per-reply timeout, while Linux uses an overall deadline.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
TP-Link 8 Port Gigabit Switch | Easy Smart Managed | Plug & Play | Desktop/Wall-Mount | Sturdy Metal w/ Shielded Ports | Support QoS, Vlan, IGMP and LAG (TL-SG108E)
  • 8 Gigabit Ethernet Ports: Expand your network with 8 high-speed ethernet ports for enhanced connectivity and performance
  • Easy Smart Management: Manage and configure your network effortlessly via a web interface or free software
  • Support VLAN: Segment traffic with up to 32 VLANs simultaneously out of 4K VLAN IDs for better security
  • Network Monitoring: Monitor your network effectively with port mirroring, loop prevention, and cable diagnostics
  • IGMP Snooping: Enhances multicast application performance for improved network efficiency

To check the exact behavior on a Linux or Unix system, run ping --help or consult the local ping(8) manual.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Ping options on a managed network switch

A managed switch may have a ping or link-test utility in its own command-line interface or web interface. Its options are defined by the device, not by Windows or Linux conventions. Aruba’s 2530 guide describes an ICMP ping/link test between the switch and an IEEE 802.3-compliant device: Aruba 2530 Management and Configuration Guide.

Rank #4
TP-Link TL-SG1024DE, 24 Port Gigabit Easy Smart Managed Ehternet Switch
  • 24-Gigabit ports provide instant large file transfers
  • 9K Jumbo frame improves performance of large data transfers
  • Effective network monitoring via Port Mirroring, Loop Prevention and Cable Diagnostics
  • Abundant VLAN features improve network security via traffic segmentation
  • IGMP Snooping optimizes multicast applications

An Atop EHG7708 manual documents IPv4 and IPv6 ping controls for destination, payload size, packet count, TTL, VLAN or source interface, source port, and quiet output: Atop EHG7708 User Manual. These controls are specific to that device; consult the documentation for your switch model before using them.

Quick Recap

SaleBestseller No. 2
NETGEAR 5-Port Gigabit Ethernet Easy Smart Managed Network Switch (GS305E)
NETGEAR 5-Port Gigabit Ethernet Easy Smart Managed Network Switch (GS305E)
REGIONAL COMPATIBILITY: Made for use in U.S. & CA only
$16.99
SaleBestseller No. 3
Bestseller No. 4
TP-Link TL-SG1024DE, 24 Port Gigabit Easy Smart Managed Ehternet Switch
TP-Link TL-SG1024DE, 24 Port Gigabit Easy Smart Managed Ehternet Switch
24-Gigabit ports provide instant large file transfers; 9K Jumbo frame improves performance of large data transfers
$99.99
Bestseller No. 5
TP-Link 16 Port Gigabit Switch | Easy Smart Managed | Plug & Play | Limited Lifetime Protection | Desktop/Wall-Mount | Sturdy Metal w/ Shielded Ports | Support QoS, Vlan, IGMP and LAG (TL-SG116E)
TP-Link 16 Port Gigabit Switch | Easy Smart Managed | Plug & Play | Limited Lifetime Protection | Desktop/Wall-Mount | Sturdy Metal w/ Shielded Ports | Support QoS, Vlan, IGMP and LAG (TL-SG116E)
16 10/100/1000Mbps RJ45 Ports; Plug and play, with No configuration required; Durable metal casing of superior quality and Professional appearance
$59.99
Best Value
TP-Link 16 Port Gigabit Switch | Easy Smart Managed | Plug & Play | Limited Lifetime Protection | Desktop/Wall-Mount | Sturdy Metal w/ Shielded Ports | Support QoS, Vlan, IGMP and LAG (TL-SG116E)
  • 16 10/100/1000Mbps RJ45 Ports
  • Plug and play, with No configuration required
  • Durable metal casing of superior quality and Professional appearance
  • Intelligent management via a web user interface and downloadable Utility
  • Green technology reduces power consumption

Use caution with traffic-generating and legacy options

  • -f flood mode can generate traffic rapidly. Use it only with appropriate privileges and authorization.
  • Windows route-recording and source-routing options (-r, -j, and -k) may be unsupported or constrained on modern networks.
  • Payload-size options and timeout values may have different units or meanings across implementations. Check the relevant command help before adapting a command.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.