N1网络命令-ping
admin
2023-07-14 22:43:12
0

ping
参数 -c 指定次数

root@ubuntu17:~# ping -c 2 www.baidu.com
PING www.a.shifen.com (111.13.100.92) 56(84) bytes of data.
64 bytes from 111.13.100.92 (111.13.100.92): icmp_seq=1 ttl=51 time=19.0 ms
64 bytes from 111.13.100.92 (111.13.100.92): icmp_seq=2 ttl=51 time=17.9 ms

--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 17.998/18.526/19.054/0.528 ms

参数 -q 只看结果

root@ubuntu17:~# ping -q www.baidu.com -c 2
PING www.a.shifen.com (111.13.100.91) 56(84) bytes of data.

--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 11.622/11.786/11.951/0.197 ms

参数 -s 指定ping包大小

root@ubuntu17:~# ping -s 65500 -c 2 www.baidu.com
PING www.a.shifen.com (111.13.100.92) 65500(65528) bytes of data.

--- www.a.shifen.com ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1022ms

参数 -t 指定生存时间

root@ubuntu17:~# ping -t 10 www.yahoo.com -c 2
PING atsv2-fp.wg1.b.yahoo.com (124.108.103.104) 56(84) bytes of data.
From r4105-s2.tp.hinet.net (220.128.10.198) icmp_seq=1 Time to live exceeded
From r4105-s2.tp.hinet.net (220.128.10.198) icmp_seq=2 Time to live exceeded

--- atsv2-fp.wg1.b.yahoo.com ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1001ms

参数 -i 指定ping的间隔时间

root@ubuntu17:~# ping -i 0.1 -c 10 www.baidu.com
PING www.a.shifen.com (111.13.100.91) 56(84) bytes of data.
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=1 ttl=51 time=11.8 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=2 ttl=51 time=11.8 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=3 ttl=51 time=11.7 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=4 ttl=51 time=11.7 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=5 ttl=51 time=11.7 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=6 ttl=51 time=11.6 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=7 ttl=51 time=11.7 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=8 ttl=51 time=11.7 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=9 ttl=51 time=11.7 ms
64 bytes from 111.13.100.91 (111.13.100.91): icmp_seq=10 ttl=51 time=11.7 ms

--- www.a.shifen.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 1156ms
rtt min/avg/max/mdev = 11.671/11.752/11.870/0.147 ms

参数 -f 洪水泛洪

root@ubuntu17:~# ping -f -c 100 www.baidu.com
PING www.a.shifen.com (111.13.100.92) 56(84) bytes of data.

--- www.a.shifen.com ping statistics ---
100 packets transmitted, 100 received, 0% packet loss, time 1584ms
rtt min/avg/max/mdev = 17.319/17.899/19.847/0.313 ms, pipe 2, ipg/ewma 16.000/17.831 ms

相关内容

热门资讯

特朗普:正致力于与伊朗达成协议... 特朗普在《纽约邮报》一档播客访谈节目中称,他正与伊朗磋商一项协议,伊朗已同意不再谋求拥有核武器。他表...
不接壤的日菲为何偷划海界? 日菲近日发表联合声明,宣称就“划定两国专属经济区和大陆架的海洋边界”启动正式谈判。两个隔海相望的国家...
凤凰晚报丨从钳工到老戏骨,魏宗... 今日人物【从钳工到老戏骨,魏宗万用一生诠释“戏比天大”】6月1日,表演艺术家魏宗万在上海逝世,享年8...
科威特称伊朗袭击致63人受伤 科威特卫生部门3日称,伊朗当天对科威特的袭击已造成63人受伤,相关部门已启动紧急应对预案,并在全国范...
日本标榜“和平国家”却行扩军备... 今年是东京审判开庭80周年,世界正回望历史、反思战争罪责、捍卫二战后来之不易的国际秩序之际,日本却迈...
浙江杨梅即将大规模上市,如何破... “我们现在的压力很大。”5月底,浙江余姚杨梅产区丈亭镇副镇长林宇站在一片杨梅林前对第一财经表示,当地...
致5死2伤!韩国就韩华航空航天... 【环球网报道 记者 姜蔼玲】据韩联社6月1日报道,针对位于韩国大田的韩华航空航天公司发生爆炸致7人伤...
黄河科技学院2026年招生简章 长按图片识别二维码或点击 “阅读原文” 查看电子招生简章。
医路起航,从“心” 开始!黄河... 6月1日上午,黄河科技学院附属医院2022级临床医学本科实习生入院岗前培训在大医讲堂顺利举办。院领导...
问题居然在实体卡槽上!美版iP... 6月2日消息,日前,又有博主提前把还没发布的iPhone 18 Pro电池参数给曝光了出来,根据爆料...