Skip to content

How to Use Ping Command Parameters in CMD on Windows 10 / 11

This helpful article will look at ping parameters in different Microsoft operating systems. We will explain what they do and show you how to test your network using real-life examples.

Ping Command Parameters

How to Use Ping Parameters in CMD (Command Prompt)

Ping Parameters primarily uses the ping command and more advanced usage parameters. Ping is the most common program used to troubleshoot network connectivity problems.

With these settings, you can quickly figure out and fix problems with the network. You can quickly test the network connection by pinging your ADSL or Router’s LAN interfaces. Also, you can ping your Router’s WAN interfaces. It sends packets of 32 bytes by default.

You can ping an IP address or an Internet website. On Windows operating systems, open the CMD command prompt. Using it, you can ping the target host continuously. Alternatively, specify the number of times through a host. When you ping an address, the default Ping number is 4.

You can use Ping parameters to address and gain testing experiences.

Understanding Ping Options and Learning to Use It More Effectively

To open the CMD command prompt on the Windows operating system, press the Windows Key + R and open the Run window. Type CMD in the Run window and click the Open button.

After opening the CMD prompt, type the ping /command and press Enter. As you can see in the output below, there are quite a few parameters.

Options include Usage and Options.

Usage: Explain the use of parameters.

Options: Explain the existing parameters.

C:\>ping /?

Usage: ping       
               | ]
                
              target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet (IPv4-only).
    -i TTL         Time To Live.
    -v TOS         Type Of Service (IPv4-only. This setting has been deprecated
                   and has no effect on the type of service field in the IP
                   Header).
    -r count       Record route for count hops (IPv4-only).
    -s count       Timestamp for count hops (IPv4-only).
    -j host-list   Loose source route along host-list (IPv4-only).
    -k host-list   Strict source route along host-list (IPv4-only).
    -w timeout     Timeout in milliseconds to wait for each reply.
    -R             Use routing header to test reverse route also (IPv6-only).
                   Per RFC 5095 the use of this routing header has been
                   deprecated. Some systems may drop echo requests if
                   this header is used.
    -S srcaddr     Source address to use.
    -c compartment Routing compartment identifier.
    -p             Ping a Hyper-V Network Virtualization provider address.
    -4             Force using IPv4.
    -6             Force using IPv6.

C:\>

1) Ping -t Command

It continuously pings a specific IP address or Web site. This process continues until it stops. Press Ctrl + C to prevent/end the continuous ping command.

C:\>ping -t 8.8.8.8

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=36ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=35ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 36ms, Average = 33ms
Control-C
^C
C:\>

2) Ping -a Command

This command displays the computer name of the computer with the IP address you are pinging. Ping the Google DNS server as in the following output and observe that the computer/server name is google-public-dns-a.google.com.

C:\>ping -a 8.8.8.8

Pinging google-public-dns-a.google.com  with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57
Reply from 8.8.8.8: bytes=32 time=35ms TTL=57
Reply from 8.8.8.8: bytes=32 time=34ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 35ms, Average = 33ms

C:\>

3) Ping -n Command

This command assigns a specified number of Ping to an IP address and Web site. Its value is 4 by default. You can ping the number of times you specify by adding -n to the command.

Linux and macOS systems do not have ping counts. If you want to ping the specified number of times to an IP address or Web site on macOS and Linux, you must use the ping -n + number command.

If you’re wondering how to ping on Linux and macOS, watch our Linux Ping and MacOS Ping Usage videos.

I tested the link to the Google DNS server 3 times using the ping -n command.

C:\>ping -n 3 8.8.8.8

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=34ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 33ms, Maximum = 34ms, Average = 33ms

C:\>

4) Ping -l Command

When you usually ping to a destination, the packet size sent is 32 Bytes. You can increase this value with the ping -l command. The ping packet size limit is 65,500 bytes.

C:\>ping -l 2345 8.8.8.8

Pinging 8.8.8.8 with 2345 bytes of data:
Reply from 8.8.8.8: bytes=2345 time=68ms TTL=57
Reply from 8.8.8.8: bytes=2345 time=65ms TTL=57
Reply from 8.8.8.8: bytes=2345 time=62ms TTL=57
Reply from 8.8.8.8: bytes=2345 time=62ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 62ms, Maximum = 68ms, Average = 64ms

C:\>

5) Ping -l flood Command

This command sends the packet size you specify without destroying the destination. In short, the Echo Request packet adds the Don’t Fragment Flag 1 bit to the IP header, which enables sending packets without fragmentation.

