ICMP%20 - PowerPoint PPT Presentation

About This Presentation
Title:

ICMP%20

Description:

ICMP is often considered part of the IP layer. Why the ICMP is needed? Lacks of IP ! ... Lack of error control and lack of assistance mechanisms ... – PowerPoint PPT presentation

Number of Views:127
Avg rating:3.0/5.0
Slides: 34
Provided by: appl7
Category:
Tags: icmp | iplayer

less

Transcript and Presenter's Notes

Title: ICMP%20


1
ICMP ICMPv6
  • 2008. 3. 7
  • DPNM Lab.
  • Byungchul Park (fates_at_postech.ac.kr)

2
ICMP
  • Internet Control Message Protocol

3
Introduction
  • 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, e-mail, etc
Transport TCP, UDP
Network IP, ICMP, IGMP
Link device driver and interface card
4
Introduction
  • 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
  • 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.
6
ICMP Messages (cont.)
  • Types of Messages

Category Type Message
Error-reporting message 3 Destination unreachable
Error-reporting message 4 Source quench
Error-reporting message 11 Time exceeded
Error-reporting message 12 Parameter problem
Error-reporting message 5 Redirection
Query message 8 or 0 Echo request or reply
Query message 13 or 14 Timestamp request and reply
Query message 17 or 18 Address mask request and reply
Query message 10 or 9 Router solicitation and advertisement
7
Message Format
  • ICMP Message Format

Type message type(8 bit) Code specify
the reason for the particular message Checksum
16 bit
8
Message Format
  • ICMP common field and message 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
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.
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
  • Destination Unreachable

Code Field the reason for discarding the
datagram
code Reasons for error
0 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
  • 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 specificCode 1
Host specificCode 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
  • ICMP Internet Control Message Protocol

Diagnose some network problems Query
messages
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, (04,294,967,295), but a timestamp in this
case cannot exceed 86,400,000 24x60x60x1000.
22
Query
  • 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 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 8000000016, 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
  • Router solicitation and Advertisement

General format of ICMPv6 messages
29
Error Reporting
  • Router solicitation and Advertisement

30
Error Reporting
  • Comparison Error Reporting function between v4
    and v6

Type of Message V4 V6
Destination unreachable Yes Yes
Source quench Yes No
Packet too big No Yes
Time exceeded Yes Yes
Parameter problem Yes Yes
Redirection Yes Yes
31
Query
  • ICMPv6 Internet Control Message Protocol version
    6

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


Type of Message V4 V6
Echo request and reply Yes Yes
Timestamp request and reply Yes No
Address mask request and reply Yes No
Router solicitation Yes Yes
Neighbor solicitation ARP Yes
Group membership IGMP Yes
33
?
Write a Comment
User Comments (0)
About PowerShow.com