linux ping命令

NAME
       ping, ping6 - send ICMP ECHO_REQUEST to network hosts

SYNOPSIS
       ping  [ -LRUbdfnqrvVaAB]  [ -c count]  [ -i interval]  [ -l preload]  [ -p pattern]  [ -s packetsize]  [ -t ttl]  [ -w deadline]
       [ -F flowlabel]  [ -I interface]  [ -M hint]  [ -Q tos]  [ -S sndbuf]  [ -T timestamp option]  [ -W timeout]  [ hop ...]  desti-
       nation

DESCRIPTION
       ping  uses  the  ICMP  protocol’s  mandatory  ECHO_REQUEST  datagram  to  elicit  an  ICMP ECHO_RESPONSE from a host or gateway.
       ECHO_REQUEST datagrams (‘‘pings’’) have an IP and ICMP header, followed by a struct timeval and  then  an  arbitrary  number  of
       ‘‘pad’’ bytes used to fill out the packet.

       以上是ping 的man-pages。ping是一個發送icmp協議的echo_request包到網絡主機的命令.所以,禁用ping的其中一個方法就可以是在防火牆上禁止icmp的0和8類型的包的通過。 
       
       ping的常用選項。

                 ping -c4 


         -p pattern,可以指定最多16個填充字節到發送的包中。在查找和數據相關的問題時有用。這個,我也沒怎麼搞懂。


         -F flow label,流標籤。在請求包內分配20bit的flow label。僅ping6

         -M hint,標記,提示。我也不會用。
         -Q tos,在icmp包中設定QOS服務質量相關的位。tos可以爲十進制或16進制。
         -S sndbuf,設置socket發送緩存。如果不指定,不會緩衝多於一個包的數據
         -T timestampe option,時間戳。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章