You can use this parameter to resolve problems with the Path Maximum Transmission Unit (PMTU). When the echo-request packet tries to pass through the routers, the package does not fragment.

C:\>ping -l 1500 -f 8.8.8.8

Pinging 8.8.8.8 with 1500 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>ping -l 1234 -f 8.8.8.8

Pinging 8.8.8.8 with 1234 bytes of data:
Reply from 8.8.8.8: bytes=1234 time=48ms TTL=57
Reply from 8.8.8.8: bytes=1234 time=53ms TTL=57
Reply from 8.8.8.8: bytes=1234 time=49ms TTL=57
Reply from 8.8.8.8: bytes=1234 time=48ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 48ms, Maximum = 53ms, Average = 49ms

C:\>

6) Ping -i TTL Command

This command adds the TTL value to the packet sent to the destination. The default TTL value is 255 and may vary between devices. When you set the TTL value to lower than the previously received value, the packet will never reach the destination address. It will display the message TTL Expired in Transit.

C:\>ping www.google.com

Pinging www.google.com  with 32 bytes of data:
Reply from 172.217.17.196: bytes=32 time=44ms TTL=54
Reply from 172.217.17.196: bytes=32 time=38ms TTL=54
Reply from 172.217.17.196: bytes=32 time=40ms TTL=54
Reply from 172.217.17.196: bytes=32 time=44ms TTL=54

Ping statistics for 172.217.17.196:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 38ms, Maximum = 44ms, Average = 41ms

C:\>ping -i 9 www.google.com

Pinging www.google.com  with 32 bytes of data:
Reply from 209.85.143.115: TTL expired in transit.
Reply from 209.85.143.115: TTL expired in transit.
Reply from 209.85.143.115: TTL expired in transit.
Reply from 209.85.143.115: TTL expired in transit.

Ping statistics for 172.217.17.196:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

C:\>

7) Ping -v TOS Command

This command sets the Type of Service in the IP header of the Echo-Request packet to be sent to the destination. The Type of Service value is 0 by default and can change from 0 to 255.

8) Ping -r Command

This command records the paths for the “Echo Reply” package received for the “Echo Request” package. The minimum value is 1, and the maximum value is 9.

C:\>ping -r 2 vmware.com

Pinging vmware.com  with 32 bytes of data:
Reply from 45.60.11.183: bytes=32 time=165ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1
Reply from 45.60.11.183: bytes=32 time=167ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1
Reply from 45.60.11.183: bytes=32 time=168ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1
Reply from 45.60.11.183: bytes=32 time=166ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1

Ping statistics for 45.60.11.183:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 165ms, Maximum = 168ms, Average = 166ms

C:\>

9) Ping -s Command

Changes the Timestamp value in the IP address header and specifies the Hop Count time value. Records time information for outgoing and incoming Echo packets. The default value for this parameter is 1, and the maximum value is 9.

C:\>ping -s 3 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=2ms TTL=64
    Timestamp: 192.168.1.1 : 14619372 ->
               192.168.1.1 : 14619372 ->
               192.168.1.250 : 14621765
Reply from 192.168.1.1: bytes=32 time=2ms TTL=64
    Timestamp: 192.168.1.1 : 14620404 ->
               192.168.1.1 : 14620404 ->
               192.168.1.250 : 14622796
Reply from 192.168.1.1: bytes=32 time=2ms TTL=64
    Timestamp: 192.168.1.1 : 14621449 ->
               192.168.1.1 : 14621449 ->
               192.168.1.250 : 14623841
Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
    Timestamp: 192.168.1.1 : 14622469 ->
               192.168.1.1 : 14622469 ->
               192.168.1.250 : 14624860

Ping statistics for 192.168.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 2ms, Average = 1ms

C:\>

10) Ping -j Host-List Command

It uses Loose Source Routing to set the Routers that a package should visit. The sending packet configures the following Router address for its first destination.

The Host List configures the ping packet’s path, and the maximum number of IP addresses in the Host List is 9.

11) Ping -k Host-List Command

This command uses the Strict Source Route option in the IP header. The next Router or Interface for the Strict Source Route must be active. The maximum number of Host-List IP addresses is 9. That is, IP numbers are listed consecutively in a host list.

12) Ping -w Timeout Command

It specifies the wait time for Echo Reply for sending Echo Request packets. We evaluate the time zone in milliseconds, and the default value is 4,000ms (4 seconds).

