SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Internet Control Message
      Protocol ICMP




   The Internet Control Message Protocol (ICMP) is a control
protocol that is considered to be an integral part of IP, although
it is architecturally layered upon IP - it uses IP to carry its data
      end-to-end. ICMP provides error reporting, congestion
            reporting, and first-hop router redirection.

                                                                   1
Introduction
 IP provides best-effort delivery
 Delivery problems can be ignored;
 datagrams can be "dropped on the floor"
 Internet Control Message Protocol (ICMP)
 provides error-reporting mechanism




                                2
IP and ICMP




              3
ICMP Features
 ICMP uses IP as if ICMP were a higher-
 level protocol (that is, ICMP messages are
 encapsulated in IP datagrams). However,
 ICMP is an integral part of IP and must be
 implemented by every IP module.
 ICMP is used to report some errors, not to
 make IP reliable. Datagrams may still be
 undelivered without any report on their
 loss. Reliability must be implemented by
 the higher-level protocols that use IP.
                                 4
ICMP Features
 ICMP can report errors on any IP datagram
 with the exception of ICMP messages, to
 avoid infinite repetitions.
 For fragmented IP datagrams, ICMP
 messages are only sent about errors on
 fragment zero. That is, ICMP messages
 never refer to an IP datagram with a non-
 zero fragment offset field.


                                5
ICMP Features
 ICMP has rules regarding error message
 generation to prevent broadcast storms
 ICMP messages are never sent in response to
 datagrams with a destination IP address that is a
 broadcast or a multicast address.
 ICMP messages are never sent in response to a
 datagram which does not have a source IP
 address which represents a unique host. That is,
 the source address cannot be zero, a loopback
 address, a broadcast address or a multicast
 address.
                                      6
Error Message Generation
Rules
 ICMP errors messages are not generated
 in response to
   an ICMP error message
   datagrams destined to an IP broadcast
   address
   datagrams sent as a link-layer broadcast
   a fragment other than the first
   a datagram whose source address does not
   define a single host

                                  7
ICMP Features
 ICMP messages are never sent in response to
 ICMP error messages. They may be sent in
 response to ICMP query messages (ICMP types
 0, 8, 9, 10 and 13 through 18).
 RFC 792 states that ICMP messages “may” be
 generated to report IP datagram processing
 errors, not “must”. In practice, routers will almost
 always generate ICMP messages for errors, but
 for destination hosts, the number of ICMP
 messages generated is implementation
 dependent.
                                         8
ICMP Message Format
ICMP messages are described in RFC 792 and RFC 950,
belong to STD 5 and are mandatory.
ICMP messages are sent in IP datagrams. The IP header
will always have a Protocol number of 1, indicating ICMP
and a type of service of zero (routine). The IP data field will
contain the actual ICMP message in the format shown in
the figure below:




                                                9
ICMP Message Transport
 ICMP encapsulated in IP
 But ... how can that work?
 ICMP messages sent in response to incoming
 datagrams with problems
 ICMP message not sent for ICMP message




                                   10
Error Detection
 Internet layer can detect a variety of errors:
    Checksum (header only!)
    TTL expires
    No route to destination network
    Can't deliver to destination host (e.g., no ARP
    reply)
 Internet layer discards datagrams with problems
 Some - e.g., checksum error - can't trigger error
 messages

                                        11
Types of Messages
 ICMP defines two types of messages: error
 and informational messages
 Error messages:
   Source quench
   Time exceeded
   Destination unreachable
   Redirect
   Fragmentation required
 Informational messages:
   Echo request/reply
   Address mask request/reply
   Router discovery             12
ICMP: Message Types
       Type           Message
         0    Echo reply
         3    Destination unreachable
         4    Source quench
         5    Redirect
         8    Echo request
        11    Time exceeded
        12    Parameter unintelligible
        13    Time-stamp request
        14    Time-stamp reply
        15    Information request
        16    Information reply
        17    Address mask request
        18    Address mask reply         13
