Presentation is loading. Please wait.

Presentation is loading. Please wait.

Byungchul Park (fates@postech.ac.kr) ICMP & ICMPv6 2008. 3. 7 DPNM Lab. Byungchul Park (fates@postech.ac.kr)

Similar presentations


Presentation on theme: "Byungchul Park (fates@postech.ac.kr) ICMP & ICMPv6 2008. 3. 7 DPNM Lab. Byungchul Park (fates@postech.ac.kr)"— Presentation transcript:

1 Byungchul Park (fates@postech.ac.kr)
ICMP & ICMPv6 DPNM Lab. Byungchul Park

2 Internet Control Message Protocol
ICMP Internet Control Message Protocol

3 Introduction ICMP is often considered part of the IP layer
ICMP: Internet Control Message Protocol ICMP is often considered part of the IP layer Why the ICMP is needed? Lacks of IP !!! Unreliable and connectionless datagram delivery Best-effort delivery service Lack of error control and lack of assistance mechanisms No error-reporting and error-correcting mechanisms Lacks of mechanism for host and management queries  ICMP has been designed to compensate for the above deficiencies. Application Telnet, FTP, , etc Transport TCP, UDP Network IP, ICMP, IGMP Link device driver and interface card

4 Introduction ICMP message are transmitted within IP datagrams
ICMP: Internet Control Message Protocol ICMP message are transmitted within IP datagrams Although ICMP is used primarily by IP, it is possible for an application to also access it. (e.g. Traceroute, Ping)

5 ICMP Messages ICMP message are transmitted within IP datagrams
Types of Messages ICMP message are transmitted within IP datagrams Error reporting : report problems that a router or host may encounter when it processes an IP packet Query message : get specific information from router or a host in order to help a host or network management. ICMP Messages Error-reporting Query

6 ICMP Messages (cont.) Category Type Message Error-reporting message 3
Types of Messages Category Type Message Error-reporting message 3 Destination unreachable 4 Source quench 11 Time exceeded 12 Parameter problem 5 Redirection Query message 8 or 0 Echo request or reply 13 or 14 Timestamp request and reply 17 or 18 Address mask request and reply 10 or 9 Router solicitation and advertisement

7 Message Format Type : message type(8 bit)
ICMP Message Format Type : message type(8 bit) Code : specify the reason for the particular message Checksum : 16 bit

8 Message Format Address mask reply 18 Address mask request 17
ICMP common field and message Type Address mask reply 18 Address mask request 17 Timestamp reply 14 Timestamp request 13 Parameter problem 0-1 12 Time exceeded 11 Router solicitation 10 Router advertisement 9 Echo request 8 Redirection 0-3 5 Source quench 4 Destination unreachable 0-15 3 Echo reply description code Type

9 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.

10 ICMP always reports error messages to the original source.
Error Reporting ICMP: Internet Control Message Protocol Main responsibilities of ICMP Error messages are always sent to the original source ICMP always reports error messages to the original source. Error Reporting Time exceeded Source quench Parameter problems Redirection Destination unreachable

11 Error Reporting Contents of data field for error messages When an ICMP error message is sent, the message always contains the IP header and the first 8 bytes of the IP datagram that caused the ICMP error to be generated.

12 Error Reporting Destination Unreachable When a router cannot route a datagram or a host cannot deliver a datagram, the datagram is discarded and the router or host send s a destination unreachable message back to the source. Format 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. A router cannot detect all problems that prevent the delivery of a packet There is no flow-control mechanism in the IP protocol.

13 Error Reporting Code Field : the reason for discarding the datagram
Destination Unreachable Code Field : the reason for discarding the datagram code Reasons for error Network unreachable 1 Host unreachable 2 Protocol unreachable 3 Port unreachable 4 Fragmentation needed and DF set 5 Source route failed 6 Destination network unknown 7 Destination host unknown 8 Source host isolated 9 Communication with destination network administratively prohibited 10 Communication with destination host administratively prohibited 11 Network unreachable for type of services 12 Host unreachable for type of services

