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

Lecture 5

ICMP provides error reporting and querying capabilities for IP networks. It uses various message types, including destination unreachable (type 3) for error reporting when a datagram cannot reach its destination, and echo request/reply (types 8 and 0) for querying the reachability of other hosts and routers. While ICMP does not correct errors, it helps network devices and administrators troubleshoot issues by notifying senders of problems via error messages or allowing nodes to discover their network neighbors through query messages.

Uploaded by

relam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Lecture 5

ICMP provides error reporting and querying capabilities for IP networks. It uses various message types, including destination unreachable (type 3) for error reporting when a datagram cannot reach its destination, and echo request/reply (types 8 and 0) for querying the reachability of other hosts and routers. While ICMP does not correct errors, it helps network devices and administrators troubleshoot issues by notifying senders of problems via error messages or allowing nodes to discover their network neighbors through query messages.

Uploaded by

relam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

IT Infrastructure Management

(Lecture 5)

© The McGraw-Hill Companies, Inc., 2000


ICMP & DHCP

2
19.2 ICMPv4

1. The IPv4 has no error-repor2ng or error-correc2ng mechanism.


• What happens if something goes wrong?
• What happens if a router must discard a datagram because it cannot ?nd a
route to the ?nal des2na2on, or because the 2me-to-live ?eld has a zero value?

20.3
19.2
ICMPv4

• What happens if the Cnal desFnaFon host must discard the received fragments of a datagram
because it has not received all fragments within a predetermined Fme limit?

 These are examples of situaFons where an error has occurred and the IP protocol has no built-in

mechanism to noFfy the original host.

20.4
19.2 ICMPv4

2. The IP protocol also lacks a mechanism for host and management queries.
• A host sometimes needs to determine if a router or another host is
alive. And someFmes a network manager needs informaFon from another host or
router.

• The Internet Control Message Protocol version 4 (ICMPv4) has been


designed to compensate for the above two deCciencies.

20.5
19. 2 ICMPv4

Important: ICMP messages are not passed directly to the data-link layer.

The messages are Brst encapsulated inside IP datagrams before going to the lower layer.

20.6
19.2.1
MESSAGES
ICMP messages are divided into two broad categories:
1. The error-repor2ng messages report problems that a router or a host (des2na2on)
may encounter when it processes an IP packet.
2. The query messages, which occur in pairs, help a host or a network manager get
speci?c informa2on from a router or another host.
1. For example, nodes can discover their neighbors.
2. Also, hosts can discover and learn about routers on their network and routers can
help a node redirect its messages.

20.7
Figure 19.8: General format of ICMP
messages

8 bits 8 bits 16 bits


8 bits 8 bits 16 bits
Type Code Checksum
Type Code Checksum
Identifier Sequence number

o
Rest of the header

Data section Data section

Error-reporting messages Query messages

20.8
19.2.1 Error Repor2ng Messages

• ICMP does not correct errors, it simply reports them. Error correcFon is leS to the higher-level
protocols. u A
I
am
• All error messages contain a data secFon that includes the IP header of the original datagram plus the
Crst 8 bytes of data in that datagram.
am
Tn
je

O
• The 8 bytes of data are included because the Crst 8 bytes provide informaFon about the port numbers

g
(UDP and TCP) and sequence number (TCP).

20.9
Figure 19.9: Contents of data field for the error messages

er
NetworkHer

85
i es
ands
ie
render

an a sow
w w.whisiax
a
20.10
19.2.1 Error Repor2ng Messages

• To make the error-reporFng process simple, ICMP follows some rules in reporFng messages.
1. No ICMP error message will be generated in response to a datagram carrying an

É
ICMP error message.
immacome
2.
É
No ICMP error message will be generated for a fragmented datagram that is not

9
the ?rst fragment.

3. No ICMP error message will be generated for a datagram having a mul2cast


address or special address such as 127.0.0.0 or 0.0.0.0.

no multig
Cost
20.11
1 Des2na2on Unreachable
C WE
G
• The most widely used error message is the desFnaFon unreachable (type 3). This message uses
diWerent codes (0 to 15) to deCne the type of error message and the reason why a datagram has not
by
reached its Cnal desFnaFon. É

i
• For example, code 0 tells source that a host is unreachable.

• This may happen, for example, when we use the HTTP protocol to access a web page, but the server is
down.
i

20.12
2 Source Quench
t.no
h at
• It is (type 4) message. W new
p

My
i six's
j
• It informs the sender that the network has encountered congesFon and the datagram has been
dropped; the source needs to slow down sending more datagrams.
G
• In other words, ICMP adds a kind of congesFon control mechanism to the IP protocol by using this type
of message.
83

20.13
3 Redirec2on Message
we I
• It is (type 5) message.
msn.sk
• Used when the source uses a wrong router to send out its message.
• The router redirects the message to the appropriate router, but informs the source that it needs to
change its default router in the future.

20.14
20.15
0
4 Time Exceeded Message

• It is (type 11) message.

• When the TTL value becomes 0, the datagram is dropped by the visiFng router and a Fme exceeded
message with code 0 is sent to the source to inform it about the situaFon.

TTLon a
• The Fme-exceeded message (with code 1) can also be sent when not all fragments of a datagram arrive
within a predeCned period of Fme.

GM H u

20.16
5 Parameter Problem

• It is (type 12) message.


• Sent when either there is a problem in the header of a datagram (code 0) or some opFons are missing or
cannot be interpreted (code 1).

20.17
Query Messages

• Query messages are used to probe or test the liveliness of hosts or routers in the Internet, Cnd the one-
way or the round-trip Fme for an IP datagram between two devices, or

• even Cnd out whether the clocks in two devices are synchronized.

• Query messages come in pairs: request and reply.

20.18
Query Messages

• The echo request (type 8) and the echo reply (type 0) 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 la_er is alive, it
responds with an echo reply message.

• Ping and traceroute applicaFons


v
Jeb
go
20.19
Query Messages

• The echo request (type 8) and the echo reply (type 0) 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 la_er is alive, it
responds with an echo reply message.

20.20
FMI

They
Reporting
error
zi.sk s
unrecnableCoto's
pistenaition down nap regest type
type 3
server
ex
cannon

type
source
y
said
anarchy

up
co trio
ÉffetIl rode
iii
timeendedmassage.de
notaugment
time
arrivein

bcodeen optionsmissingorinterprets
problem
18.4.4 DHCP

A^er a block of addresses are assigned to an organiza2on, the network administra2on


can manually assign addresses to the individual hosts or routers. However, address
assignment in an organiza2on can be done automa2cally using the Dynamic Host
Con?gura2on Protocol (DHCP). DHCP is an applica2on-layer program, using the client-
server paradigm, that actually helps TCP/IP at the network layer.

20.21
Figure 18.25: DHCP message format

20.22
Figure 18.26: Option format

20.23
U
Figure 18.27: Operation of DHCP
e a

a
4 g

Gg
j_ is
as
ease s

an sis

a
É

ow is
spans six

20.24
as

You might also like