ping [ -d] [ -D ] [ -n ] [ -q ] [ -r] [ -v] [ -R ] [ -a addr_family ] [ -c Count ] [ -w timeout ] [ -f | -i Wait ] [ -l Preload ] [ -p Pattern ] [ -s PacketSize ] [ -S hostname/IP addr ] [ -L ] [ - I a.b.c.d. ] [ -o interface ] [ -T ttl ] Host [ PacketSize ] [ Count ]
ping コマンドは、インターネット制御メッセージ・プロトコル (ICMP) の ECHO_REQUEST を送信して、ホストまたはゲートウェイから ICMP ECHO_RESPONSE を取得します。 ping コマンドは、次の場合に役立ちます。
ホストが操作可能状態であり、ネットワーク上にあれば、エコーに応答します。それぞれのエコー要求は、インターネット・プロトコル (IP) と ICMP ヘッダーを含み、次に timeval 構造およびパケットを入れるのに十分なバイト数が続きます。デフォルトでは、割り込みを受信するまで (Ctrl-C)、継続してエコー要求を送信します。
ping コマンドは、1 秒に 1 つのデータグラムを送信し、応答を受信するたびに出力の 1 行を表示します。 ping コマンドは、往復時間とパケット損失統計情報を計算し、完了すると簡単に要約して表示します。プログラムがタイムアウトになったとき、または SIGINT シグナルを受信したときに、ping コマンドは完了となります。 Host パラメーターは、有効なホスト名か、IP アドレスのいずれかです。
デフォルトでは、ping コマンドは、割り込みを受信するまで (Ctrl-C)、画面表示にエコー要求を送信し続けます。
連続したエコー要求がシステムに及ぼす可能性がある負荷のために、反復要求は問題を分離するために主に使用されます。
PING canopus.austin.century.com: (128.116.1.5): 56 data bytes 64 bytes from 128.116.1.5: icmp_seq=0 ttl=255 time=2 ms 64 bytes from 128.116.1.5: icmp_seq=1 ttl=255 time=2 ms 64 bytes from 128.116.1.5: icmp_seq=2 ttl=255 time=3 ms 64 bytes from 128.116.1.5: icmp_seq=3 ttl=255 time=2 ms 64 bytes from 128.116.1.5: icmp_seq=4 ttl=255 time=2 ms ----canopus.austin.century.com PING Statistics---- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 2/2/3 ms
PING lear.austin.century.com: (128.114.4.18) 56 data bytes 64 bytes from 128.114.4.18: icmp_seq=0 ttl=255 time=6 ms 64 bytes from 128.114.4.18: icmp_seq=1 ttl=255 time=17 ms 64 bytes from 128.114.4.18: icmp_seq=2 ttl=255 time=6 ms 64 bytes from 128.114.4.18: icmp_seq=3 ttl=255 time=6 ms 64 bytes from 128.114.4.18: icmp_seq=4 ttl=255 time=6 ms ^C ----lear.austin.century.com PING Statistics ---- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 6/8/17 ms
注: 出力は、割り込み (Ctrl-C) を受信するまで繰り返されます。
PING opus.austin.century.com: (129.35.34.234): 2000 data bytes 2008 bytes from 129.35.34.234: icmp_seq=0 ttl=255 time=20 ms 2008 bytes from 129.35.34.234: icmp_seq=1 ttl=255 time=19 ms 2008 bytes from 129.35.34.234: icmp_seq=2 ttl=255 time=20 ms 2008 bytes from 129.35.34.234: icmp_seq=3 ttl=255 time=20 ms 2008 bytes from 129.35.34.234: icmp_seq=4 ttl=255 time=20 ms 2008 bytes from 129.35.34.234: icmp_seq=5 ttl=255 time=19 ms 2008 bytes from 129.35.34.234: icmp_seq=6 ttl=255 time=19 ms ^C ----opus.austin.century.com PING Statistics---- 7 packets transmitted, 7 packets received, 0% packet loss round-trip min/avg/max = 19/19/20 ms
注: 出力は、割り込み (Ctrl-C) を受信するまで繰り返されます。
Ping stlopnor.austin.century.com: (129.35.34.234): 56 data bytes .^C ----stlopnor.austin.century.com PING Statistics ---- 1098 packets transmitted, 1097 packets received, 0% packet loss round-trip min/avg/max = 4/4/11
注: flood-ping 出力は、割り込み (Ctrl-C) を受信するまで継続します。
PING opus.austin.century.com: (129.35.34.234): 56 data bytes 64 bytes from 129.35.34.234: icmp_seq=0 ttl=255 time=5 ms 64 bytes from 129.35.34.234: icmp_seq=1 ttl=255 time=5 ms 64 bytes from 129.35.34.234: icmp_seq=2 ttl=255 time=6 ms ^C ----opus.austin.century.com PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 5/5/6 ms
注: 出力は、割り込み (Ctrl-C) を受信するまで繰り返されます。
PING opus.austin.century.com: (129.35.34.234): 56 data bytes 64 bytes from 129.35.34.234: icmp_seq=0 ttl=255 time=9 ms 64 bytes from 129.35.34.234: icmp_seq=1 ttl=255 time=11 ms 64 bytes from 129.35.34.234: icmp_seq=2 ttl=255 time=16 ms 64 bytes from 129.35.34.234: icmp_seq=3 ttl=255 time=22 ms 64 bytes from 129.35.34.234: icmp_seq=4 ttl=255 time=26 ms 64 bytes from 129.35.34.234: icmp_seq=5 ttl=255 time=27 ms 64 bytes from 129.35.34.234: icmp_seq=6 ttl=255 time=30 ms 64 bytes from 129.35.34.234: icmp_seq=7 ttl=255 time=31 ms 64 bytes from 129.35.34.234: icmp_seq=8 ttl=255 time=33 ms 64 bytes from 129.35.34.234: icmp_seq=9 ttl=255 time=35 ms 64 bytes from 129.35.34.234: icmp_seq=10 ttl=255 time=36 ms 64 bytes from 129.35.34.234: icmp_seq=11 ttl=255 time=6 ms 64 bytes from 129.35.34.234: icmp_seq=12 ttl=255 time=6 ms 64 bytes from 129.35.34.234: icmp_seq=13 ttl=255 time=6 ms 64 bytes from 129.35.34.234: icmp_seq=14 ttl=255 time=7 ms 64 bytes from 129.35.34.234: icmp_seq=15 ttl=255 time=6 ms ^C ----opus.austin.century.com PING Statistics---- 16 packets transmitted, 16 packets received, 0% packet loss round-trip min/avg/max = 6/19/36 ms
注: 出力は、割り込み (Ctrl-C) を受信するまで繰り返されます。
PATTERN: 0xff PING opus.austin.century.com: (129.35.34.234): 56 data bytes 64 bytes from 129.35.34.234: icmp_seq=0 ttl=255 time=5 ms 64 bytes from 129.35.34.234: icmp_seq=1 ttl=255 time=5 ms 64 bytes from 129.35.34.234: icmp_seq=2 ttl=255 time=5 ms 64 bytes from 129.35.34.234: icmp_seq=3 ttl=255 time=6 ms 64 bytes from 129.35.34.234: icmp_seq=4 ttl=255 time=5 ms ^C ----opus.austin.century.com PING Statistics---- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 5/5/6 ms
注: 出力は、割り込み (Ctrl-C) を受信するまで繰り返されます。
PING bach.austin.century.com: (129.35.34.234): 56 data bytes ^C ----bach.austin.century.com PING Statistics---- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 5/5/8 ms
注: 表示されなくても、パケットの出力は割り込み (Ctrl-C) を受信するまで継続されます。