14 Error Reporting 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. Whenever a router receives a datagram with a time-to-live value of zero, it discards the datagram and sends a time-exceeded message to the original source. 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. Format

15 Error Reporting Code 0: Main header problem
Parameter problem Code 0: Main header problem Code 1: Problem in the option field A parameter-problem message can be created by a router or the destination host. Format

16 Error Reporting Redirection concept When a host send a datagram, which is destined for another network, to the wrong router, the router that receives the datagram will forward the datagram to the correct router. However, to update the routing table of host, it send a redirection message to host. When a new host come up, its routing table has a limited number of entries. It usually knows only a default router, so they can send to wrong router.

17 Error Reporting Redirection concept A redirection message is sent from a router to host on the same local network. Redirection message format Code 0: Network specific Code 1: Host specific Code 2: Network specific (specified service) Code 3: Host specific (specified service) Format

18 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.

19 Query Diagnose some network problems Query messages Query Timestamp
ICMP: Internet Control Message Protocol Diagnose some network problems Query messages Query Timestamp request & reply Address mask Request & reply Router solicitation & advertisement Echo

20 Query Echo Request and Reply 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. Echo-request and echo-reply messages can be used by network managers to check the operation of the IP protocol Echo-request and echo-reply messages can test the reachability of a host. this is usually done by invoking the ping command.

21 Query Timestamp Request and Reply 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. 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. Each field is represented by the unit of Miliseconds from midnight in Universal Time 3 timestamp fields(original, receive, transmit) are 32 bit long, (0~4,294,967,295), but a timestamp in this case cannot exceed 86,400,000= 24x60x60x1000.

22 Query Format Steps Sender create a timestamp-request message
Timestamp Request and Reply Format Steps Sender create a timestamp-request message Insert the sending time to Original timestamp field Other 2 fields is 0 Receiver create the timestamp-reply message Copy the value of the original timestamp to same field Insert the receiving time of the request message to the receive timestamp Insert the sending time of the reply message to the transmit timestamp.

23 Query Address-Mask Request and Reply When a host want to know about a full IP address which part of address defines the network and subnetwork address and which part corresponds to the host identifier. Masking is needed for diskless station at statr-up time.(BOOTP protocol) Mask-request and mask-reply message format

24 Query Router solicitation and Advertisement A host the want to send data to a host on outside network needs to know the address of routers connected to its own network. A host can broadcast(or multicast) a router-solicitation message A router or routers that received the solicitation message broadcast their routing information using the router-advertisement message. Router-solicitation message format

25 Query Router advertisement message format
Router solicitation and Advertisement Router advertisement message format The preference level is used to select a router as the default router. If the preference level is 0, the router is considered the default router. If the preference level is , the router should be never selected as the default router.

26 ICMPv6 Internet Control Message Protocol Version 6

27 Comparison of network layers in IPv4 and IPv 6
ICMPv6: Internet Control Message Protocol version 6

28 Message Format General format of ICMPv6 messages
Router solicitation and Advertisement General format of ICMPv6 messages

29 Error Reporting Error Reporting Time exceeded Packet too big Parameter
Router solicitation and Advertisement Error Reporting Time exceeded Packet too big Parameter problems Redirection Destination unreachable

30 Destination unreachable
Error Reporting Comparison Error Reporting function between v4 and v6 Type of Message V4 V6 Destination unreachable Yes Source quench No Packet too big Time exceeded Parameter problem Redirection

31 Neighbor solicitation
Query ICMPv6: Internet Control Message Protocol version 6 Diagnose some network problems Query messages Query Echo request & reply Group membership Neighbor solicitation & advertisement Router solicitation & advertisement

32 Query Type of Message V4 V6 Echo request and reply Yes
ICMPv6: Internet Control Message Protocol version 6 Type of Message V4 V6 Echo request and reply Yes Timestamp request and reply No Address mask request and reply Router solicitation Neighbor solicitation ARP Group membership IGMP

33 ?


Download ppt "Byungchul Park (fates@postech.ac.kr) ICMP & ICMPv6 2008. 3. 7 DPNM Lab. Byungchul Park (fates@postech.ac.kr)"

Similar presentations


Ads by Google