ping

IPネットワークにおいて、ノードの到達性を確認するためのソフトウェア

ping(ピンまたはピング)はIPネットワークにおいて、ネットワーク上で特定のIPアドレスを持つ機器から応答があるかを調べるためのプログラムソフトウェア[1]

ping
作者 マイク・ムース
初版 1983年 (41年前) (1983)
プラットフォーム ほとんどのネットワークOS
種別 コマンド
テンプレートを表示

「到達性」を確認するために使え、さまざまな用途があり、たとえばホストシステム(ユーザが現に「ホスト」として使用中のシステム)がインターネットとの基本的な接続を確立しているかテストするため、また自ホストが属するノードが特定のノードと繋がっているかをテストするため、などに使われている。

IPネットワークにおける基本的なツールの一つであり、IPネットワーク機能が実装されているオペレーティングシステムや組み込みネットワーク管理ソフトウェアのほとんどで、何らかの形で用意されている。

概要 編集


pingRTTping[2]

pingICMP"echo request""echo reply"

Request timed out.Destination host/net unreachable.TTL expired in transit.

 


ping使IPDNS

pingping使pingIPIPDNS

ping調使pingIPDNSOSIpingIPIPhttpWWW

 


ping(TTL)IPv6ICMPv6"ping6"

[1]ping

pingping使

 


ping198312 IPNTPLIPICMP使[3]使pingping[2][4]pingpingping"packet internet groper""packet internet gopher"[2][5]

BSDping4.3BSD[6]

RFC 1122 ICMP echo requestecho reply[7][8]

ping2003Welchiaping調pingISPICMP Type 8echo request

ping  



Linux  


Linuxwww.google.comiputilspingping
$ ping www.google.com
PING www.l.google.com (64.233.183.103) 56(84) bytes of data.
64 bytes from 64.233.183.103: icmp_seq=1 ttl=246 time=22.2 ms
64 bytes from 64.233.183.103: icmp_seq=2 ttl=245 time=25.3 ms
64 bytes from 64.233.183.103: icmp_seq=3 ttl=245 time=22.7 ms
64 bytes from 64.233.183.103: icmp_seq=4 ttl=246 time=25.6 ms
64 bytes from 64.233.183.103: icmp_seq=5 ttl=246 time=25.3 ms
64 bytes from 64.233.183.103: icmp_seq=6 ttl=245 time=25.4 ms
64 bytes from 64.233.183.103: icmp_seq=7 ttl=245 time=25.4 ms
64 bytes from 64.233.183.103: icmp_seq=8 ttl=245 time=21.8 ms
64 bytes from 64.233.183.103: icmp_seq=9 ttl=245 time=25.7 ms
64 bytes from 64.233.183.103: icmp_seq=10 ttl=246 time=21.9 ms

--- www.l.google.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9008ms
rtt min/avg/max/mdev = 21.896/24.187/25.718/1.619 ms

www.google.comDNSCNAMEwww.l.google.com64.233.183.103IP64.233.183.10310pingLinuxpingping



10100%

21.8961=1/100024.18725.7181.619

macOS  


macOSwww.google.compingping computernameusernameMacintosh HD
computername:~ username$ ping www.google.com
PING www.l.google.com (66.249.89.104): 56 data bytes
64 bytes from 66.249.89.104: icmp_seq=1 ttl=238 time=30.556 ms
64 bytes from 66.249.89.104: icmp_seq=2 ttl=238 time=30.412 ms
64 bytes from 66.249.89.104: icmp_seq=3 ttl=238 time=31.272 ms
64 bytes from 66.249.89.104: icmp_seq=4 ttl=238 time=30.121 ms
64 bytes from 66.249.89.104: icmp_seq=5 ttl=238 time=30.942 ms
64 bytes from 66.249.89.104: icmp_seq=6 ttl=238 time=32.132 ms
64 bytes from 66.249.89.104: icmp_seq=7 ttl=238 time=30.680 ms
64 bytes from 66.249.89.104: icmp_seq=8 ttl=238 time=32.614 ms
64 bytes from 66.249.89.104: icmp_seq=9 ttl=238 time=29.405 ms
64 bytes from 66.249.89.104: icmp_seq=10 ttl=238 time=41.360 ms
64 bytes from 66.249.89.104: icmp_seq=11 ttl=238 time=32.176 ms
64 bytes from 66.249.89.104: icmp_seq=12 ttl=238 time=32.321 ms
^C
--- www.l.google.com ping statistics ---
13 packets transmitted, 12 packets received, 7% packet loss
round-trip min/avg/max/stddev = 29.405/31.999/41.360/2.978 ms

macOSUNIXLinux -cControl+C13pingLinux

log

13127%

RTT()29.405(ms)31.99941.3602.978

Windows  


Microsoft Windows XPwww.google.comping使ping(9598Me2000)
C:\>ping www.google.com

Pinging www.l.google.com [64.233.183.103] with 32 bytes of data:

Reply from 64.233.183.103: bytes=32 time=25ms TTL=245
Reply from 64.233.183.103: bytes=32 time=22ms TTL=245
Reply from 64.233.183.103: bytes=32 time=25ms TTL=246
Reply from 64.233.183.103: bytes=32 time=22ms TTL=246

Ping statistics for 64.233.183.103:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 22ms, Maximum = 25ms, Average = 23ms

www.google.comDNSCNAMEwww.l.google.com64.233.183.103IP64.233.183.1034pingWindowsping4ping



440%

222523

Microsoft Windows 10www.google.com20181029ping使ping
C:\Users\(ユーザー名)>ping www.google.com