ICMP Message Types
Type Code Description                    Query Error Type   Code   Description                       Query   Error
0    0    Echo reply                     •           5             Redirect
3         Destination unreachable:                          0       Redirect for network                     •
     0     Network unreachable                 •            1       Redirect for host                        •
     1     Host unreachable                    •            2       Redirect for TOS and Net                 •
     2     Protocol unreachable                             3       Redirect for TOS and Host                •
                                               •
     3     Port unreachable                    •     8      0      Echo request                      •
     4     Fragmentation needed                •     9      0      Router advertisement              •
     5     Source route failed                 •     10     0      Router solicitation               •
     6     Destination network unknown               11            Time exceeded
                                               •
     7     Destination host unknown                         0       TTL equals 0 during transit              •
                                               •
     8     Source host isolated                             1       TTL equals 0 during reassembly           •
     9     Destination net prohibited          •
                                                     12            Parameter problem
     10    Destination host prohibited         •
                                                            0       IP header bad                            •
     11    Network unreachable for TOS         •            1       Required option missing                  •
     12    Host unreachable for TOS            •     13     0      Timestamp request                 •
     13    Communication prohibited            •     14     0      Timestamp reply                   •
     14    Host precedence violation           •     15     0      Information request               •
     15    Precedence cutoff in effect         •     16     0      Information reply                 •
4    0    Source quench                        •     17     0      Address mask request              •
                                                     18     0      Address mask reply                •

                                                                                    14
ICMP and Reachability
 An internet host, A, is reachable from
 another host, B, if datagrams can be
 delivered from A to B
 ping program tests reachability - sends
 datagram from B to A that A echoes back
 to B
 Uses ICMP echo request and echo reply
 messages
 Internet layer includes code to reply to
 incoming ICMP echo request messages
                                   15
Destination Unreachable
Codes
Code   Meaning
0      Network unreachable
1      Host unreachable
2      Protocol unreachable
3      Port unreachable
4      Fragmentation need and don’t fragment bit set
5      Source route failed
6      Destination network unknown
7      Destination host unknown
8      Source host isolated
9      Communication with dest net administratively prohibited
10     Communication with dest host administratively prohibited
11     Network unreachable for type of service
12     Host unreachable for type of service
                                               16
ICMP Unreachable Error
 Unreachable errors are generate for a
 number of reasons
   network unreachable
   host unreachable

     type (3)        code (0-15)                   16-bit checksum

                            unused (must be 0)


         IP header (including options) + first 8 bytes of IP datagram data




                                                              17
Handling of ICMP Messages
 Type   Code   Description                    Handled by
 0      0      Echo reply                     User process
 3             Destination unreachable:
        0       Network unreachable           “No route to host”
        1       Host unreachable              “No route to host”
        2       Protocol unreachable          “Connection refused”
        3       Port unreachable              “Connection refused”
        4       Fragmentation needed          “Message too long”
        5       Source route failed           “No route to host”
        6       Destination network unknown   “Network is unreachable”
        7       Destination host unknown      “No route to host”
        8       Source host isolated          “No route to host”
        9       Destination net prohibited    “Network is unreachable”
        10      Destination host prohibited   “No route to host”
        11      Network unreachable for TOS   “Network is unreachable”
        12      Host unreachable for TOS      “No route to host”
        13      Communication prohibited      (ignored)
        14      Host precedence violation     (ignored)
        15      Precedence cutoff in effect   (ignored)
 4      0      Source quench                  Kernel for TCP; ignored by UDP
                                                               18
