cnap 1 08 icmp protocol

Upload: khiem-nguyen

Post on 06-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Cnap 1 08 ICMP Protocol

    1/7

    1

    Module 8

    TCP/IP Suite Error

    and

    Control Messages

    2

    Objectives

    Describe ICMP

    Describe the ICMP message format

    Identify ICMP error message types

    Identify potential causes of specific ICMP errormessages

    Describe ICMP control messages

    Identify a variety of ICMP control messages used innetworks today

    Determine the causes for ICMP control messages

    3

    Table of Content

    TCP/IP Suite Control Messages2

    Overview of TCP/IP Error Message1

    4

    OVERVIEW

    OF

    TCP/IP ERROR MESSAGES

  • 8/3/2019 Cnap 1 08 ICMP Protocol

    2/7

    5

    Internet Control Message Protocol (ICMP)

    Transport

    Network

    IP

    TCP UDP

    ICMPARP RARP

    Destination unreachableEcho (Ping)Others

    ICMP is the component of the TCP/IP protocol stack

    that addresses this basic limitation of IP.

    Used to report these errors back to the source of thedatagram.

    An error reporting protocol for IP.6

    Error reporting and error correction

    Workstation 6

    CA

    Workstation 1

    Fa0/0

    ICMP

    Destinationunreachable

    IP

    ICMP reports on the status of the delivered packet

    only to the source device. It does not propagate information about network

    changes to routers.

    Does not correct the encountered network problem

    C

    7

    Encapsulation of an ICMP in an IP packet

    Datagram Header ICMP Header ICMP DataFrame Header

    Option Data

    Option Header

    Code

    8

    Checksum

    16

    Type

    310

    8

    Destination unreachable

    CA

    To Z

    Send DataTo Z

    I don not knowHow to get to Z!

    Send ICMP

    Data network

    Destinationunreachable

    An ICMP destination unreachable message is send if:

    Host or port unreachable.

    Network unreachable.

  • 8/3/2019 Cnap 1 08 ICMP Protocol

    3/7

    9

    Destination unreachable message

    Internet Header + First 64 bits of datagram

    Code(0-12)

    8

    Checksum

    16

    Unused (must be zero)

    Type(3)

    310

    The value of 3 in the type field indicates it is adestination unreachable message.

    The code value indicates the reason the packetcould not be delivered.

    10

    Code values for destination unreachable message

    Host unreachable for type of device12

    Network unreachable for type of device11

    Communication with destination network administratively prohibited10

    Communication with destination network administratively prohibited9

    Source Host Isolated8Destination host unknown7

    Destination network unknown6

    Source route failed.5

    Fragmentation needed and DF set.4

    Port unreachable.3

    Protocol unreachable.2

    Host unreachable.1

    Net unreachable.0

    DescriptionCode

    1

    1

    Using ping to test destination reachability

    ACA

    Is Breachable

    Yes, I amhere.

    B

    ICMP echo reply

    ICMP echo request

    1

    2

    ICMP echo messages

    Sequence numberIdentifier

    Option Data

    Code (0)

    8

    Checksum

    16

    Type (0 or 8)

    310

    The value of 0 in the type field indicates it is theecho request.

    The value of 8 in the type field indicates it is theecho reply.

  • 8/3/2019 Cnap 1 08 ICMP Protocol

    4/7

    13

    Miscellaneous error reporting

    Unused ( Must be zero)Pointer

    Internet Header + First 64 bits of datagram

    Code (0-2)

    8

    Checksum

    16

    Type (12)

    310

    Parameter problem.

    When the code value is 0, the pointer field indicatesthe octet of the datagram that produced the error.

    14

    Detecting excessively long routes

    When the TTL of the datagram value reaches zero, thepacket is discarded.

    ICMP uses a time exceeded message to notify thesource device that the TTL of the datagram has beenexceeded

    1

    5

    TCP/IP SUITE CONTROL MESSAGES

    1

    6

    ICMP Type of Control messages

    Address Mask Reply18

    Address Mask Request17

    Information Reply16

    Information Request15

    Timestamp reply.14

    Timestamp.13

    Parameter problem.12

    Time exceeded.11

    Router Selection10

    Routers advertisment9

    Echo Request8

    Redirect / Change request5

    Source quench.4

    Destination unreachable.3

    Echo reply.0

    DescriptionType

    Unlike error messages, controlmessages are used to informhosts of conditions such asnetwork congestion or theexistence of a better gateway to a

    remote network.

    Like all ICMP messages, ICMPcontrol messages areencapsulated within an IPdatagram.

    ICMP uses IP datagrams in orderto traverse multiple networks.

  • 8/3/2019 Cnap 1 08 ICMP Protocol

    5/7

    17

    ICMP redirect/change requests

    Router A

    172.16.1.100 172.16.1.200E0 E0

    172.16.1.1/24

    Default GW:172.16.1.100

    10.0.0.1/8C

    B

    Router B

    Router A sends an ICMP redirect/change request toHost B telling it to use Router B as the gateway toforward all future requests to network 10.0.0.0/8.

    18

    Conditions to send ICMP redirect/change request

    Default gateways only send ICMP redirect/change requestmessages if the following conditions are met:

    The interface on which the packet comes into the router isthe same interface on which the packet gets routed out.

    The subnet/network of the source IP address is the samesubnet/network of the next-hop IP address of the routedpacket.

    The datagram is not source-routed.

    The route for the redirect is not another ICMP redirect or adefault route.

    The router is configured to send redirects. (By default,Cisco routers send ICMP redirects. The interfacesubcommand no ip redirects will disable ICMP redirects.)

    1

    9

    The ICMP redirect/change request message

    Internet Header + First 64 bits of datagram

    Router Internet address

    Code (0-3)

    8

    Checksum

    16

    Type (5)

    310

    The Router Internet Address field in the ICMPredirect is the IP address that should be used as thedefault gateway for a particular network.

    2

    0

    Clock synchronization and transit time estimation

    Transit Timestamp

    Sequence numberIdentifier

    Receive Timestamp

    Originate Timestamp

    Code (0)

    8

    Checksum

    16

    Type (13 or 14)

    310

    Allows a host to ask for the current time accordingto the remote host.

    More robust protocols such as Network TimeProtocol (NTP) at the upper layers of the TCP/IPprotocol stack perform clock synchronization in a

    more reliable manner.

  • 8/3/2019 Cnap 1 08 ICMP Protocol

    6/7

    21

    Information requests and reply message formats

    Sequence numberIdentifier

    Code (0)

    8

    Checksum

    16

    Type (15 or 16)

    310

    Originally intended to allow a host to determine itsnetwork number, is considered obsolete.

    Other protocols such as BOOTP and Dynamic HostConfiguration Protocol (DHCP) are now used to allowhosts to obtain their network numbers.

    22

    Address mask requirements

    Address Mask

    Sequence numberIdentifier

    Code (0)

    8

    Checksum

    16

    Type (17 or 18)

    310

    Subnet mask is crucial in identifying network,subnet, and host bits in an IP address.

    If a host does not know the subnet mask, it maysend an address mask request to the local router orbroadcast.

    When the router receives the request, it will respondwith an address mask reply. This address mask replywill identify the correct subnet mask.

    2

    3

    Router discovery message

    Preferences Level 2

    Router address 2Preferences Level 1

    Router address 1

    LifetimeAddress entry

    sizeNumber ofaddresses

    Code (0)

    8

    Checksum

    16

    Type (9)

    310

    Hosts use router discovery message to learn of availablerouters (gateway).

    Using the multicast address 224.0.0.2 as the destinationaddress. May also be broadcast.

    If router that does not support the discovery process, the

    solicitation will go unanswered. 24

    Router solicitation message

    Reversed

    Code (0)

    8

    Checksum

    16

    Type (10)

    310

    A host generates an ICMP router solicitation message in

    response to a missing default gateway.This message is sent via multicast and it is the first step inthe router discovery process.

    A local router will respond with a router advertisementidentifying the default gateway for the local host.

  • 8/3/2019 Cnap 1 08 ICMP Protocol

    7/7

    25

    Congestion and flow control messages

    High speedLAN

    Slow

    link

    Network congestion isexperienced at the WAN link

    ICMP source-quench messages are used to reducethe amount of data lost.

    The source-quench message asks senders to reducethe rate at which they are transmitting packets.

    Most Cisco routers do not send source-quenchmessages by default

    26

    Summary

    IP uses Internet Control Message Protocol (ICMP) to notifythe sender of data that there was an error in the deliveryprocess.

    ICMP messages are transmitted using the IP protocol sotheir delivery is unreliable.

    ICMP echo request and echo reply messages allow thenetwork administrator to test IP connectivity to aid in thetroubleshooting process.