Bits used per field: |
0....... | 8....... | 16...... | 24...... |
The above is an example of an ICMP Header. ICMP is considered an unreliable protocol where no attempt is made to keep track of packets as to being in a sequence, order, or verify that they were received. (OVERSTRIKE BEGIN)Checks are made to see if the packet appears to be the same packet transmitted by evaluation of a checksum and comparison to the packets checksum. These packets are dropped if the destination calculations of the checksum differs from the packets claimed checksum.(OVERSTRIKE END) After being contacted by "Luzian Scherrer" <luzian@scherrer.ch>, I was asked if the above was true. Luzian asked, does a host need to drop an ICMP packet that has an invalid checksum? Luzian performed some tests to see if vendors provided support for droping ICMP packets with invalid checksum and found many vendors were inconsistent in their use of the ICMP checksum. At this time, I will alter the above text to read like this: Though there is no requirement in ICMP RFC (AFAIK) to drop ICMP packets that have invalid checksum, and there is no mention of this being a SHOULD for the protocol, the risk of not doing it is the remote host may choose to ignore an ICMP packet that has an invalid checksum. If you find information on where dropping is SUGGESTED or REQUIRED for the RFC on ICMP, please let me know.
ICMP is probably one of the more misunderstood of the common TCP/IP suite of protocols. The complexity of its conveyed content is minimal, but the actual meaning of the messages delivered and how it effects routes, sessions, and operations between hosts and nodes is more complicated. With exception to the math behind understanding all of the routing mechanisms in the various routing protocols that run over IP (RIP, OSPF, etc.) this is probably the one with the most complexity with all effects taken into consideration. (My opinion.)
---0 | ---0 | RFC-792- | for echo reply message (also see Type 8) | ||||
---1 | ---X | N/A JBP- | Unassigned (Also see RFC-1700) | ||||
---2 | ---X | N/A JBP- | Unassigned (Also see RFC-1700) | ||||
---3 | ---0 | RFC-792- | net unreachable | ||||
---3 | ---1 | RFC-792- | host unreachable | ||||
---3 | ---2 | RFC-792- | protocol unreachable | ||||
---3 | ---3 | RFC-792- | port unreachable | ||||
---3 | ---4 | RFC-792- | fragmentation needed and DF set | ||||
---3 | ---5 | RFC-792- | source route failed | ||||
---3 | ---6 | RFC-1122 | destination network unknown | ||||
---3 | ---7 | RFC-1122 | destination host unknown | ||||
---3 | ---8 | RFC-1122 | source host isolated | ||||
---3 | ---9 | RFC-1122 | communication with destination network administratively prohibited | ||||
---3 | --10 | RFC-1122 | communication with destination host administratively prohibited | ||||
---3 | --11 | RFC-1122 | network unreachable for type of service | ||||
---3 | --12 | RFC-1122 | host unreachable for type of service | ||||
---3 | --13 | RFC-1812 | Communication Administratively Prohibited | ||||
---3 | --14 | RFC-1812 | Host Precedence Violation | ||||
---3 | --15 | RFC-1812 | Precedence cutoff in efect | ||||
---4 | ---0 | RFC-792- | source quench message | ||||
---5 | ---0 | RFC-792- | Redirect datagrams for the Network | ||||
---5 | ---1 | RFC-792- | Redirect datagrams for the Host | ||||
---5 | ---2 | RFC-792- | Redirect datagrams for the Type of Service and Network | ||||
---5 | ---3 | RFC-792- | Redirect datagrams for the Type of Service and Host | ||||
---6 | ---X | N/A JBP- | Unassigned (Also see RFC-1700) | ||||
---7 | ---0 | N/A JBP- | Alternate Address for Host (Also see RFC-1700) | ||||
---8 | ---0 | RFC-792- | for echo message (also see Type 0) | ||||
---9 | ---0 | RFC-1256 | Router Advertisement | ||||
--10 | ---0 | RFC-1256 | Router Solicitation | ||||
--11 | ---0 | RFC-792- | time to live exceeded in transit | ||||
--11 | ---1 | RFC-792- | fragment reassembly time exceeded | ||||
--12 | ---0 | RFC-792- | pointer indicates the error (identifies the octet where an error was detected.) | ||||
--12 | ---1 | RFC-1108 | Missing a required option | ||||
--12 | ---2 | RFC-1108 | Bad length | ||||
--13 | ---0 | RFC-792- | for timestamp message | ||||
--14 | ---0 | RFC-792- | for timestamp reply message | ||||
--15 | ---0 | RFC-792- | for information request message | ||||
--16 | ---0 | RFC-792- | for information reply message | ||||
--17 | ---0 | RFC-950- | for address mask request message | ||||
--18 | ---0 | RFC-950- | for address mask reply message | ||||
--19 | ---X | SoloResv | Reserved (for Security) (Also see RFC-1700) | ||||
--20 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--21 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--22 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--23 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--24 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--25 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--26 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--27 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--28 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--29 | ---X | ZSu Resv | Reserved (for Robustness Experiment) (Also see RFC-1700) | ||||
--30 | ---X | RFC-1393 | Traceroute (Also see RFC-1700) | ||||
--31 | ---X | RFC-1475 | Reserved (for Security) (Also see RFC-1700) | ||||
--32 | ---X | DaviJohn | Mobile Host Redirect (Also see RFC-1700) | ||||
--33 | ---X | BillSimp | IPv6 Where-Are-You (Also see RFC-1700) | ||||
--34 | ---X | BillSimp | IPv6 I-Am-Here (Also see RFC-1700) | ||||
--35 | ---X | BillSimp | Mobile Registration Request (Also see RFC-1700) | ||||
--36 | ---X | BillSimp | Mobile Registration Reply (Also see RFC-1700) | ||||
--37 | ---X | Simpson- | Domain Name Request (Also see IANA ICMP Params) | ||||
--38 | ---X | Simpson- | Domain Name Reply (Also see IANA ICMP Params) | ||||
--39 | ---X | Markson- | SKIP (Also see IANA ICMP Params) | ||||
--40 | ---X | Simpson- | Photuris (Also see IANA ICMP Params) | ||||
--41 | ---X | Reserved | Reserved (Also see IANA ICMP Params) [This is a range of CODES from 41 through to 255.] | ||||
-255 | ---X | ||||||
---- | ---- | ---- | ---- | ---- | ---- | ---- | Ignore below this line: |
---* | ---0 | RFC-917-*-see proposal | for echo reply message (also see Type 8) | ||||
---* | ---0 | RFC-917- | *-see proposal | ||||
---* | ---0 | RFC-917- | *-see proposal | ||||
---* | ---- | RFC-1101 | *-see proposal (obsel: 1101,961,924,901,880,840) |
Also try ftp://ftp.isi.edu/in-notes/iana/assignments/icmp-parameters
This ends the brief preview of an ICMP packet.