Handling of ICMP Messages
  Type   Code   Description                       Handled by
  5             Redirect
         0       Redirect for network             Kernel updates routing table
         1       Redirect for host                Kernel updates routing table
         2       Redirect for TOS and Net         Kernel updates routing table
         3       Redirect for TOS and Host        Kernel updates routing table
  8      0      Echo request                      Kernel generates reply
  9      0      Router advertisement              User process
  10     0      Router solicitation               User process
  11            Time exceeded
         0       TTL equals 0 during transit      User process
         1       TTL equals 0 during reassembly   User process
  12            Parameter problem
         0       IP header bad                    “Protocol not available”
         1       Required option missing          “Protocol not available”
  13     0      Timestamp request                 Kernel generates reply
  14     0      Timestamp reply                   User process
  15     0      Information request               Kernel generates reply
  16     0      Information reply                 User process
  17     0      Address mask request              Kernel generates reply
  18     0      Address mask reply                User process
                                                                 19
Ping Program
 Ping stands for “Packet InterNet Groper”
 The ping program tests whether another
 host is reachable
 The program works by sending an ICMP
 echo request to a host, expecting an ICMP
 echo reply to be returned
 Normally ping is used as a diagnostic tool
 to test network connectivity

                                 20
Client/Server Programs
 Ping is is an example of a client/server
 program
   the client sends the request to a server
   the server returns the reply
 Most TCP/IP implementations support the
 ping server directly in the kernel




                                       21
Ping Implementation
 Unix implementations set the identifier field to the
 process ID of the sender
 The sequence number starts at 0 and is
 incremented every time a new echo request is
 sent
 Ping operates in one of two modes
    send a single request, if a response is received
    the host is alive
    send one request every second
 Ping in Action
 IP Record Route Option
                                        22
ICMP and Internet Routes
 List of all routers on path from A to B is called the route
 from A to B
 traceroute uses UDP to non-existent port and TTL field to
 find route via expanding ring search
 Sends ICMP echo messages with increasing TTL
    Router that decrements TTL to 0 sends ICMP time
    exceeded message, with router's address as source
    address
    First, with TTL 1, gets to first router, which discards
    and sends time exceeded message
    Next, with TTL 2, gets through first router to second
    router
    Continue until message from destination received
 traceroute must accommodate varying network delays
 Must also accommodate dynamically changing routes
                                                 23
ICMP and Path MTU
Discovery
 Fragmentation should be avoided
 How can source configure outgoing datagrams to
 avoid fragmentation?
 Source determines path MTU - smallest network
 MTU on path from source to destination
 Source probes path using IP datagrams with
 don't fragment flag
 Router responds with ICMP fragmentation
 required message
 Source sends smaller probes until destination
 reached                             24
Information Request/Reply:
 This request is intended for a diskless system to
 obtain its subnet mask
 Set source and destination addresses to 0 in the
 request and broadcast
 Server replies back with your IP address
 (Not used. Replaced by RARP and BOOTP)
 Address Mask Request/Reply: What is the subnet
 mask on this net? Replied by “Address mask
 agent”
    type (17 or 18)        code (0)                  16-bit checksum

     identifier (can be set to anything)    sequence (can be set to anything)

                                32-bit subnet mask            25
ICMP Messages:
Fragmentation Required
 Fragmentation Required: Datagram was
 longer than MTU and “No Fragment bit”
 was set.




                               26
ICMP Messages: Time
Exceeded
 Time Exceeded: Time to live field in one of
 your packets became zero.” or
 “Reassembly timer expired at the
 destination.




                                  27
ICMP Messages: Redirect
     Default route may cause extra hop
     Router that forwards datagram on same
     interface sends ICMP redirect
     Host installs new route with correct router
     as next hop                            Host Y
                   Router A            Host Y is reachable
                                       in one hop through
                                            Router A
             IP Packet

                 Redirection:
         “Next time, use Router A
Host X    for this destination host”       Router B
                                                  28
ICMP Messages: Redirect
 Redirect: Please send to router X instead
 of me.
 0 = Redirect datagrams for the network
 1 = Redirect datagrams for the host
 2 = Redirect datagrams for the type of
 service and net
 3 = Redirect datagrams for the type of
 service and host

                                 29
