ICMP(Internet Control Message Protocol)
- 작성자
- 고친과정
2008년 9월 1일 : 처음씀
1.1. 개요
참고 영상 |
- ICMP는 다음과 같이 IP datagram 과 함께 구성된 모습을 띄고 있다.
<- IP datagram -> IP header ICMP message
- ICMP message
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 8bit Type 8bit Code 16bit Checksum (Type과 Code에 따라서 다른 형식을 갖는 부분)
- ICMP message Type and Code (참고: http://www.iana.org/assignments/icmp-parameters)
Type Code Name Reference 0 0 Echo Reply (RFC792) 1 - Unassigned (JBP) 2 - Unassigned (JBP) 3 Destination Unreachable (RFC792) 0 Net Unreachable 1 Host Unreachable 2 Protocol Unreachable 3 Port Unreachable 4 Fragmentation Needed and Don't Fragment was Set 5 Source Route Failed 6 Destination Network Unknown 7 Destination Host Unknown 8 Source Host Isolated 9 Communication with Destination Network is Administratively Prohibited 10 Communication with Destination Host is Administratively Prohibited 11 Destination Network Unreachable for Type of Service 12 Destination Host Unreachable for Type of Service 4 0 Source Quench (RFC792) 5 Redirect (RFC792) 0 Redirect Datagram for the Network (or subnet) 1 Redirect Datagram for the Host 2 Redirect Datagram for the Type of Service and Network 3 Redirect Datagram for the Type of Service and Host 6 Alternate Host Address (JBP) 0 Alternate Address for Host 7 - Unassigned (JBP) 8 0 Echo (RFC792) 9 0 Router Advertisement (RFC1256) 10 0 Router Selection (RFC1256) 11 Time Exceeded (RFC792) 0 Time to Live exceeded in Transit 1 Fragment Reassembly Time Exceeded 12 Parameter Problem (RFC792) 0 Pointer indicates the error 1 Missing a Required Option 2 Bad Length 13 0 Timestamp (RFC792) 14 0 Timestamp Reply (RFC792) 15 0 Information Request (RFC792) 16 0 Information Reply (RFC792) 17 0 Address Mask Request (RFC950) 18 0 Address Mask Reply (RFC950) 19 - Reserved (for Security) (Solo) 20-29 - Reserved (for Robustness Experiment) (ZSu) 30 - Traceroute (RFC1393) 31 - Datagram Conversion Error (RFC1475) 32 - Mobile Host Redirect (David Johnson) 33 - IPv6 Where-Are-You (Bill Simpson) 34 - IPv6 I-Am-Here (Bill Simpson) 35 - Mobile Registration Request (Bill Simpson) 36 - Mobile Registration Reply (Bill Simpson) 37-255 - Reserved (JBP) - Type 에 따라서 일부는 Code를 추가적으로 필요하거나 필요하지 않다.
- Type 에 따라서 일부는 Code를 추가적으로 필요하거나 필요하지 않다.
- ICMP checksum (엄밀히는 Internet checksum 이라고 부르며 Computing the Internet Checksum (RFC1071) 에 그 구현방법이 명시되어 있다.)
- ICMP echo request and reply
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 8bit Type (8 or 0) 8bit Code 16bit Checksum Identifier Sequence number Variable data
- ICMP address mask request and replay
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 8bit Type (17 or 18) 8bit Code 16bit Checksum Identifier Sequence number 32bit subnet mask
- ICMP timestamp request and replay
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 8bit Type (13 or 14) 8bit Code 16bit Checksum Identifier Sequence number 32bit originate timestamp 32bit receive timestamp 32bit transmit timestamp
1.2. 예제소스
1.3. 참고자료
- Internet Control Message Protocol (ICMP) Parameters - IANA
- Internet Control Message Protocol version 6 (ICMPv6) Parameters - IANA
- OSI 7 계층모델
- Computing the Internet Checksum (RFC1071)
- TCP(Transmission Control Protocol)
- RFC792 - INTERNET CONTROL MESSAGE PROTOCOL
- RFC2894 - Router Renumbering for IPv6
- RFC3315 - Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
- RFC4443 - Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification
- mzping
- ICMP, Internet Control Message Protocol - RFC sourcebook
- https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol_for_IPv6
- https://www.youtube.com/watch?v=MGzl2TkGsSg