Nothing Special   »   [go: up one dir, main page]

TCP/IP Suite Error and Control Messages

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 28

Module 8

TCP/IP Suite Error and


Control Messages

1
Version 3.1
Internet Protocol (IP)
• IP is an unreliable method for delivery of network data.
• It is known as a best effort delivery mechanism.
• It has no built-in processes to ensure that data is delivered in
the event that problems exist with network communication.
• Nothing in its basic design allows IP to notify the sender that a
data transmission has failed.

2
Version 3.1
Internet Control Message Protocol (ICMP)
• ICMP is the component of the TCP/IP protocol stack that
addresses the basic limitation of IP.
– ICMP does not overcome the unreliability issues in IP.
– Reliability must be provided by upper layer protocols if it is
needed.
• It is an error reporting protocol for IP.
• When datagram delivery errors occur, ICMP is used to report
these errors back to the source of the datagram.

3
Version 3.1
Internet Control Message Protocol (ICMP)
• ICMP does not correct the encountered network problem; it
merely reports the problem.
• It does not propagate information about network changes to
routers.
• ICMP messages are encapsulated into datagrams in the same
way any other data is delivered using IP.
• Errors created by ICMP messages do not generate their own
ICMP messages.
• For this reason, it is possible to have a datagram delivery error
that is never reported back to the sender

4
Version 3.1
ICMP Messages
• There are two types of ICMP messages:
– Error messages - are the results of lost packets or error
conditions which occur during packet transmission
– Control messages- are used to inform hosts of conditions
such as network congestion or the existence of a better
gateway to a remote network.

5
Version 3.1
Network Communication
Network communication depends upon certain basic conditions
being met.
• First, the sending and receiving devices must have the TCP/IP
protocol stack properly configured.
– installation of the TCP/IP protocol
– proper configuration of IP address and subnet mask
– A default gateway must also be configured if datagrams are
to travel outside of the local network.

6
Version 3.1
Network Communication
Network communication depends upon certain basic conditions
being met.
• Second, intermediary devices (a router) must be in place to
route the datagram from the source device and its network to
the destination network. A router also must have the TCP/IP
protocol properly configured on its interfaces, and it must use
an appropriate routing protocol.

7
Version 3.1
Destination Unreachable
• If a destination network is not accessible, it is said to be an
unreachable network.
• Possible causes of failure:
– the sending device may address the datagram to a non-
existent IP address
– Default gateway may not be configured correctly
– the destination device may be disconnected from its network
– routers interface is down
– the router does not have the information necessary to find
the destination network.

8
Version 3.1
Destination Unreachable
• If a host or network is unreachable:
– A reply will be sent by the router to the sending host  Destination
Unreachable
– The packet will be dropped
– No further ICMP messages will be sent as a result of this
transaction

D
at
a
Pa
ck
te

Trash

9
Version 3.1
ICMP Echo Request (PING)
• The ICMP protocol can be used to test the availability of a
particular destination.
• An ICMP echo request message (initiated using the ping
command) is sent to the destination device.
• If the destination device receives the ICMP echo request, it
formulates an echo reply message to send back to the source
of the echo request.
• If the sender receives the echo reply, this confirms that the
destination device can be reached via the IP protocol.

10
Version 3.1
ICMP Echo Request (PING)

11
Version 3.1
ICMP Echo Request (PING)

12
Version 3.1
ICMP Echo Request (PING)

13
Version 3.1
ICMP Echo Request (PING)

14
Version 3.1
ICMP Echo Request (PING)

15
Version 3.1
ICMP Request / Reply Message
• As with any type of packet, ICMP messages have special
formats.
Sequence
Type Code Checksum Identifier Data
Number

• All ICMP message formats start with these same three fields:
– Type - indicates the type of ICMP message being sent
– Code - indicates the reason the packet could not be delivered
– Checksum - used to verify the integrity of the data
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Type (8 bits) Code (8 bits) IMCP Header Checksum (16 bits)
Identifier (16 bits) Sequence Number (16 bits)

Optional Data (variable length)