www.google.com [2404:6800:400a:808::2004]に ping を送信しています32バイトのデータ:
2404:6800:400a:808::2004 からの応答: 時間 =13ms
2404:6800:400a:808::2004 からの応答: 時間 =14ms
2404:6800:400a:808::2004 からの応答: 時間 =14ms
2404:6800:400a:808::2004 からの応答: 時間 =14ms

2404:6800:400a:808::2004 の ping 統計:
    パケット数: 送信 = 4、受信 = 4、損失 = 0 (0% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
    最小 = 13ms、最大 = 14ms、平均 = 13ms

www.google.comIPIPv6

Ping ipv6  


ipv4Pingipv6Internet Control Message Protocol for IPv6 使IPv4使ICMPARP

 




H  

!N  

!P  

S  

F  

U  

!W  

I  

A  

Z  

Q  ToS

T  ToS

X  

V  

C  

"host unreachable""TTL exceeded in transit"ICMP8ICMP echo requestping[9]

メッセージのフォーマット 編集

ICMPパケット 編集

IPv4データグラム
  Bits 0–7 Bits 8–15 Bits 16–23 Bits 24–31
ヘッダ
(20 bytes)
バージョン/IHL サービスの種類 長さ
識別子 フラグとオフセット
Time To Live (TTL) Protocol ヘッダのチェックサム
送信元IPアドレス
宛先IPアドレス
ICMPヘッダ
(8バイト)
メッセージの種類 コード チェックサム
ヘッダデータ
ICMPペイロード
(オプション)
ペイロードデータ
IPv6データグラム
  Bits 0–3 Bits 4–7 Bits 8–11 Bits 12–15 Bits 16–23 Bits 24–31
ヘッダ
(40バイト)
バージョン トラフィッククラス フローラベル
ペイロード長 次のヘッダ ホップリミット
送信元アドレス
宛先アドレス
ICMP6ヘッダ
(8バイト)
メッセージの種類 コード チェックサム
ヘッダデータ
ICMP6ペイロード
(オプション)
ペイロードデータ


ICMP:[10]

IPv4: 1(ICMP)0

IPv6: 58(ICMP6)

ICMP:
ICMP8

8

16ICMPIP使TypeICMP1161[11]

32echo request, reply1616

ICMPIPICMPmaximum transmission unit(MTU)MTU

 echo request  


echo requestICMP/ICMP6
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Type = 8(IPv4, ICMP) 128(IPv6,ICMP6) Code = 0 ヘッダチェックサム
識別子 シーケンス番号
ペイロード

使Linuxping使WindowsWindows使

 echo reply  


echo replyecho requestICMP
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Type = 0(IPv4,ICMP) 129(IPv6,ICMP6) Code = 0 ヘッダチェックサム
識別子 シーケンス番号
ペイロード

使

 


ASCIIICMP echo request32tcpdumpecho request0x0800ICMP
16:24:47.966461 IP (tos 0x0, ttl 128, id 15103, offset 0, flags [none],
proto: ICMP (1), length: 60) 192.168.146.22 > 192.168.144.5: ICMP echo request,
id 1, seq 38, length 40
       0x0000:  4500 003c 3aff 0000 8001 5c55 c0a8 9216  E..<:.....\U....
       0x0010:  c0a8 9005 0800 4d35 0001 0026 6162 6364  ......M5...&abcd
       0x0020:  6566 6768 696a 6b6c 6d6e 6f70 7172 7374  efghijklmnopqrst
       0x0030:  7576 7761 6263 6465 6667 6869            uvwabcdefghi

ping

 


ping"flood"ICM echo requestDoSping flood使

ping RFC 1122 [8][12]pingping[13]

関連項目 編集

脚注 編集

注釈 編集

  1. ^ EditMTU等。
  2. ^ ここでのgopherはIT用語でのgopherではなく、齧歯目のgopherのことである。

出典 編集



(一)^ [1]

(二)^ abMike Muuss. The Story of the PING Program. U.S. Army Research Laboratory. 201098201098 I named it after the sound that a sonar makes, inspired by the whole principle of echo-location.

(三)^ "The Story of the PING Program", Mike Muuss

(四)^ Salus, Peter (1994). A Quarter Century of UNIX. Addison-Wesley. ISBN 978-0-201-54777-1 

(五)^ Mills, D.L. (1983). Internet Delay Experiments (). IETF. p. 1. doi:10.17487/RFC0889. STD 8. RFC 889. 2015626

(六)^ http://www.manpagez.com/man/8/ping/

(七)^ RFC [https://datatracker.ietf.org/doc/html/rfc1122 1122 - Requirements for Internet Hosts -- Communication Layers]. p. 42. 2012319 Every host MUST implement an ICMP Echo server function that receives Echo Requests and sends corresponding Echo Replies.

(八)^ abWindows firewall: how block ICMP (echo response). 2019227

(九)^ ICMP: Internet Control Message Protocol. repo.hackerzvoice.net (2000113). 2014124

(十)^ RFC 792 - Internet Control Message Protocol. Tools.ietf.org. 201422

(11)^ RFC Sourcebook's page on ICMP. 20101220

(12)^ redhat linux /proc/sys/net/ipv4 parameters. 2019227

(13)^ Abdou, AbdelRahman; Matrawy, Ashraf; van Oorschot, Paul (April 2017). Accurate Manipulation of Delay-based Internet Geolocation. ACM AsiaCCS. doi:10.1145/3052973.3052993

外部リンク 編集