ICMP Timestamp Request &
Reply
 Used to return the current time from
 another host
 Could be used for (primitive) time
 synchronization protocol, but NTP and
 XNTP do a much better job
   type (13 or 14)        code (0)                     16-bit checksum

    identifier (can be set to anything)    sequence (can be set to anything)

                          32-bit originate timestamp

                           32-bit receive timestamp

                           32-bit transmit timestamp
                                                                30
ICMP Timestamp Request &
Reply
 The recommended value to be returned is
 the number of milliseconds since midnight,
 Coordinated Universal Time (UTC).
 A drawback is that only the time since
 midnight is returned. The caller must know
 the date form some other means




                                 31
ICMP Summary
Internet layer provides best-effort delivery service
May choose to report errors for some problems
ICMP provides error message service
ICMP is the control sibling of IP
ICMP is used by IP and uses IP as network layer
protocol - Encapsulated in IP datagram - Not reliable
Feedback about problems
   e.g. time to live expired
ICMP is used for ping, traceroute, and path MTU
discovery
Transfer of (control) messages from routers and
hosts to hosts
                                       32

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Icmp
IcmpIcmp
Icmp
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram Protocol
 
Transport layer
Transport layer Transport layer
Transport layer
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
IP Routing
IP RoutingIP Routing
IP Routing
 
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
 
ARP
ARPARP
ARP
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Transportlayer tanenbaum
Transportlayer tanenbaumTransportlayer tanenbaum
Transportlayer tanenbaum
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
Multicastingand multicast routing protocols
Multicastingand multicast routing protocolsMulticastingand multicast routing protocols
Multicastingand multicast routing protocols
 
IPV6 ADDRESS
IPV6 ADDRESSIPV6 ADDRESS
IPV6 ADDRESS
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
RARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE ProtocolsRARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE Protocols
 
ICMP
ICMPICMP
ICMP
 

Ähnlich wie Internet control message protocol

Internet Protocol.pdf
Internet Protocol.pdfInternet Protocol.pdf
Internet Protocol.pdfBIT DURG
 
Address resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocolAddress resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocolasimnawaz54
 
Ip and icmp
Ip and icmpIp and icmp
Ip and icmpProgrammer
 
Ports & sockets
Ports  & sockets Ports  & sockets
Ports & sockets myrajendra
 
NP - Unit 3 - Forwarding Datagram and ICMP
NP - Unit 3 - Forwarding Datagram and ICMPNP - Unit 3 - Forwarding Datagram and ICMP
NP - Unit 3 - Forwarding Datagram and ICMPhamsa nandhini
 
Q1 On Ch09 Tcpip Protocol Suite And Ip Addressing
Q1 On Ch09 Tcpip Protocol Suite And Ip AddressingQ1 On Ch09 Tcpip Protocol Suite And Ip Addressing
Q1 On Ch09 Tcpip Protocol Suite And Ip Addressingjerometnewman
 
Internet protocol
Internet protocolInternet protocol
Internet protocolOnline
 
Icmp V4 And Icmp V6
Icmp V4 And Icmp V6Icmp V4 And Icmp V6
Icmp V4 And Icmp V6Ram Dutt Shukla
 
Mobile ipv6
Mobile ipv6Mobile ipv6
Mobile ipv6Paras Jha
 
IT307 Exploring the Networks.pptx
IT307 Exploring the Networks.pptxIT307 Exploring the Networks.pptx
IT307 Exploring the Networks.pptxShubhamTripathi290909
 
IPv6 basic introduction
IPv6 basic introductionIPv6 basic introduction
IPv6 basic introductionHassan Jahangir
 

Ähnlich wie Internet control message protocol (20)

ICMP.ppt
ICMP.pptICMP.ppt
ICMP.ppt
 
05 coms 525 tcpip - icmp
05   coms 525 tcpip - icmp05   coms 525 tcpip - icmp
05 coms 525 tcpip - icmp
 
