Download WWW Tutorial

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Digital signature wikipedia , lookup

One-time pad wikipedia , lookup

Grill (cryptology) wikipedia , lookup

Coding theory wikipedia , lookup

Transcript
Internet Control Message Protocol
(ICMP)
Objective
IP and ICMP
 Why need ICMP?
 ICMP Message Format
 ICMP fields
 Examples:

» Ping
» Traceroute
ICMP and IP
Why ICMP?

IP provides an unreliable, connectionless datagram
delivery service.

Datagram travels from gateway to gateway until it
reaches the destination host’s network, where it would
be sent directly.

Question is: What happens if a gateway cannot route or
deliver a datagram or if the gateway detects an unusual
condition like network congestion?
Why ICMP? (cont.)

What mechanisms are there in TCP/IP suite for a
gateway to inform the sender about an error in the
IP Datagram deliver?

How do gateways use the mechanism to report
delivery problems and how do hosts use it to test
whether or not destinations are reachable?
Why ICMP? (cont.)

In a connectionless system each gateway operates
autonomously, routing or delivering datagrams without
any coordination from the sender.

When the system works well there is nothing to worry.

Murphy’s Law: If things can go wrong, they will.
Why ICMP? (cont.)

The designers separated such a mechanism from IP
to simplify the main-stream IP.

The special-purpose mechanism --- Internet Control
Message Protocol (ICMP) --- is considered a required
part of IP and must be included in every IP
implementation.

How do these ICMP messages travel?
 of course using IP services
Why ICMP? (cont.)

The destination of an ICMP message is not an
application program or user, but the IP software on
that machine.

The ICMP allows gateways to send error or control
messages to other gateways or hosts; ICMP provides
communication between the IP software on one
machine and the IP software on another.
Error Reporting vs. Error Correction

ICMP only reports error conditions to the original
source; the source must relate errors to individual
application programs and take action to correct the
problem.

ICMP reports problems to the original source even if
they are due to misbehaving intermediate gateways.
This is due to the format of the IP header that has
information about the source and destination and not
the record of path.
ICMP Message Format

8-bit integer message TYPE that identifies the message

8-bit CODE field that provides further information about
the message type

16-bit CHECKSUM field (additive checksum covering
the ICMP part of the message one’s complement sum of
all 16-bit words in the header beginning with checksum
of zero)
ICMP Message Encapsulation
HEADER
HEADER
HEADER
ICMP DATA
DATAGRAM DATA AREA
FRAME DATA AREA
Physical layer
Message Types
0
3
4
5
8
11
12
Echo Reply
Destination Unreachable
Source Quench
Redirect (change a route)
Echo Request
Time Exceeded for a Datagram
Parameter Problem on a Datagram
Message Types (cont.)
13
14
15
16
17
18
Timestamp Request
Timestamp Reply
Information Request (obsolete)
Information Reply (obsolete)
Address Mask Request
Address Mask Reply
ICMP Echo Request/Echo Reply


Testing Destination Reachability and Status
 A debugging aid for network managers: echo
request and echo reply (ping command)
Echo Request and Reply Message Format
 TYPE 8
for request
 TYPE 0
for reply
ICMP Formats (cont.)
Reports of Unreachable Destinations
Unreachability of what?

Code Value
Meaning
=========
================
0 network unreachable
1 host unreachable
2 protocol unreachable
3 port unreachable
ICMP Formats (cont.)
4
5
6
7
8
9
10
fragmentation needed and DF set
source route failed
destination network unknown
destination host unknown
source host isolated
communication with destination
network administratively prohibited
communication with destination host
administratively prohibited
Congestion and Datagram Flow Control

Usually, congested gateways send one source quench
message for every datagram that they discard.

A source quench message is a request for the source
to reduce its current rate of datagram transmission.

No reversal of ICMP source quench request. A host
lowers the rate at which it sends on the receipt of a
source quench messages; it then gradually increases
the rate as long as no further source quench are
received.
ICMP Source
Type (4)
Code (0)
Quench Format
Checksum
Unused, must be zero
Internet Header + First 64 bits of datagram
...
Sent each time a datagram is discarded
ICMP Redirect Message
Type (5)
Code (0-3)
Checksum
Gateway Internet Address
Internet Header + First 64 bits of datagram
...
ICMP Redirect Message
net3
net1
R1
Host A
net2
R2
If Host A sends a packet destined to net3 to R2 Then
1. R2 relays the packet to R1
2. R2 sends ICMP redirect message to Host A
3. A should update its Routing Table with the entry
(Network ID:net3; Next Hop: R1)
ICMP Time Exceeded message

sent whenever a datagram is discarded because TTL
reached zero, using Type 11- Code 0

sent when time set to collect fragments belonging to a
particular packet expires, using Type 11 - Code 1
Clock Synchronization and Transit Time Estimation

A machine can obtain time from another machine, using
timestamp request message.

Time stamp is a 32-bit quantity representing m-seconds
elapsed since midnight. The receiving machine
responds with timestamp reply message, which
contains originate, receive, and transmit timestamps,
with proper request-reply message association.
Obtaining a Subnet Mask
A host can send an address mask request
message to a gateway and receive address
mask reply message. Such a message can be
sent directly or broadcast, using type 17 for
request 18 for reply, and code 0
Utilities that Use ICMP

PING: sends ICMP Echo Requests and
monitors ICMP Echo Replies

TraceRoute: Sends a sequence of ICMP Echo
Requests with increasing TTL values starting
from 1 and monitors the ICMP Time Exceeded
Messages (reported by routers along the path
to destination) or ICMP Echo Reply from
destination