linux ping使用eth3,Linux系统中如何使用ping命令进行网络诊断(2)

实例2:ping不通的情况

命令:ping 192.168.120.202

输出:

代码如下:

[root@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

[root@localhost ~]#

实例3:ping网关

命令:ping -b 192.168.120.1

输出:

代码如下:

[root@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指定次数

命令:ping -c 10 192.168.120.206

输出:

代码如下:

[root@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

[root@localhost ~]#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值