系統(tǒng)之家 - 系統(tǒng)光盤下載網站!

當前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Linux中使用ping命令進行網絡診斷

Linux系統(tǒng)中如何使用ping命令進行網絡診斷(2)

時間:2014-12-29 17:28:18 作者:qipeng 來源:系統(tǒng)之家 1. 掃描二維碼隨時看資訊 2. 請使用手機瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20141229/33672.html 手機查看 評論

  實例2:ping不通的情況

  命令:ping 192.168.120.202

  輸出:

  代碼如下:

 。踨oot@localhost ~]# ping 192.168.120.202

  PING 192.168.120.202 (192.168.120.202) 56(84) bytes of data.

  From 192.168.120.204 icmp_seq=1 Destination Host Unreachable

  From 192.168.120.204 icmp_seq=2 Destination Host Unreachable

  From 192.168.120.204 icmp_seq=3 Destination Host Unreachable

  From 192.168.120.204 icmp_seq=4 Destination Host Unreachable

  From 192.168.120.204 icmp_seq=5 Destination Host Unreachable

  From 192.168.120.204 icmp_seq=6 Destination Host Unreachable《/p》 《p》--- 192.168.120.202 ping statistics ---

  8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7005ms

  , pipe 4

 。踨oot@localhost ~]#

  實例3:ping網關

  命令:ping -b 192.168.120.1

  輸出:

  代碼如下:

 。踨oot@localhost ~]# route

  Kernel IP routing table

  Destination Gateway Genmask Flags Metric Ref Use Iface

  192.168.120.0 * 255.255.255.0 U 0 0 0 eth0

  192.168.0.0 192.168.120.1 255.255.0.0 UG 0 0 0 eth0

  10.0.0.0 192.168.120.1 255.0.0.0 UG 0 0 0 eth0

  default 192.168.120.240 0.0.0.0 UG 0 0 0 eth0

  [root@localhost ~]# ping -b 192.168.120.1

  PING 192.168.120.1 (192.168.120.1) 56(84) bytes of data.

  64 bytes from 192.168.120.1: icmp_seq=1 ttl=255 time=2.02 ms

  64 bytes from 192.168.120.1: icmp_seq=2 ttl=255 time=1.83 ms

  64 bytes from 192.168.120.1: icmp_seq=3 ttl=255 time=1.68 ms

  64 bytes from 192.168.120.1: icmp_seq=4 ttl=255 time=1.98 ms

  64 bytes from 192.168.120.1: icmp_seq=5 ttl=255 time=1.88 ms《/p》 《p》--- 192.168.120.1 ping statistics ---

  5 packets transmitted, 5 received, 0% packet loss, time 4000ms

  rtt min/avg/max/mdev = 1.682/1.880/2.020/0.129 ms

  實例4:ping指定次數(shù)

  命令:ping -c 10 192.168.120.206

  輸出:

  代碼如下:

 。踨oot@localhost ~]# ping -c 10 192.168.120.206

  PING 192.168.120.206 (192.168.120.206) 56(84) bytes of data.

  64 bytes from 192.168.120.206: icmp_seq=1 ttl=64 time=1.25 ms

  64 bytes from 192.168.120.206: icmp_seq=2 ttl=64 time=0.260 ms

  64 bytes from 192.168.120.206: icmp_seq=3 ttl=64 time=0.242 ms

  64 bytes from 192.168.120.206: icmp_seq=4 ttl=64 time=0.271 ms

  64 bytes from 192.168.120.206: icmp_seq=5 ttl=64 time=0.274 ms

  64 bytes from 192.168.120.206: icmp_seq=6 ttl=64 time=0.295 ms

  64 bytes from 192.168.120.206: icmp_seq=7 ttl=64 time=0.269 ms

  64 bytes from 192.168.120.206: icmp_seq=8 ttl=64 time=0.270 ms

  64 bytes from 192.168.120.206: icmp_seq=9 ttl=64 time=0.253 ms

  64 bytes from 192.168.120.206: icmp_seq=10 ttl=64 time=0.289 ms《/p》 《p》--- 192.168.120.206 ping statistics ---

  10 packets transmitted, 10 received, 0% packet loss, time 9000ms

  rtt min/avg/max/mdev = 0.242/0.367/1.251/0.295 ms

 。踨oot@localhost ~]#

發(fā)表評論

0

沒有更多評論了

評論就這些咯,讓大家也知道你的獨特見解

立即評論

以上留言僅代表用戶個人觀點,不代表系統(tǒng)之家立場

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

官方交流群 軟件收錄