When you ping -w 8000 192.168.2.1 on a computer outside your IP block, the Request Timed Out message will be displayed every 8 seconds.

C:\>ping -w 8000 192.168.2.1

Pinging 192.168.2.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>

13) Ping -r Command

This command is only used in the IPv6 structure and follows the outgoing/incoming paths.

14) Ping -S srcaddr Command

You use this command to specify the source address.

C:\>ping -S 192.168.1.250 vmware.com

Pinging vmware.com  from 192.168.1.250 with 32 bytes of data:
Reply from 45.60.11.183: bytes=32 time=146ms TTL=54
Reply from 45.60.11.183: bytes=32 time=146ms TTL=54
Reply from 45.60.11.183: bytes=32 time=145ms TTL=54
Reply from 45.60.11.183: bytes=32 time=148ms TTL=54

Ping statistics for 45.60.11.183:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 145ms, Maximum = 148ms, Average = 146ms

C:\>

15) Ping -4 Command

This command forces IPv4 to ping.

16) Ping -6 Command

This command forces IPv6 to ping.

Ping Commands > Video

Frequently Asked Questions About Ping (FAQ)

Conclusion

In conclusion, now you know how to use ping commands. Thus, it is incredibly effective in troubleshooting network connectivity issues faster. For example, pinging an IP address or website is simple. However, pinging a certain number of times or changing the packet size requires experience. In short, you can easily find the problems by adjusting the TTL and other things.

Additionally, the ping commands are the same whether you are using Windows or another OS. There may be a slight difference in some systems. But I recommend that you take the time to learn.

4617作文网劳保用品公司起名大全酒店起名字大全免费吗菲字起名有什么寓意2017双胞胎起名梦幻手游法宝分解明星淫梦解压密码怎么算出命里缺什么梦幻群侠传5安卓破解版特色饭店起名字八字算命未来配偶系统天津周易协会2020男孩起名名字大全拍卖起名女孩起名13笔画的算命好的周公解梦古文为马起名周公解梦大全查询网梦邹姓鼠宝宝起名qq英文起名取名起名大全姓钱做梦不好土方法破解于姓氏女孩起名字年属鼠的人起名宜用哪些字起名用萱和有什么寓意周公解梦梦见玉米花算死命小说章节全文周易摇卦在线占卜易经八字起名取名字大师在线解梦阅读淀粉肠小王子日销售额涨超10倍罗斯否认插足凯特王妃婚姻让美丽中国“从细节出发”清明节放假3天调休1天男子给前妻转账 现任妻子起诉要回网友建议重庆地铁不准乘客携带菜筐月嫂回应掌掴婴儿是在赶虫子重庆警方辟谣“男子杀人焚尸”国产伟哥去年销售近13亿新的一天从800个哈欠开始男孩疑遭霸凌 家长讨说法被踢出群高中生被打伤下体休学 邯郸通报男子持台球杆殴打2名女店员被抓19岁小伙救下5人后溺亡 多方发声单亲妈妈陷入热恋 14岁儿子报警两大学生合买彩票中奖一人不认账德国打算提及普京时仅用姓名山西省委原副书记商黎光被逮捕武汉大学樱花即将进入盛花期今日春分张家界的山上“长”满了韩国人?特朗普谈“凯特王妃P图照”王树国3次鞠躬告别西交大师生白宫:哈马斯三号人物被杀代拍被何赛飞拿着魔杖追着打315晚会后胖东来又人满为患了房客欠租失踪 房东直发愁倪萍分享减重40斤方法“重生之我在北大当嫡校长”槽头肉企业被曝光前生意红火手机成瘾是影响睡眠质量重要因素考生莫言也上北大硕士复试名单了妈妈回应孩子在校撞护栏坠楼网友洛杉矶偶遇贾玲呼北高速交通事故已致14人死亡西双版纳热带植物园回应蜉蝣大爆发男孩8年未见母亲被告知被遗忘张立群任西安交通大学校长恒大被罚41.75亿到底怎么缴沈阳一轿车冲入人行道致3死2伤奥运男篮美国塞尔维亚同组周杰伦一审败诉网易国标起草人:淀粉肠是低配版火腿肠外国人感慨凌晨的中国很安全男子被流浪猫绊倒 投喂者赔24万杨倩无缘巴黎奥运男子被猫抓伤后确诊“猫抓病”春分“立蛋”成功率更高?记者:伊万改变了国足氛围奥巴马现身唐宁街 黑色着装引猜测

4617作文网 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化