Вы находитесь на странице: 1из 13

Recall IPv4 Datagram Format

Department of Information Technology, TIST IT7/ACN/AGK


IP Errors
• Header checksum is used to detect
transmission errors
– When a host creates an IP datagram
• the host includes a checksum that covers
the entire header
– Whenever a datagram is received
• the checksum is verified to ensure that the
header arrived intact
• The IP header contains a TIME TO LIVE
field used to prevent a datagram from
circulating forever

Department of Information Technology, TIST IT7/ACN/AGK


IP Errors

• The response to a checksum error:


– Datagram is discarded immediately
without more processing
– The receiver cannot trust any fields in
the datagram header
– The receiver cannot send an error
message back to the sender

Department of Information Technology, TIST IT7/ACN/AGK


Internet Control Message Protocol (ICMP)
• IP includes a companion protocol,
ICMP
– It is used to report errors back to the
original source
• IP and ICMP are co-dependent
– IP depends on ICMP to report errors
– and ICMP uses IP to carry error
messages

Department of Information Technology, TIST IT7/ACN/AGK


Error Reporting with ICMP
• When a datagram causes an error,
ICMP can only report the error
condition back to the original
source of the datagram.
• the source must relate the error to
an individual application program
or take other action to correct the
problem.

Department of Information Technology, TIST IT7/ACN/AGK


ICMP Message Format
• Each ICMP message has its own
format,
– All begin with the same three fields:
• TYPE field (8-bit)
– identifies the message, an 8-bit
• CODE field (8-bit)
– provides further information about the
message type
• CHECKSUM field (16 bits).
Department of Information Technology, TIST IT7/ACN/AGK
ICMP Messages with the message number and purpose

7
Department of Information Technology, TIST IT7/ACN/AGK
Echo Request And Reply Message Format

Department of Information Technology, TIST IT7/ACN/AGK


Reports Of Unreachable Destinations

Department of Information Technology, TIST IT7/ACN/AGK


Department of Information Technology, TIST IT7/ACN/AGK
Internet Control Message Protocol (ICMP)
• ICMP contains two message types:
– messages used to report errors
– messages used to obtain information
• example
– Time Exceeded and Destination
Unreachable are for reporting errors
– Echo Request and Echo Reply do not
correspond to an error
• used by the ping application to test
connectivity

Department of Information Technology, TIST IT7/ACN/AGK


ICMP Message Format and Encapsulation
• ICMP uses IP to transport each error message:

Department of Information Technology, TIST IT7/ACN/AGK


ICMP Message Format and Encapsulation

• ICMP messages do not have special


priority
– They are forwarded like any other
datagram, with one minor exception
• If an ICMP error message causes an
error
– no error message is sent

Department of Information Technology, TIST IT7/ACN/AGK

Вам также может понравиться