0% found this document useful (0 votes)
148 views

Govt. S.K.S.J. T. Institute: Department of Electronics and Communication Computer Communication Networks

The document discusses ICMPv4 (Internet Control Message Protocol version 4). It describes ICMPv4's role in reporting errors in IP packets and allowing host/network queries. Specifically: 1) ICMPv4 messages are divided into error reporting messages, which notify senders of packet delivery issues, and query messages, which help hosts/managers gather network information. 2) Common debugging tools like ping and traceroute/tracert use ICMPv4 echo request/reply and time stamp query messages to test network connectivity and track packet routes. 3) ICMPv4 packets contain a header, data, and checksum. The type and code fields indicate the message type and reason, while the data may include the original

Uploaded by

madhu shree m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views

Govt. S.K.S.J. T. Institute: Department of Electronics and Communication Computer Communication Networks

The document discusses ICMPv4 (Internet Control Message Protocol version 4). It describes ICMPv4's role in reporting errors in IP packets and allowing host/network queries. Specifically: 1) ICMPv4 messages are divided into error reporting messages, which notify senders of packet delivery issues, and query messages, which help hosts/managers gather network information. 2) Common debugging tools like ping and traceroute/tracert use ICMPv4 echo request/reply and time stamp query messages to test network connectivity and track packet routes. 3) ICMPv4 packets contain a header, data, and checksum. The type and code fields indicate the message type and reason, while the data may include the original

Uploaded by

madhu shree m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Computer communication networks-17ec64/15ec64

GOVT. S.K.S.J. T. INSTITUTE

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


COMPUTER COMMUNICATION NETWORKS
(17EC64)
TOPIC: ICMPv4
TEAM NUMBER = 06
TEAM MEMBERS: ASHWINI.G.S (1SK17EC003)
JYOTHI. K. N (1SK17EC013)
MADHU. H (1SK17EC018)
MADHUSHREE. M (1SK17EC019)
SUBMITTED TO,
PROF. KRISHNANANDA. L

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 1
Computer communication networks-17ec64/15ec64

CONTENT
INTRODUCTION TO ICMPv4
MESSAGES
 ERROR REPORTING MESSAGES
 QUERY MESSAGES

DEBUGGING TOOLS
 PING
 TRACEROUTE (OR) TRACERT

ICMP CHECKSUM

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 2
Computer communication networks-17ec64/15ec64

INTRODUCTION TO ICMPv4

 IP protocol has no built-in mechanism to


notify the original host.
 The IP protocol also lacks a mechanism for
host and management queries.
 (ICMPv4) has been designed to compensate
for the above two deficiencies.
 It is a companion to the protocol. ICMP itself
is a network-layer protocol.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 3
Computer communication networks-17ec64/15ec64

INTRODUCTION TO ICMPv4

 Messages are not passed directly to the data-


link layer as would be expected.
 The messages are first encapsulated inside IP
datagrams before going to the lower layer.
 When an IP datagram encapsulates an ICMP
message, the value of the protocol field in the
datagram is set to 1 to indicate that the IP
payroll is an ICMP message.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 4
Computer communication networks-17ec64/15ec64

MESSAGES
ICMP messages are divided into two broad
categories.
• Error reporting messages: Report problems that
a router or a host (destination) may encounter
when it processes in IP packet.
• Query messages: Messages, which help a host
or a network manager, get specific information
from a router or another host.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 5
Computer communication networks-17ec64/15ec64

MESSAGES
 An ICMP message has an 8-byte header and a
variable-size data section.
 Type, defines the type of the message. Code
field specifies the reason for the particular
message type.
 The last common field is the checksum field.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 6
Computer communication networks-17ec64/15ec64

ERROR REPORTING MESSAGES

 In error messages the data section carries


information for finding the original packet that
had the error.
 Error messages are always sent to the original
source because the only information available
in the datagram about the route is the source
and destination IP address.
 All error messages contain a data section that
includes the IP header of the original datagram
plus the first 8 bytes of data in that datagram. 7

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 7
Computer communication networks-17ec64/15ec64

ERROR REPORTING MESSAGES


ICMP forms an error packet;
 Destination unreachable: This message uses different
codes (0 to 15) to define the type of error message and the
reason why a datagram has not reached its final
destination.

 Source quench: Informs the sender that the network has


encountered congestion and the datagram has been
dropped.

 Parameter problem: Sent when either there is a problem in


the header of a datagram (code 0) or some options are
missing or cannot be interpreted (code1).

 Redirection message: used when the source uses a wrong


router to send out its messages.
The router redirects the message to the appropriate
router, but informs the source that it needs to change its
default router in the future. The IP address of the default
router is sent in the message.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 8
Computer communication networks-17ec64/15ec64

Figure19.9: contents of data field for the error messages

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 9
Computer communication networks-17ec64/15ec64

QUERY MESSAGES

 Query messages in ICMP can be used


independently without relation to an IP datagram.
 Needs to be encapsulated in a datagram, as a
carrier.
 Used to probe or test the liveliness of hosts or
routers in the internet.
 Find the one way or the roundtrip time of an IP
datagram between two devices, or even find out
whether the clocks in two devices are
synchronised.
 Query messages come in pairs: request and reply.
 The echo request (type 8).
 The echo reply (type 0).

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 10
Computer communication networks-17ec64/15ec64

QUERY MESSAGES
 Pair of messages are used by a host or a router to test the
liveliness of another host or router.
 A host or router sends an echo request message to
another host or router; if the latter is alive, it responds
with an echo reply messages.
 The timestamp request (type 13) and the timestamp reply
(type 14) pair of messages are used to find the round-trip
time between two devices or to check whether the clocks
in two devices are synchronised.
 The timestamp request message sends a 32-bit number,
which defines the time that the message is sent.
 The timestamp reply resends that number, but also
includes two new 32-bit numbers representing the time
the request was received and the time the response was
sent.
 If all the timestamps represent universal time, the sender
can calculate the one-way and round-trip time.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 11
Computer communication networks-17ec64/15ec64

DEBUGGING TOOLS
There are several tools that can be used in the internet
for debugging; we introduce two tools that use ICMP:

Ping: we can use the ping program to find if a host is


alive and responding. We use ping here to see how it uses
ICMP packets.
 The source host sends ICMP echo-request messages;
the destination, if alive, responds with ICMP echo-
reply messages.

 The ping program sets the identifier field in the echo-


request and echoreply message and starts the
sequence number from 0; this number is incremented
by 1 each time a new message is sent.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 12
Computer communication networks-17ec64/15ec64

TRACEROUTE OR TRACERT

 The traceroute program in UNIX or tracert in


windows can be used to trace the path of
packet from a source to the destination.
 It can find the IP address of all the routers that
are visited along the path.
 The program is usually set to check for the
maximum of 30 hops (routers) to be visited.
 The number of hops in the Internet is
normally less than this.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 13
Computer communication networks-17ec64/15ec64

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 14
Computer communication networks-17ec64/15ec64

ICMP CHECKSUM
In ICMP the checksum is calculated over the
entire message (header and data).

Figure 19.12 shows an example of checksum


calculation for a simple echo-request message.
We randomly choose the identifier to be 1 and
the sequence number to be 9. The message is
divided into 16-bit (2-byte) words. The words are
added and the sum is completed. Now the sender
can put this value in the checksum field.

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 15
Computer communication networks-17ec64/15ec64

Compiled by: Prof. Krishnanada L, Dept of ECE, Govt SKSJTI, Bengaluru Page 16

You might also like