ping command

Ping detects whether the two hosts are connected
. Options:
-c value: the number of pings
-n: output data does not perform reverse check of ip and host name
-s value: specify the ICMP packet size, default 64bytes
-t value: TTL value, external Network default 255, LAN default 64
-W value: the number of seconds to wait for the response of the other host

[root@www ~]# ping baidu.com
PING baidu.com (111.13.101.208) 56(84) bytes of data.
64 bytes from 111.13.101.208: icmp_seq=1 ttl=128 time=4.41 ms
64 bytes from 111.13.101.208: icmp_seq=2 ttl=128 time=4.61 ms
[root@www ~]# ping 192.168.146.130
PING 192.168.146.130 (192.168.146.130) 56(84) bytes of data.
64 bytes from 192.168.146.130: icmp_seq=1 ttl=64 time=3.32 ms
64 bytes from 192.168.146.130: icmp_seq=2 ttl=64 time=0.195 ms

[root@www ~]# ping baidu.com -c 2
PING baidu.com (111.13.101.208) 56(84) bytes of data.
64 bytes from 111.13.101.208: icmp_seq=1 ttl=128 time=4.24 ms
64 bytes from 111.13.101.208: icmp_seq=2 ttl=128 time=4.35 ms

--- baidu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2025ms
rtt min/avg/max/mdev = 4.246/4.298/4.350/0.052 ms

[root@www ~]# ping baidu.com -s 128
PING baidu.com (220.181.57.216) 128(156) bytes of data.
136 bytes from 220.181.57.216: icmp_seq=1 ttl=128 time=3.91 ms
136 bytes from 220.181.57.216: icmp_seq=2 ttl=128 time=3.42 ms
136 bytes from 220.181.57.216: icmp_seq=3 ttl=128 time=3.31 ms
136 bytes from 220.181.57.216: icmp_seq=4 ttl=128 time=3.53 ms

--- baidu.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 4949ms
rtt min/avg/max/mdev = 3.310/3.545/3.913/0.230 ms

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324577728&siteId=291194637