CCNA2 3.1-08 TCPIP Suite Error and Control Messages
Download
Report
Transcript CCNA2 3.1-08 TCPIP Suite Error and Control Messages
Module 8
TCP/IP Suite Error and
Control Messages
Version 3.1 modified by Brierley
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.
• Nothing in its basic design allows IP to notify the sender that a
data transmission has failed.
Version 3.1 modified by Brierley
2
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 is provided by the 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.
Version 3.1 modified by Brierley
3
Internet Control Message Protocol (ICMP)
• Does not correct the encountered network problem; it merely
reports the problem.
• 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
Version 3.1 modified by Brierley
4
ICMP Messages
• 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.
Version 3.1 modified by Brierley
5
Network Communication
Depends upon certain basic conditions being met.
• First, the sending and receiving devices must have the TCP/IP
protocol stack.
– proper configuration of an IP address and subnet mask
– A default gateway must also be configured if datagrams are
to travel outside of the local network.
(continued)
Version 3.1 modified by Brierley
6
Network Communication
Depends upon certain basic conditions being met
• Second, intermediary devices (routers) must be in place to
route the datagram from the source device through 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.
Version 3.1 modified by Brierley
7
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 be addressing the datagram to a
non-existent IP address
– the default gateway may not be configured correctly
– the destination device may be disconnected from its network
– the routers interface is down
– the router does not have adequate information necessary to
find the destination network.
Version 3.1 modified by Brierley
8
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
Trash
Version 3.1 modified by Brierley
9
ICMP Echo Request (PING)
• Can be used to test the availability of a particular destination.
• An ICMP echo request message (ping) is sent to the
destination device.
– If received - the ICMP echo request formulates an echo reply
message back to the source.
– If the sender receives the echo reply, this confirms the destination
device can be reached via the IP protocol.
Version 3.1 modified by Brierley
10
ICMP Echo Request (PING)
Version 3.1 modified by Brierley
11
ICMP Echo Request (PING)
Version 3.1 modified by Brierley
12
ICMP Echo Request (PING)
Version 3.1 modified by Brierley
13
ICMP Echo Request (PING)
Version 3.1 modified by Brierley
14
ICMP Echo Request (PING)
Version 3.1 modified by Brierley
15
ICMP Request / Reply Message
• ICMP messages have special formats.
Type
Code
Checksum
Identifier
Sequence
Number
Data
• 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
Type (8 bits)
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
Code (8 bits)
IMCP Header Checksum (16 bits)
Identifier (16 bits)
Sequence Number (16 bits)
Optional Data (variable length)
Version 3.1 modified by Brierley
16
ICMP Message Types
Version 3.1 modified by Brierley
17
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
Version 3.1 modified by Brierley
18
ICMP Codes
Version 3.1 modified by Brierley
19
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)
Version 3.1 modified by Brierley
20
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.)
Version 3.1 modified by Brierley
21
ICMP redirect/change request messages
• Host B sends a packet to
Host C on network
10.0.0.0/8.
• Since Host B is not
directly connected to the
same network, it
forwards the packet to its
default gateway, Router
A.
• Router A finds the
correct route to network
10.0.0.0/8 by looking into
its route table.
Host C
Router A
Router B
Host B
(continued)
Version 3.1 modified by Brierley
22
ICMP redirect/change request messages
•
It determines that the path
to the network is back
through the same interface
that the request to forward
the packet came from.
•
It forwards the packet and
sends an ICMP
redirect/change request to
Host B telling it to use
Router B as the gateway to
forward all future requests
to network 10.0.0.0/8.
Version 3.1 modified by Brierley
Host C
Router A
Router B
Host B
23
ICMP Timestamp Message
Hosts on different networks who are trying to communicate using
software that requires time synchronization can sometimes
encounter problems.
• The timestamp request message allows a host to ask for the
current time according to the remote host.
• Remote hosts use the 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 transmit time.
Version 3.1 modified by Brierley
24
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.
Version 3.1 modified by Brierley
25
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.
Version 3.1 modified by Brierley
26
ICMP 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.
Version 3.1 modified by Brierley
27
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).
Version 3.1 modified by Brierley
28
Module 8
TCP/IP Suite Error and
Control Messages
End
Version 3.1 modified by Brierley
29