1 / 72

Chapter 9

Chapter 9. Internet Control Message Protocol. Objectives. Upon completion you will be able to:. Be familiar with the ICMP message format Know the types of error reporting messages Know the types of query messages Be able to calculate the ICMP checksum

lamont
Télécharger la présentation

Chapter 9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 9 Internet Control Message Protocol Objectives Upon completion you will be able to: Be familiar with the ICMP message format Know the types of error reporting messages Know the types of query messages Be able to calculate the ICMP checksum Know how to use the ping and traceroute commands Understand the modules and interactions of an ICMP package

  2. CONTENTS TYPES OF MESSAGES MESSAGE FORMAT ERROR REPORTING QUERY CHECKSUM ICMP PACKAGE

  3. ICMP 프로토콜의 문제점 • 신뢰성이 없고 비연결형 데이터그램 전달 제공 • 최선의 노력 전달 서비스 • 오류 제어와 지원 메커니즘이 없음 • 오류 보고 및 오류 수정 기능이 없음 • 호스트와 관리 질의를 위한 메커니즘이 없다 • 이 문제점을 보완하기 위해 설계

  4. 네트워크 계층에서 ICMP 위치

  5. ICMP 패킷의 캡슐화

  6. 9.1 TYPES OF MESSAGES ICMP messages are divided into error-reporting messages and query messages. The error-reporting messages report problems that a router or a host (destination) may encounter. The query messages get specific information from a router or another host.

  7. 9.1 메시지 유형 • 오류 보고 메시지 : IP 패킷 처리 도중 발견된 문제를 보고 • 질의 메시지 : 다른 호스트로부터 특정 정보를 획득하기 위해 사용

  8. 9.1 메시지 유형 • ICMP 메시지

  9. 9.2 MESSAGE FORMAT An ICMP message has an 8-byte header and a variable-size data section. Although the general format of the header is different for each message type, the first 4 bytes are common to all.

  10. 9.2 메시지 형식 • ICMP 메시지 일반적인 형식

  11. 9.3 ERROR REPORTING IP, as an unreliable protocol, is not concerned with error checking and error control. ICMP was designed, in part, to compensate for this shortcoming. ICMP does not correct errors, it simply reports them. The topics discussed in this section include: Destination Unreachable Source Quench Time Exceeded Parameter Problem Redirection

  12. Note: ICMP always reports error messages to the original source. 9.3 오류 보고 • ICMP의 주 임무 중 하나

  13. 9.3 오류 보고 • 오류 보고 메시지

  14. Note: The following are important points about ICMP error messages: ❏ No ICMP error message will be generated in response to a datagram carrying an ICMP error message.❏ No ICMP error message will be generated for a fragmented datagram that is not the first fragment.❏No ICMP error message will be generated for a datagram having a multicast address.❏ No ICMP error message will be generated for a datagram having a special address such as 127.0.0.0 or 0.0.0.0. 9.3 오류 보고

  15. 9.3 오류 보고 • 오류 메시지를 위한 데이터 필드 내용 • 처음 8 바이트 : TCP와 UDP 포트 번호와 순서 번호

  16. 9.3 오류 보고 • 목적지 도달 불가능(Destination Unreachable) • 라우터가 데이터그램을 라우팅할 수 없거나 호스트나 데이터그램을 배달할 수 없을 때 데이터그램은 폐기되고 발신지 호스트에 목적지 도달 불가 메시지 전달 • 목적지 도달 불가 메시지 형식

  17. 9.3 오류 보고 • 코드 필드 : 데이터그램 폐기 이유 0 : 하드웨어 고장 네트워크에 도달 불가 1 : 하드웨어 고장 호스트에 도달 불가 2 : 프로토콜에 도달 불가 3 : 포트 도달 불가 . . 15 : 우선 순위가 낮아서 호스트 도달 불가  책 214,215 쪽 참조

  18. Note: Destination-unreachable messages with codes 2 or 3 can be created only by the destination host. Other destination-unreachable messages can be created only by routers. 9.3 오류 보고

  19. Note: A router cannot detect all problems that prevent the delivery of a packet. 9.3 오류 보고

  20. Note: There is no flow-control mechanism in the IP protocol. 9.3 오류 보고

  21. 9.3 오류 보고 • 발신지 억제(source quench) 혼잡으로 인하여 데이터그램 폐기를 발신지에 알림

  22. Note: A source-quench message informs the source that a datagram has been discarded due to congestion in a router or the destination host. The source must slow down the sending of datagrams until the congestion is relieved. 9.3 오류 보고

  23. Note: One source-quench message is sent for each datagram that is discarded due to congestion. 9.3 오류 보고

  24. Note: Whenever a router decrements a datagram with a time-to-live value to zero, it discards the datagram and sends a time-exceeded message to the original source. 9.3 오류 보고

  25. 9.3 오류 보고 Note: When the final destination does not receive all of the fragments in a set time, it discards the received fragments and sends a time-exceeded message to the original source.

  26. 9.3 오류 보고 Note: In a time-exceeded message, code 0 is used only by routers to show that the value of the time-to-live field is zero. Code 1 is used only by the destination host to show that not all of the fragments have arrived within a set time.

  27. 9.3 오류 보고 • 시간 경과(time exceeded) 메시지 형식 Code 0: Time to liveCode 1: Fragmentation

  28. 9.3 오류 보고 Note: A parameter-problem message can be created by a router or the destination host.

  29. 9.3 오류 보고 • 매개 변수 문제(parameter problem) 메시지 형식 Code 0: Main header problemCode 1: Problem in the option field

  30. 9.3 오류 보고 • 재지정(redirection) • 데이터그램을 잘못된 라우터로 보낼때 라우팅 테이블을 갱신하기 위한 방법

  31. 9.3 오류 보고 Note: A host usually starts with a small routing table that is gradually augmented and updated. One of the tools to accomplish this is the redirection message.

  32. 9.3 오류 보고 • 재지정 메시지 형식 Code 0: Network specificCode 1: Host specificCode 2: Network specific (specified service) Code 3: Host specific (specified service)

  33. 9.3 오류 보고 Note: A redirection message is sent from a router to a host on the same local network.

  34. 9.4 QUERY ICMP can also diagnose some network problems through the query messages, a group of four different pairs of messages. In this type of ICMP message, a node sends a message that is answered in a specific format by the destination node. The topics discussed in this section include: Echo Request and Reply Timestamp Request and Reply Address-Mask Request and Reply Router Solicitation and Advertisement

  35. 9.4 질의 • 네트워크 문제 진단 • 질의 메시지

  36. 9.4 질의 Note: An echo-request message can be sent by a host or router. An echo-reply message is sent by the host or router which receives an echo-request message.

  37. 9.4 질의 Note: Echo-request and echo-reply messages can be used by network managers to check the operation of the IP protocol.

  38. 9.4 질의 Note: Echo-request and echo-reply messages can test the reachability of a host. This is usually done by invoking the ping command.

  39. 9.4 질의 • 에코 요청 및 에코 응답 메시지 Ping command can use theses messages.

  40. 9.4 질의 • 타임스탬프 요청과 응답 • 두 시스템 간에 IP 데이터그램이 오고 가는데 필요한 왕복 시간 결정 • 그리니치 표준시 사용 • 세계 표준시(Universal Time)의 자정으로 부터 시간을 ms 단위로 표현 • 3개의(original, receive, transmit) 32 비트 필드 사용(0~4, 294, 967, 295 사이 값)

  41. 9.4 질의 • 타임스탬프 요청과 응답 메시지 형식

  42. 9.4 질의 • 동작 과정 • 발신지는 타임스탬프 요청 메시지 생성 • Original timestamp 필드에 출발 시간 값 삽입 • 나머지 두 필드는 0 • 목적지는 응답 메시지 생성 • Original timestamp 값을 같은 필드에 복사 • 요청이 수신된 시점의 시간을 receive timestamp 필드에 삽입 • 응답 메시지가 출발하는 시간을 transmit timestamp 필드에 삽입

  43. 9.4 질의 • 왕복시간 계산 Sending time = value of receive timestamp - value of original timestamp Receiving time = time the packet returned - value of transmit timestamp Round-trip time = sending time + receiving time

  44. 9.4 질의 Note: Timestamp-request and timestamp-reply messages can be used to calculate the round-trip time between a source and a destination machine even if their clocks are not synchronized.

  45. 9.4 질의 Given the following information: Value of original timestamp: 46 Value of receive timestamp: 59 Value of transmit timestamp: 60 Time the packet arrived: 67

  46. 9.4 질의 We can calculate: Sending time = 59 - 46 = 13 milliseconds Receiving time = 67 - 60 = 7 milliseconds Round-trip time = 13 + 7 = 20 milliseconds

  47. 9.4 질의 Note: The timestamp-request and timestamp-reply messages can be used to synchronize two clocks in two machines if the exact one-way time duration is known.

  48. 9.4 질의 Given the actual one-way time, Time difference = receive timestamp - (original timestamp field + one-way time duration) We have: Time difference = 59 - (46 + 10) = 3

  49. 9.4 질의 • 주소 마스크 요청과 응답 • 디스크가 없는 국이 구동될 때 필요 • 호스트가 LAN 상의 라우터에 요청 메시지 송신 • 마스크 요청과 마스크 응답 메시지 형식

  50. 9.4 질의 • 라우터 요청과 광고 • 다른 네트워크 상의 호스트에 데이터를 보낼 때 자신의 네트워크에 연결된 라우터 주소를 알고자 할 때 • 호스트는 라우터 요청 메시지를 브로드캐스트 하거나 멀티캐스트 • 라우터는 광고 메시지를 이용하여 라우팅 정보를 브로드캐스트 • 라우터 요청 메시지 형식

More Related