16
Version 3.1
ICMP Message Types

17
Version 3.1
ICMP Message Types
• Common ICMP messages:
– Echo - used by the ping utility to test the connection between two
devices
– Echo reply - reply to a ping
– Destination unreachable - a variety of reasons cause a destination
to be unreachable (unavailable port, unknown network, etc.)
– Source quench - tells the data source to reduce its transmission
rate
– Redirect - informs the source of a better route to the destination
– Time exceeded - sent when a packet's time-to-live (TTL) reaches
zero

18
Version 3.1
ICMP Codes

19
Version 3.1
Destination Unreachable Message
• Datagrams cannot always be forwarded to their destinations.
• If ICMP delivers back to the sender a destination unreachable
message the problem could be:
– hardware failures
– improper protocol configuration
– down interfaces
– incorrect routing information
– packet fragmentation is required in order to forward a packet
– IP related services such as FTP or Web services are unavailable
(application layer processes)

20
Version 3.1
ICMP redirect/change request messages
• Default gateways only send ICMP redirect/change request
messages if the following conditions are met:
– The interface on which the packet comes into the router is the
same interface on which the packet gets routed out.
– The subnet/network of the source IP address is the same
subnet/network of the next-hop IP address of the routed packet.
– The datagram is not source-routed.
– The route for the redirect is not another ICMP redirect or a default
route.
• The router is configured to send redirects. (By default, Cisco
routers send ICMP redirects. The interface subcommand no
ip redirects will disable ICMP redirects.)

21
Version 3.1
ICMP redirect/change request messages
• Host B sends a packet to Host C
Host C on network
10.0.0.0/8.
• Since Host B is not
directly connected to the
Router Router
same network, it A B
forwards the packet to its
default gateway, Router
A.
Host B
• Router A finds the
correct route to network
10.0.0.0/8 by looking into
its route table.

22
Version 3.1
ICMP redirect/change request messages
• It determines that the path Host C
to the network is back out
the same interface the
request to forward the
packet came from.
• It forwards the packet and Router Router
sends an ICMP A B
redirect/change request to
Host B telling it to use
Router B as the gateway to
forward all future requests Host B
to network 10.0.0.0/8.

23
Version 3.1
ICMP Timestamp Message
• Hosts on different networks who are trying to communicate
using software that requires time synchronization can
sometimes encounter problems.
• The ICMP timestamp request message allows a host to ask for
the current time according to the remote host.
• The remote host uses an ICMP timestamp reply message to
respond to the request.
• All ICMP timestamp reply messages contain the originate,
receive and transmit timestamps.
• Using these three timestamps, the host can estimate transit
time across the network by subtracting the originate time from
the transit time.
24
Version 3.1
ICMP Information Requests
and Reply Messages
• The ICMP information requests and reply messages were
originally intended to allow a host to determine its network
number.
• It is now considered obsolete.
• Other protocols such as BOOTP and Dynamic Host
Configuration Protocol (DHCP) are now used to allow hosts to
obtain their network numbers.

25
Version 3.1
ICMP Address Request
• If a host does not know the subnet mask, it may send an
address mask request to the local router.
• If the address of the router is known, this request may be sent
directly to the router.
• Otherwise, the request will be broadcast.
• When the router receives the request, it will respond with an
address mask reply.
• This address mask reply will identify the correct subnet mask
from which the request was received.

26
Version 3.1
ICMP Router Discovery
• When a host on the network boots, and the host has not been
manually configured with a default gateway, it can learn of
available routers through the process of router discovery.
• This process begins with the host sending a router solicitation
message to all routers, using the multicast address 224.0.0.2
as the destination address.
• When a router that supports the discovery process receives the
router discovery message, a router advertisement is sent in
return.

27
Version 3.1
ICMP Source-Quench Messages
• ICMP source-quench messages are used to reduce the amount
of data lost due to congestion on the network.
• The source-quench message asks senders to reduce the rate
at which they are transmitting packets.
• ICMP source-quench messages can be sent by the host or
router (gateway).

28
Version 3.1

You might also like