Unit05
Unit05Unit05
Unit05
 
Internet Protocol.pdf
Internet Protocol.pdfInternet Protocol.pdf
Internet Protocol.pdf
 
Address resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocolAddress resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocol
 
Ip and icmp
Ip and icmpIp and icmp
Ip and icmp
 
Ports & sockets
Ports  & sockets Ports  & sockets
Ports & sockets
 
Respostas wireshark icmp
Respostas wireshark icmpRespostas wireshark icmp
Respostas wireshark icmp
 
vulnerabilities in IP.pdf
vulnerabilities in IP.pdfvulnerabilities in IP.pdf
vulnerabilities in IP.pdf
 
NP - Unit 3 - Forwarding Datagram and ICMP
NP - Unit 3 - Forwarding Datagram and ICMPNP - Unit 3 - Forwarding Datagram and ICMP
NP - Unit 3 - Forwarding Datagram and ICMP
 
Q1 On Ch09 Tcpip Protocol Suite And Ip Addressing
Q1 On Ch09 Tcpip Protocol Suite And Ip AddressingQ1 On Ch09 Tcpip Protocol Suite And Ip Addressing
Q1 On Ch09 Tcpip Protocol Suite And Ip Addressing
 
Internetworking
InternetworkingInternetworking
Internetworking
 
Internet protocol
Internet protocolInternet protocol
Internet protocol
 
Icmp V4 And Icmp V6
Icmp V4 And Icmp V6Icmp V4 And Icmp V6
Icmp V4 And Icmp V6
 
CoAP Talk
CoAP TalkCoAP Talk
CoAP Talk
 
Mobile ipv6
Mobile ipv6Mobile ipv6
Mobile ipv6
 
It 3-icmp-igmp
It 3-icmp-igmpIt 3-icmp-igmp
It 3-icmp-igmp
 
IT307 Exploring the Networks.pptx
IT307 Exploring the Networks.pptxIT307 Exploring the Networks.pptx
IT307 Exploring the Networks.pptx
 
Packet sniffing
Packet sniffingPacket sniffing
Packet sniffing
 
IPv6 basic introduction
IPv6 basic introductionIPv6 basic introduction
IPv6 basic introduction
 

Mehr von asimnawaz54

Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceasimnawaz54
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceasimnawaz54
 
Expert systems with applications
Expert systems with applicationsExpert systems with applications
Expert systems with applicationsasimnawaz54
 
Establishing knowledge base
Establishing knowledge baseEstablishing knowledge base
Establishing knowledge baseasimnawaz54
 
Designing the expert system
Designing the expert systemDesigning the expert system
Designing the expert systemasimnawaz54
 
1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-main1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-mainasimnawaz54
 
Packet switching
Packet switchingPacket switching
Packet switchingasimnawaz54
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switchingasimnawaz54
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switchingasimnawaz54
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocolasimnawaz54
 
Requirements analysis
Requirements analysisRequirements analysis
Requirements analysisasimnawaz54
 
Advanced software engineering lab 2
Advanced software engineering lab 2Advanced software engineering lab 2
Advanced software engineering lab 2asimnawaz54
 
Object oriented analysis lab1
Object oriented analysis lab1Object oriented analysis lab1
Object oriented analysis lab1asimnawaz54
 
Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lectureasimnawaz54
 

Mehr von asimnawaz54 (16)

Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inference
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
Expert systems with applications
Expert systems with applicationsExpert systems with applications
Expert systems with applications
 
Establishing knowledge base
Establishing knowledge baseEstablishing knowledge base
Establishing knowledge base
 
Designing the expert system
Designing the expert systemDesigning the expert system
Designing the expert system
 
1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-main1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-main
 
Packet switching
Packet switchingPacket switching
Packet switching
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switching
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switching
 
Ipv6up
Ipv6upIpv6up
Ipv6up
 
Ipv4
Ipv4Ipv4
Ipv4
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocol
 
