home *** CD-ROM | disk | FTP | other *** search
/ Handbook of Infosec Terms 2.0 / Handbook_of_Infosec_Terms_Version_2.0_ISSO.iso / text / rfcs / rfc0792.txt < prev    next >
Text File  |  1996-05-07  |  31KB  |  915 lines

  1.  
  2.  
  3. Network Working Group                                          J. Postel Request for Comments:  792                                           ISI                                                           September 1981 Updates:  RFCs 777, 760 Updates:  IENs 109, 128 
  4.  
  5.                    INTERNET CONTROL MESSAGE PROTOCOL 
  6.  
  7.                          DARPA INTERNET PROGRAM                          PROTOCOL SPECIFICATION 
  8.  
  9.  
  10.  
  11. Introduction 
  12.  
  13.    The Internet Protocol (IP) [1] is used for host-to-host datagram    service in a system of interconnected networks called the    Catenet [2].  The network connecting devices are called Gateways.    These gateways communicate between themselves for control purposes    via a Gateway to Gateway Protocol (GGP) [3,4].  Occasionally a    gateway or destination host will communicate with a source host, for    example, to report an error in datagram processing.  For such    purposes this protocol, the Internet Control Message Protocol (ICMP),    is used.  ICMP, uses the basic support of IP as if it were a higher    level protocol, however, ICMP is actually an integral part of IP, and    must be implemented by every IP module. 
  14.  
  15.    ICMP messages are sent in several situations:  for example, when a    datagram cannot reach its destination, when the gateway does not have    the buffering capacity to forward a datagram, and when the gateway    can direct the host to send traffic on a shorter route. 
  16.  
  17.    The Internet Protocol is not designed to be absolutely reliable.  The    purpose of these control messages is to provide feedback about    problems in the communication environment, not to make IP reliable.    There are still no guarantees that a datagram will be delivered or a    control message will be returned.  Some datagrams may still be    undelivered without any report of their loss.  The higher level    protocols that use IP must implement their own reliability procedures    if reliable communication is required. 
  18.  
  19.    The ICMP messages typically report errors in the processing of    datagrams.  To avoid the infinite regress of messages about messages    etc., no ICMP messages are sent about ICMP messages.  Also ICMP    messages are only sent about errors in handling fragment zero of    fragemented datagrams.  (Fragment zero has the fragment offeset equal    zero). 
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                                                                 [Page 1] 
  28.  
  29.  
  30.                                                           September 1981 RFC 792 
  31.  
  32.  
  33.  
  34. Message Formats 
  35.  
  36.    ICMP messages are sent using the basic IP header.  The first octet of    the data portion of the datagram is a ICMP type field; the value of    this field determines the format of the remaining data.  Any field    labeled "unused" is reserved for later extensions and must be zero    when sent, but receivers should not use these fields (except to    include them in the checksum).  Unless otherwise noted under the    individual format descriptions, the values of the internet header    fields are as follows: 
  37.  
  38.    Version 
  39.  
  40.       4 
  41.  
  42.    IHL 
  43.  
  44.       Internet header length in 32-bit words. 
  45.  
  46.    Type of Service 
  47.  
  48.       0 
  49.  
  50.    Total Length 
  51.  
  52.       Length of internet header and data in octets. 
  53.  
  54.    Identification, Flags, Fragment Offset 
  55.  
  56.       Used in fragmentation, see [1]. 
  57.  
  58.    Time to Live 
  59.  
  60.       Time to live in seconds; as this field is decremented at each       machine in which the datagram is processed, the value in this       field should be at least as great as the number of gateways which       this datagram will traverse. 
  61.  
  62.    Protocol 
  63.  
  64.       ICMP = 1 
  65.  
  66.    Header Checksum 
  67.  
  68.       The 16 bit one's complement of the one's complement sum of all 16       bit words in the header.  For computing the checksum, the checksum       field should be zero.  This checksum may be replaced in the       future. 
  69.  
  70.  [Page 2]                                                                 
  71.  
  72.  
  73. September 1981                                                           RFC 792 
  74.  
  75.  
  76.  
  77.    Source Address 
  78.  
  79.       The address of the gateway or host that composes the ICMP message.       Unless otherwise noted, this can be any of a gateway's addresses. 
  80.  
  81.    Destination Address 
  82.  
  83.       The address of the gateway or host to which the message should be       sent. 
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                                                                 [Page 3] 
  126.  
  127.  
  128.                                                           September 1981 RFC 792 
  129.  
  130.  
  131.  
  132. Destination Unreachable Message 
  133.  
  134.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |     Code      |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |                             unused                            |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |      Internet Header + 64 bits of Original Data Datagram      |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  135.  
  136.    IP Fields: 
  137.  
  138.    Destination Address 
  139.  
  140.       The source network and address from the original datagram's data. 
  141.  
  142.    ICMP Fields: 
  143.  
  144.    Type 
  145.  
  146.       3 
  147.  
  148.    Code 
  149.  
  150.       0 = net unreachable; 
  151.  
  152.       1 = host unreachable; 
  153.  
  154.       2 = protocol unreachable; 
  155.  
  156.       3 = port unreachable; 
  157.  
  158.       4 = fragmentation needed and DF set; 
  159.  
  160.       5 = source route failed. 
  161.  
  162.    Checksum 
  163.  
  164.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       This checksum may be replaced in the future. 
  165.  
  166.    Internet Header + 64 bits of Data Datagram 
  167.  
  168.       The internet header plus the first 64 bits of the original 
  169.  
  170.  [Page 4]                                                                 
  171.  
  172.  
  173. September 1981                                                           RFC 792 
  174.  
  175.  
  176.  
  177.       datagram's data.  This data is used by the host to match the       message to the appropriate process.  If a higher level protocol       uses port numbers, they are assumed to be in the first 64 data       bits of the original datagram's data. 
  178.  
  179.    Description 
  180.  
  181.       If, according to the information in the gateway's routing tables,       the network specified in the internet destination field of a       datagram is unreachable, e.g., the distance to the network is       infinity, the gateway may send a destination unreachable message       to the internet source host of the datagram.  In addition, in some       networks, the gateway may be able to determine if the internet       destination host is unreachable.  Gateways in these networks may       send destination unreachable messages to the source host when the       destination host is unreachable. 
  182.  
  183.       If, in the destination host, the IP module cannot deliver the       datagram  because the indicated protocol module or process port is       not active, the destination host may send a destination       unreachable message to the source host. 
  184.  
  185.       Another case is when a datagram must be fragmented to be forwarded       by a gateway yet the Don't Fragment flag is on.  In this case the       gateway must discard the datagram and may return a destination       unreachable message. 
  186.  
  187.       Codes 0, 1, 4, and 5 may be received from a gateway.  Codes 2 and       3 may be received from a host. 
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.                                                                 [Page 5] 
  210.  
  211.  
  212.                                                           September 1981 RFC 792 
  213.  
  214.  
  215.  
  216. Time Exceeded Message 
  217.  
  218.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |     Code      |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |                             unused                            |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |      Internet Header + 64 bits of Original Data Datagram      |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  219.  
  220.    IP Fields: 
  221.  
  222.    Destination Address 
  223.  
  224.       The source network and address from the original datagram's data. 
  225.  
  226.    ICMP Fields: 
  227.  
  228.    Type 
  229.  
  230.       11 
  231.  
  232.    Code 
  233.  
  234.       0 = time to live exceeded in transit; 
  235.  
  236.       1 = fragment reassembly time exceeded. 
  237.  
  238.    Checksum 
  239.  
  240.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       This checksum may be replaced in the future. 
  241.  
  242.    Internet Header + 64 bits of Data Datagram 
  243.  
  244.       The internet header plus the first 64 bits of the original       datagram's data.  This data is used by the host to match the       message to the appropriate process.  If a higher level protocol       uses port numbers, they are assumed to be in the first 64 data       bits of the original datagram's data. 
  245.  
  246.    Description 
  247.  
  248.       If the gateway processing a datagram finds the time to live field 
  249.  
  250.  [Page 6]                                                                 
  251.  
  252.  
  253. September 1981                                                           RFC 792 
  254.  
  255.  
  256.  
  257.       is zero it must discard the datagram.  The gateway may also notify       the source host via the time exceeded message. 
  258.  
  259.       If a host reassembling a fragmented datagram cannot complete the       reassembly due to missing fragments within its time limit it       discards the datagram, and it may send a time exceeded message. 
  260.  
  261.       If fragment zero is not available then no time exceeded need be       sent at all. 
  262.  
  263.       Code 0 may be received from a gateway.  Code 1 may be received       from a host. 
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.                                                                  [Page 7] 
  302.  
  303.  
  304.                                                           September 1981 RFC 792 
  305.  
  306.  
  307.  
  308. Parameter Problem Message 
  309.  
  310.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |     Code      |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |    Pointer    |                   unused                      |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |      Internet Header + 64 bits of Original Data Datagram      |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  311.  
  312.    IP Fields: 
  313.  
  314.    Destination Address 
  315.  
  316.       The source network and address from the original datagram's data. 
  317.  
  318.    ICMP Fields: 
  319.  
  320.    Type 
  321.  
  322.       12 
  323.  
  324.    Code 
  325.  
  326.       0 = pointer indicates the error. 
  327.  
  328.    Checksum 
  329.  
  330.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       This checksum may be replaced in the future. 
  331.  
  332.    Pointer 
  333.  
  334.       If code = 0, identifies the octet where an error was detected. 
  335.  
  336.    Internet Header + 64 bits of Data Datagram 
  337.  
  338.       The internet header plus the first 64 bits of the original       datagram's data.  This data is used by the host to match the       message to the appropriate process.  If a higher level protocol       uses port numbers, they are assumed to be in the first 64 data       bits of the original datagram's data. 
  339.  
  340.  
  341.  
  342.  [Page 8]                                                                 
  343.  
  344.  
  345. September 1981                                                           RFC 792 
  346.  
  347.  
  348.  
  349.    Description 
  350.  
  351.       If the gateway or host processing a datagram finds a problem with       the header parameters such that it cannot complete processing the       datagram it must discard the datagram.  One potential source of       such a problem is with incorrect arguments in an option.  The       gateway or host may also notify the source host via the parameter       problem message.  This message is only sent if the error caused       the datagram to be discarded. 
  352.  
  353.       The pointer identifies the octet of the original datagram's header       where the error was detected (it may be in the middle of an       option).  For example, 1 indicates something is wrong with the       Type of Service, and (if there are options present) 20 indicates       something is wrong with the type code of the first option. 
  354.  
  355.       Code 0 may be received from a gateway or a host. 
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.                                                                 [Page 9] 
  390.  
  391.  
  392.                                                           September 1981 RFC 792 
  393.  
  394.  
  395.  
  396. Source Quench Message 
  397.  
  398.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |     Code      |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |                             unused                            |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |      Internet Header + 64 bits of Original Data Datagram      |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  399.  
  400.    IP Fields: 
  401.  
  402.    Destination Address 
  403.  
  404.       The source network and address of the original datagram's data. 
  405.  
  406.    ICMP Fields: 
  407.  
  408.    Type 
  409.  
  410.       4 
  411.  
  412.    Code 
  413.  
  414.       0 
  415.  
  416.    Checksum 
  417.  
  418.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       This checksum may be replaced in the future. 
  419.  
  420.    Internet Header + 64 bits of Data Datagram 
  421.  
  422.       The internet header plus the first 64 bits of the original       datagram's data.  This data is used by the host to match the       message to the appropriate process.  If a higher level protocol       uses port numbers, they are assumed to be in the first 64 data       bits of the original datagram's data. 
  423.  
  424.    Description 
  425.  
  426.       A gateway may discard internet datagrams if it does not have the       buffer space needed to queue the datagrams for output to the next       network on the route to the destination network.  If a gateway 
  427.  
  428.  [Page 10]                                                                
  429.  
  430.  
  431. September 1981                                                           RFC 792 
  432.  
  433.  
  434.  
  435.       discards a datagram, it may send a source quench message to the       internet source host of the datagram.  A destination host may also       send a source quench message if datagrams arrive too fast to be       processed.  The source quench message is a request to the host to       cut back the rate at which it is sending traffic to the internet       destination.  The gateway may send a source quench message for       every message that it discards.  On receipt of a source quench       message, the source host should cut back the rate at which it is       sending traffic to the specified destination until it no longer       receives source quench messages from the gateway.  The source host       can then gradually increase the rate at which it sends traffic to       the destination until it again receives source quench messages. 
  436.  
  437.       The gateway or host may send the source quench message when it       approaches its capacity limit rather than waiting until the       capacity is exceeded.  This means that the data datagram which       triggered the source quench message may be delivered. 
  438.  
  439.       Code 0 may be received from a gateway or a host. 
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.                                                                [Page 11] 
  472.  
  473.  
  474.                                                           September 1981 RFC 792 
  475.  
  476.  
  477.  
  478. Redirect Message 
  479.  
  480.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |     Code      |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |                 Gateway Internet Address                      |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |      Internet Header + 64 bits of Original Data Datagram      |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  481.  
  482.    IP Fields: 
  483.  
  484.    Destination Address 
  485.  
  486.       The source network and address of the original datagram's data. 
  487.  
  488.    ICMP Fields: 
  489.  
  490.    Type 
  491.  
  492.       5 
  493.  
  494.    Code 
  495.  
  496.       0 = Redirect datagrams for the Network. 
  497.  
  498.       1 = Redirect datagrams for the Host. 
  499.  
  500.       2 = Redirect datagrams for the Type of Service and Network. 
  501.  
  502.       3 = Redirect datagrams for the Type of Service and Host. 
  503.  
  504.    Checksum 
  505.  
  506.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       This checksum may be replaced in the future. 
  507.  
  508.    Gateway Internet Address 
  509.  
  510.       Address of the gateway to which traffic for the network specified       in the internet destination network field of the original       datagram's data should be sent. 
  511.  
  512.  
  513.  
  514.  [Page 12]                                                                
  515.  
  516.  
  517. September 1981                                                           RFC 792 
  518.  
  519.  
  520.  
  521.    Internet Header + 64 bits of Data Datagram 
  522.  
  523.       The internet header plus the first 64 bits of the original       datagram's data.  This data is used by the host to match the       message to the appropriate process.  If a higher level protocol       uses port numbers, they are assumed to be in the first 64 data       bits of the original datagram's data. 
  524.  
  525.    Description 
  526.  
  527.       The gateway sends a redirect message to a host in the following       situation.  A gateway, G1, receives an internet datagram from a       host on a network to which the gateway is attached.  The gateway,       G1, checks its routing table and obtains the address of the next       gateway, G2, on the route to the datagram's internet destination       network, X.  If G2 and the host identified by the internet source       address of the datagram are on the same network, a redirect       message is sent to the host.  The redirect message advises the       host to send its traffic for network X directly to gateway G2 as       this is a shorter path to the destination.  The gateway forwards       the original datagram's data to its internet destination. 
  528.  
  529.       For datagrams with the IP source route options and the gateway       address in the destination address field, a redirect message is       not sent even if there is a better route to the ultimate       destination than the next address in the source route. 
  530.  
  531.       Codes 0, 1, 2, and 3 may be received from a gateway. 
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.                                                                 [Page 13] 
  554.  
  555.  
  556.                                                           September 1981 RFC 792 
  557.  
  558.  
  559.  
  560. Echo or Echo Reply Message 
  561.  
  562.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |     Code      |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |           Identifier          |        Sequence Number        |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Data ...    +-+-+-+-+- 
  563.  
  564.    IP Fields: 
  565.  
  566.    Addresses 
  567.  
  568.       The address of the source in an echo message will be the       destination of the echo reply message.  To form an echo reply       message, the source and destination addresses are simply reversed,       the type code changed to 0, and the checksum recomputed. 
  569.  
  570.    IP Fields: 
  571.  
  572.    Type 
  573.  
  574.       8 for echo message; 
  575.  
  576.       0 for echo reply message. 
  577.  
  578.    Code 
  579.  
  580.       0 
  581.  
  582.    Checksum 
  583.  
  584.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       If the total length is odd, the received data is padded with one       octet of zeros for computing the checksum.  This checksum may be       replaced in the future. 
  585.  
  586.    Identifier 
  587.  
  588.       If code = 0, an identifier to aid in matching echos and replies,       may be zero. 
  589.  
  590.    Sequence Number 
  591.  
  592.  [Page 14]                                                                
  593.  
  594.  
  595. September 1981                                                           RFC 792 
  596.  
  597.  
  598.  
  599.       If code = 0, a sequence number to aid in matching echos and       replies, may be zero. 
  600.  
  601.    Description 
  602.  
  603.       The data received in the echo message must be returned in the echo       reply message. 
  604.  
  605.       The identifier and sequence number may be used by the echo sender       to aid in matching the replies with the echo requests.  For       example, the identifier might be used like a port in TCP or UDP to       identify a session, and the sequence number might be incremented       on each echo request sent.  The echoer returns these same values       in the echo reply. 
  606.  
  607.       Code 0 may be received from a gateway or a host. 
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.   
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.                                                                [Page 15] 
  642.  
  643.  
  644.                                                           September 1981 RFC 792 
  645.  
  646.  
  647.  
  648. Timestamp or Timestamp Reply Message 
  649.  
  650.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |      Code     |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |           Identifier          |        Sequence Number        |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Originate Timestamp                                       |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Receive Timestamp                                         |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Transmit Timestamp                                        |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  651.  
  652.    IP Fields: 
  653.  
  654.    Addresses 
  655.  
  656.       The address of the source in a timestamp message will be the       destination of the timestamp reply message.  To form a timestamp       reply message, the source and destination addresses are simply       reversed, the type code changed to 14, and the checksum       recomputed. 
  657.  
  658.    IP Fields: 
  659.  
  660.    Type 
  661.  
  662.       13 for timestamp message; 
  663.  
  664.       14 for timestamp reply message. 
  665.  
  666.    Code 
  667.  
  668.       0 
  669.  
  670.    Checksum 
  671.  
  672.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       This checksum may be replaced in the future. 
  673.  
  674.    Identifier 
  675.  
  676.  
  677.  
  678.  [Page 16]                                                                
  679.  
  680.  
  681. September 1981                                                           RFC 792 
  682.  
  683.  
  684.  
  685.       If code = 0, an identifier to aid in matching timestamp and       replies, may be zero. 
  686.  
  687.    Sequence Number 
  688.  
  689.       If code = 0, a sequence number to aid in matching timestamp and       replies, may be zero. 
  690.  
  691.    Description 
  692.  
  693.       The data received (a timestamp) in the message is returned in the       reply together with an additional timestamp.  The timestamp is 32       bits of milliseconds since midnight UT.  One use of these       timestamps is described by Mills [5]. 
  694.  
  695.       The Originate Timestamp is the time the sender last touched the       message before sending it, the Receive Timestamp is the time the       echoer first touched it on receipt, and the Transmit Timestamp is       the time the echoer last touched the message on sending it. 
  696.  
  697.       If the time is not available in miliseconds or cannot be provided       with respect to midnight UT then any time can be inserted in a       timestamp provided the high order bit of the timestamp is also set       to indicate this non-standard value. 
  698.  
  699.       The identifier and sequence number may be used by the echo sender       to aid in matching the replies with the requests.  For example,       the identifier might be used like a port in TCP or UDP to identify       a session, and the sequence number might be incremented on each       request sent.  The destination returns these same values in the       reply. 
  700.  
  701.       Code 0 may be received from a gateway or a host. 
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.                                                                [Page 17] 
  720.  
  721.  
  722.                                                           September 1981 RFC 792 
  723.  
  724.  
  725.  
  726. Information Request or Information Reply Message 
  727.  
  728.     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |     Type      |      Code     |          Checksum             |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |           Identifier          |        Sequence Number        |    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  729.  
  730.    IP Fields: 
  731.  
  732.    Addresses 
  733.  
  734.       The address of the source in a information request message will be       the destination of the information reply message.  To form a       information reply message, the source and destination addresses       are simply reversed, the type code changed to 16, and the checksum       recomputed. 
  735.  
  736.    IP Fields: 
  737.  
  738.    Type 
  739.  
  740.       15 for information request message; 
  741.  
  742.       16 for information reply message. 
  743.  
  744.    Code 
  745.  
  746.       0 
  747.  
  748.    Checksum 
  749.  
  750.       The checksum is the 16-bit ones's complement of the one's       complement sum of the ICMP message starting with the ICMP Type.       For computing the checksum , the checksum field should be zero.       This checksum may be replaced in the future. 
  751.  
  752.    Identifier 
  753.  
  754.       If code = 0, an identifier to aid in matching request and replies,       may be zero. 
  755.  
  756.    Sequence Number 
  757.  
  758.       If code = 0, a sequence number to aid in matching request and       replies, may be zero. 
  759.  
  760.  [Page 18]                                                                
  761.  
  762.  
  763. September 1981                                                           RFC 792 
  764.  
  765.  
  766.  
  767.    Description 
  768.  
  769.       This message may be sent with the source network in the IP header       source and destination address fields zero (which means "this"       network).  The replying IP module should send the reply with the       addresses fully specified.  This message is a way for a host to       find out the number of the network it is on. 
  770.  
  771.       The identifier and sequence number may be used by the echo sender       to aid in matching the replies with the requests.  For example,       the identifier might be used like a port in TCP or UDP to identify       a session, and the sequence number might be incremented on each       request sent.  The destination returns these same values in the       reply. 
  772.  
  773.       Code 0 may be received from a gateway or a host. 
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.                                                                 [Page 19] 
  808.  
  809.  
  810.                                                           September 1981 RFC 792 
  811.  
  812.  
  813.  
  814. Summary of Message Types 
  815.  
  816.     0  Echo Reply 
  817.  
  818.     3  Destination Unreachable 
  819.  
  820.     4  Source Quench 
  821.  
  822.     5  Redirect 
  823.  
  824.     8  Echo 
  825.  
  826.    11  Time Exceeded 
  827.  
  828.    12  Parameter Problem 
  829.  
  830.    13  Timestamp 
  831.  
  832.    14  Timestamp Reply 
  833.  
  834.    15  Information Request 
  835.  
  836.    16  Information Reply 
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864. [Page 20]                                                                
  865.  
  866.  
  867. September 1981                                                           RFC 792 
  868.  
  869.  
  870.  
  871. References 
  872.  
  873.    [1]  Postel, J. (ed.), "Internet Protocol - DARPA Internet Program          Protocol Specification," RFC 791, USC/Information Sciences          Institute, September 1981. 
  874.  
  875.    [2]   Cerf, V., "The Catenet Model for Internetworking," IEN 48,          Information Processing Techniques Office, Defense Advanced          Research Projects Agency, July 1978. 
  876.  
  877.    [3]   Strazisar, V., "Gateway Routing:  An Implementation          Specification", IEN 30, Bolt Beranek and Newman, April 1979. 
  878.  
  879.    [4]   Strazisar, V., "How to Build a Gateway", IEN 109, Bolt Beranek          and Newman, August 1979. 
  880.  
  881.    [5]   Mills, D., "DCNET Internet Clock Service," RFC 778, COMSAT          Laboratories, April 1981. 
  882.  
  883.     
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.                                                                 [Page 21] 
  914.  
  915.