[[email protected] ~]# ping [選項] IP
選項:
[[email protected] ~]#ping 192.168.103.151
PING 192.168.103.151 (192.168.103.151) 56(84) bytes of data.
64 bytes from 192.168.103.151: icmp_seq=1 ttl=128 time=0.300 ms
64 bytes from 192.168.103.151: icmp_seq=2 ttl=128 time=0.481 ms
…省略部分內容...
#探測與指定主機是否通訊
[[email protected] ~]# ping -c 3 192.168.103.151
#只探測3次,就中止ping命令
[[email protected] ~]# ping -b -c 3 192.168.103.255
WARNING: pinging broadcast address
PING 192.168.103.255 (192.168.103.255) 56(84) bytes of data.
64 bytes from 192.168.103.199: icmp_seq=1 ttl=64 time=1.95ms
64 bytes from 192.168.103.168: icmp_seq=1 ttl=64 time=1.97ms(DUP!)
64 bytes from 192.168.103.252: icmp_seq=1 ttl=64 time=2.29ms(DUP!)
…省略部分內容...
#探測192.168.103.0/24網段中有多少可以通訊的主機