Requirements analysis
Requirements analysisRequirements analysis
Requirements analysis
 
Advanced software engineering lab 2
Advanced software engineering lab 2Advanced software engineering lab 2
Advanced software engineering lab 2
 
Object oriented analysis lab1
Object oriented analysis lab1Object oriented analysis lab1
Object oriented analysis lab1
 
Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lecture
 

KĂźrzlich hochgeladen

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

KĂźrzlich hochgeladen (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Internet control message protocol

  • 1. Internet Control Message Protocol ICMP The Internet Control Message Protocol (ICMP) is a control protocol that is considered to be an integral part of IP, although it is architecturally layered upon IP - it uses IP to carry its data end-to-end. ICMP provides error reporting, congestion reporting, and first-hop router redirection. 1
  • 2. Introduction IP provides best-effort delivery Delivery problems can be ignored; datagrams can be "dropped on the floor" Internet Control Message Protocol (ICMP) provides error-reporting mechanism 2
  • 4. ICMP Features ICMP uses IP as if ICMP were a higher- level protocol (that is, ICMP messages are encapsulated in IP datagrams). However, ICMP is an integral part of IP and must be implemented by every IP module. ICMP is used to report some errors, not to make IP reliable. Datagrams may still be undelivered without any report on their loss. Reliability must be implemented by the higher-level protocols that use IP. 4
  • 5. ICMP Features ICMP can report errors on any IP datagram with the exception of ICMP messages, to avoid infinite repetitions. For fragmented IP datagrams, ICMP messages are only sent about errors on fragment zero. That is, ICMP messages never refer to an IP datagram with a non- zero fragment offset field. 5
  • 6. ICMP Features ICMP has rules regarding error message generation to prevent broadcast storms ICMP messages are never sent in response to datagrams with a destination IP address that is a broadcast or a multicast address. ICMP messages are never sent in response to a datagram which does not have a source IP address which represents a unique host. That is, the source address cannot be zero, a loopback address, a broadcast address or a multicast address. 6
  • 7. Error Message Generation Rules ICMP errors messages are not generated in response to an ICMP error message datagrams destined to an IP broadcast address datagrams sent as a link-layer broadcast a fragment other than the first a datagram whose source address does not define a single host 7
  • 8. ICMP Features ICMP messages are never sent in response to ICMP error messages. They may be sent in response to ICMP query messages (ICMP types 0, 8, 9, 10 and 13 through 18). RFC 792 states that ICMP messages “may” be generated to report IP datagram processing errors, not “must”. In practice, routers will almost always generate ICMP messages for errors, but for destination hosts, the number of ICMP messages generated is implementation dependent. 8
  • 9. ICMP Message Format ICMP messages are described in RFC 792 and RFC 950, belong to STD 5 and are mandatory. ICMP messages are sent in IP datagrams. The IP header will always have a Protocol number of 1, indicating ICMP and a type of service of zero (routine). The IP data field will contain the actual ICMP message in the format shown in the figure below: 9
  • 10. ICMP Message Transport ICMP encapsulated in IP But ... how can that work? ICMP messages sent in response to incoming datagrams with problems ICMP message not sent for ICMP message 10
  • 11. Error Detection Internet layer can detect a variety of errors: Checksum (header only!) TTL expires No route to destination network Can't deliver to destination host (e.g., no ARP reply) Internet layer discards datagrams with problems Some - e.g., checksum error - can't trigger error messages 11
  • 12. Types of Messages ICMP defines two types of messages: error and informational messages Error messages: Source quench Time exceeded Destination unreachable Redirect Fragmentation required Informational messages: Echo request/reply Address mask request/reply Router discovery 12
  • 13. ICMP: Message Types Type Message 0 Echo reply 3 Destination unreachable 4 Source quench 5 Redirect 8 Echo request 11 Time exceeded 12 Parameter unintelligible 13 Time-stamp request 14 Time-stamp reply 15 Information request 16 Information reply 17 Address mask request 18 Address mask reply 13
  • 14. ICMP Message Types Type Code Description Query Error Type Code Description Query Error 0 0 Echo reply • 5 Redirect 3 Destination unreachable: 0 Redirect for network • 0 Network unreachable • 1 Redirect for host • 1 Host unreachable • 2 Redirect for TOS and Net • 2 Protocol unreachable 3 Redirect for TOS and Host • • 3 Port unreachable • 8 0 Echo request • 4 Fragmentation needed • 9 0 Router advertisement • 5 Source route failed • 10 0 Router solicitation • 6 Destination network unknown 11 Time exceeded • 7 Destination host unknown 0 TTL equals 0 during transit • • 8 Source host isolated 1 TTL equals 0 during reassembly • 9 Destination net prohibited • 12 Parameter problem 10 Destination host prohibited • 0 IP header bad • 11 Network unreachable for TOS • 1 Required option missing • 12 Host unreachable for TOS • 13 0 Timestamp request • 13 Communication prohibited • 14 0 Timestamp reply • 14 Host precedence violation • 15 0 Information request • 15 Precedence cutoff in effect • 16 0 Information reply • 4 0 Source quench • 17 0 Address mask request • 18 0 Address mask reply • 14
  • 15. ICMP and Reachability An internet host, A, is reachable from another host, B, if datagrams can be delivered from A to B ping program tests reachability - sends datagram from B to A that A echoes back to B Uses ICMP echo request and echo reply messages Internet layer includes code to reply to incoming ICMP echo request messages 15
  • 16. Destination Unreachable Codes Code Meaning 0 Network unreachable 1 Host unreachable 2 Protocol unreachable 3 Port unreachable 4 Fragmentation need and don’t fragment bit set 5 Source route failed 6 Destination network unknown 7 Destination host unknown 8 Source host isolated 9 Communication with dest net administratively prohibited 10 Communication with dest host administratively prohibited 11 Network unreachable for type of service 12 Host unreachable for type of service 16
  • 17. ICMP Unreachable Error Unreachable errors are generate for a number of reasons network unreachable host unreachable type (3) code (0-15) 16-bit checksum unused (must be 0) IP header (including options) + first 8 bytes of IP datagram data 17
  • 18. Handling of ICMP Messages Type Code Description Handled by 0 0 Echo reply User process 3 Destination unreachable: 0 Network unreachable “No route to host” 1 Host unreachable “No route to host” 2 Protocol unreachable “Connection refused” 3 Port unreachable “Connection refused” 4 Fragmentation needed “Message too long” 5 Source route failed “No route to host” 6 Destination network unknown “Network is unreachable” 7 Destination host unknown “No route to host” 8 Source host isolated “No route to host” 9 Destination net prohibited “Network is unreachable” 10 Destination host prohibited “No route to host” 11 Network unreachable for TOS “Network is unreachable” 12 Host unreachable for TOS “No route to host” 13 Communication prohibited (ignored) 14 Host precedence violation (ignored) 15 Precedence cutoff in effect (ignored) 4 0 Source quench Kernel for TCP; ignored by UDP 18
  • 19. Handling of ICMP Messages Type Code Description Handled by 5 Redirect 0 Redirect for network Kernel updates routing table 1 Redirect for host Kernel updates routing table 2 Redirect for TOS and Net Kernel updates routing table 3 Redirect for TOS and Host Kernel updates routing table 8 0 Echo request Kernel generates reply 9 0 Router advertisement User process 10 0 Router solicitation User process 11 Time exceeded 0 TTL equals 0 during transit User process 1 TTL equals 0 during reassembly User process 12 Parameter problem 0 IP header bad “Protocol not available” 1 Required option missing “Protocol not available” 13 0 Timestamp request Kernel generates reply 14 0 Timestamp reply User process 15 0 Information request Kernel generates reply 16 0 Information reply User process 17 0 Address mask request Kernel generates reply 18 0 Address mask reply User process 19
  • 20. Ping Program Ping stands for “Packet InterNet Groper” The ping program tests whether another host is reachable The program works by sending an ICMP echo request to a host, expecting an ICMP echo reply to be returned Normally ping is used as a diagnostic tool to test network connectivity 20
  • 21. Client/Server Programs Ping is is an example of a client/server program the client sends the request to a server the server returns the reply Most TCP/IP implementations support the ping server directly in the kernel 21
  • 22. Ping Implementation Unix implementations set the identifier field to the process ID of the sender The sequence number starts at 0 and is incremented every time a new echo request is sent Ping operates in one of two modes send a single request, if a response is received the host is alive send one request every second Ping in Action IP Record Route Option 22
  • 23. ICMP and Internet Routes List of all routers on path from A to B is called the route from A to B traceroute uses UDP to non-existent port and TTL field to find route via expanding ring search Sends ICMP echo messages with increasing TTL Router that decrements TTL to 0 sends ICMP time exceeded message, with router's address as source address First, with TTL 1, gets to first router, which discards and sends time exceeded message Next, with TTL 2, gets through first router to second router Continue until message from destination received traceroute must accommodate varying network delays Must also accommodate dynamically changing routes 23
  • 24. ICMP and Path MTU Discovery Fragmentation should be avoided How can source configure outgoing datagrams to avoid fragmentation? Source determines path MTU - smallest network MTU on path from source to destination Source probes path using IP datagrams with don't fragment flag Router responds with ICMP fragmentation required message Source sends smaller probes until destination reached 24
  • 25. Information Request/Reply: This request is intended for a diskless system to obtain its subnet mask Set source and destination addresses to 0 in the request and broadcast Server replies back with your IP address (Not used. Replaced by RARP and BOOTP) Address Mask Request/Reply: What is the subnet mask on this net? Replied by “Address mask agent” type (17 or 18) code (0) 16-bit checksum identifier (can be set to anything) sequence (can be set to anything) 32-bit subnet mask 25
  • 26. ICMP Messages: Fragmentation Required Fragmentation Required: Datagram was longer than MTU and “No Fragment bit” was set. 26
  • 27. ICMP Messages: Time Exceeded Time Exceeded: Time to live field in one of your packets became zero.” or “Reassembly timer expired at the destination. 27
  • 28. ICMP Messages: Redirect Default route may cause extra hop Router that forwards datagram on same interface sends ICMP redirect Host installs new route with correct router as next hop Host Y Router A Host Y is reachable in one hop through Router A IP Packet Redirection: “Next time, use Router A Host X for this destination host” Router B 28
  • 29. ICMP Messages: Redirect Redirect: Please send to router X instead of me. 0 = Redirect datagrams for the network 1 = Redirect datagrams for the host 2 = Redirect datagrams for the type of service and net 3 = Redirect datagrams for the type of service and host 29
  • 30. ICMP Timestamp Request & Reply Used to return the current time from another host Could be used for (primitive) time synchronization protocol, but NTP and XNTP do a much better job type (13 or 14) code (0) 16-bit checksum identifier (can be set to anything) sequence (can be set to anything) 32-bit originate timestamp 32-bit receive timestamp 32-bit transmit timestamp 30
  • 31. ICMP Timestamp Request & Reply The recommended value to be returned is the number of milliseconds since midnight, Coordinated Universal Time (UTC). A drawback is that only the time since midnight is returned. The caller must know the date form some other means 31
  • 32. ICMP Summary Internet layer provides best-effort delivery service May choose to report errors for some problems ICMP provides error message service ICMP is the control sibling of IP ICMP is used by IP and uses IP as network layer protocol - Encapsulated in IP datagram - Not reliable Feedback about problems e.g. time to live expired ICMP is used for ping, traceroute, and path MTU discovery Transfer of (control) messages from routers and hosts to hosts 32