home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit v2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Texts / Rfc / RFC791.TXT < prev    next >
Text File  |  1999-11-04  |  95KB  |  2,940 lines

  1. RFC:  791
  2.                                     
  3.                                     
  4.                                     
  5.                                     
  6.                                     
  7.                                     
  8.                                     
  9.                            INTERNET PROTOCOL
  10.                                     
  11.                                     
  12.                          DARPA INTERNET PROGRAM
  13.                                     
  14.                          PROTOCOL SPECIFICATION
  15.                                     
  16.                                     
  17.                                     
  18.                              September 1981
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.                               prepared for
  33.  
  34.                Defense Advanced Research Projects Agency
  35.                 Information Processing Techniques Office
  36.                          1400 Wilson Boulevard
  37.                        Arlington, Virginia  22209
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.                                    by
  46.  
  47.                      Information Sciences Institute
  48.                    University of Southern California
  49.                            4676 Admiralty Way
  50.                    Marina del Rey, California  90291
  51.  
  52.  
  53.  
  54.  
  55.  
  56. September 1981                                                          
  57.                                                        Internet Protocol
  58.  
  59.  
  60.  
  61.                            TABLE OF CONTENTS
  62.  
  63.     PREFACE ........................................................ iii
  64.  
  65. 1.  INTRODUCTION ..................................................... 1
  66.  
  67.   1.1  Motivation .................................................... 1
  68.   1.2  Scope ......................................................... 1
  69.   1.3  Interfaces .................................................... 1
  70.   1.4  Operation ..................................................... 2
  71.  
  72. 2.  OVERVIEW ......................................................... 5
  73.  
  74.   2.1  Relation to Other Protocols ................................... 9
  75.   2.2  Model of Operation ............................................ 5
  76.   2.3  Function Description .......................................... 7
  77.   2.4  Gateways ...................................................... 9
  78.  
  79. 3.  SPECIFICATION ................................................... 11
  80.  
  81.   3.1  Internet Header Format ....................................... 11
  82.   3.2  Discussion ................................................... 23
  83.   3.3  Interfaces ................................................... 31
  84.  
  85. APPENDIX A:  Examples & Scenarios ................................... 34
  86. APPENDIX B:  Data Transmission Order ................................ 39
  87.  
  88. GLOSSARY ............................................................ 41
  89.  
  90. REFERENCES .......................................................... 45
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.                                                                 [Page i]
  113.  
  114.  
  115.  
  116.                                                           September 1981
  117. Internet Protocol
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172. [Page ii]                                                               
  173.  
  174.  
  175.  
  176. September 1981                                                          
  177.                                                        Internet Protocol
  178.  
  179.  
  180.  
  181.                                 PREFACE
  182.  
  183.  
  184.  
  185. This document specifies the DoD Standard Internet Protocol.  This
  186. document is based on six earlier editions of the ARPA Internet Protocol
  187. Specification, and the present text draws heavily from them.  There have
  188. been many contributors to this work both in terms of concepts and in
  189. terms of text.  This edition revises aspects of addressing, error
  190. handling, option codes, and the security, precedence, compartments, and
  191. handling restriction features of the internet protocol.
  192.  
  193.                                                            Jon Postel
  194.  
  195.                                                            Editor
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.                                                               [Page iii]
  233.  
  234.  
  235.  
  236.  
  237.  
  238.                                                           September 1981
  239.  
  240.  
  241. RFC:  791
  242. Replaces:  RFC 760
  243. IENs 128, 123, 111,
  244. 80, 54, 44, 41, 28, 26
  245.  
  246.                            INTERNET PROTOCOL
  247.  
  248.                          DARPA INTERNET PROGRAM
  249.                          PROTOCOL SPECIFICATION
  250.  
  251.  
  252.  
  253.                             1.  INTRODUCTION
  254.  
  255. 1.1.  Motivation
  256.  
  257.   The Internet Protocol is designed for use in interconnected systems of
  258.   packet-switched computer communication networks.  Such a system has
  259.   been called a "catenet" [1].  The internet protocol provides for
  260.   transmitting blocks of data called datagrams from sources to
  261.   destinations, where sources and destinations are hosts identified by
  262.   fixed length addresses.  The internet protocol also provides for
  263.   fragmentation and reassembly of long datagrams, if necessary, for
  264.   transmission through "small packet" networks.
  265.  
  266. 1.2.  Scope
  267.  
  268.   The internet protocol is specifically limited in scope to provide the
  269.   functions necessary to deliver a package of bits (an internet
  270.   datagram) from a source to a destination over an interconnected system
  271.   of networks.  There are no mechanisms to augment end-to-end data
  272.   reliability, flow control, sequencing, or other services commonly
  273.   found in host-to-host protocols.  The internet protocol can capitalize
  274.   on the services of its supporting networks to provide various types
  275.   and qualities of service.
  276.  
  277. 1.3.  Interfaces
  278.  
  279.   This protocol is called on by host-to-host protocols in an internet
  280.   environment.  This protocol calls on local network protocols to carry
  281.   the internet datagram to the next gateway or destination host.
  282.  
  283.   For example, a TCP module would call on the internet module to take a
  284.   TCP segment (including the TCP header and user data) as the data
  285.   portion of an internet datagram.  The TCP module would provide the
  286.   addresses and other parameters in the internet header to the internet
  287.   module as arguments of the call.  The internet module would then
  288.   create an internet datagram and call on the local network interface to
  289.   transmit the internet datagram.
  290.  
  291.   In the ARPANET case, for example, the internet module would call on a
  292.  
  293.  
  294.                                                                 [Page 1]
  295.  
  296.  
  297.  
  298.                                                           September 1981
  299. Internet Protocol
  300. Introduction
  301.  
  302.  
  303.  
  304.   local net module which would add the 1822 leader [2] to the internet
  305.   datagram creating an ARPANET message to transmit to the IMP.  The
  306.   ARPANET address would be derived from the internet address by the
  307.   local network interface and would be the address of some host in the
  308.   ARPANET, that host might be a gateway to other networks.
  309.  
  310. 1.4.  Operation
  311.  
  312.   The internet protocol implements two basic functions:  addressing and
  313.   fragmentation.
  314.  
  315.   The internet modules use the addresses carried in the internet header
  316.   to transmit internet datagrams toward their destinations.  The
  317.   selection of a path for transmission is called routing.
  318.  
  319.   The internet modules use fields in the internet header to fragment and
  320.   reassemble internet datagrams when necessary for transmission through
  321.   "small packet" networks.
  322.  
  323.   The model of operation is that an internet module resides in each host
  324.   engaged in internet communication and in each gateway that
  325.   interconnects networks.  These modules share common rules for
  326.   interpreting address fields and for fragmenting and assembling
  327.   internet datagrams.  In addition, these modules (especially in
  328.   gateways) have procedures for making routing decisions and other
  329.   functions.
  330.  
  331.   The internet protocol treats each internet datagram as an independent
  332.   entity unrelated to any other internet datagram.  There are no
  333.   connections or logical circuits (virtual or otherwise).
  334.  
  335.   The internet protocol uses four key mechanisms in providing its
  336.   service:  Type of Service, Time to Live, Options, and Header Checksum.
  337.  
  338.   The Type of Service is used to indicate the quality of the service
  339.   desired.  The type of service is an abstract or generalized set of
  340.   parameters which characterize the service choices provided in the
  341.   networks that make up the internet.  This type of service indication
  342.   is to be used by gateways to select the actual transmission parameters
  343.   for a particular network, the network to be used for the next hop, or
  344.   the next gateway when routing an internet datagram.
  345.  
  346.   The Time to Live is an indication of an upper bound on the lifetime of
  347.   an internet datagram.  It is set by the sender of the datagram and
  348.   reduced at the points along the route where it is processed.  If the
  349.   time to live reaches zero before the internet datagram reaches its
  350.   destination, the internet datagram is destroyed.  The time to live can
  351.   be thought of as a self destruct time limit.
  352.  
  353.  
  354. [Page 2]                                                                
  355.  
  356.  
  357.  
  358. September 1981                                                          
  359.                                                        Internet Protocol
  360.                                                             Introduction
  361.  
  362.  
  363.  
  364.   The Options provide for control functions needed or useful in some
  365.   situations but unnecessary for the most common communications.  The
  366.   options include provisions for timestamps, security, and special
  367.   routing.
  368.  
  369.   The Header Checksum provides a verification that the information used
  370.   in processing internet datagram has been transmitted correctly.  The
  371.   data may contain errors.  If the header checksum fails, the internet
  372.   datagram is discarded at once by the entity which detects the error.
  373.  
  374.   The internet protocol does not provide a reliable communication
  375.   facility.  There are no acknowledgments either end-to-end or
  376.   hop-by-hop.  There is no error control for data, only a header
  377.   checksum.  There are no retransmissions.  There is no flow control.
  378.  
  379.   Errors detected may be reported via the Internet Control Message
  380.   Protocol (ICMP) [3] which is implemented in the internet protocol
  381.   module.
  382.  
  383.   
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                                                                 [Page 3]
  415.  
  416.  
  417.  
  418.                                                           September 1981
  419. Internet Protocol
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  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.  
  472.  
  473.  
  474. [Page 4]                                                                
  475.  
  476.  
  477.  
  478. September 1981                                                          
  479.                                                        Internet Protocol
  480.  
  481.  
  482.  
  483.                               2.  OVERVIEW
  484.  
  485. 2.1.  Relation to Other Protocols
  486.  
  487.   The following diagram illustrates the place of the internet protocol
  488.   in the protocol hierarchy:
  489.  
  490.                                     
  491.                  +------+ +-----+ +-----+     +-----+  
  492.                  |Telnet| | FTP | | TFTP| ... | ... |  
  493.                  +------+ +-----+ +-----+     +-----+  
  494.                        |   |         |           |     
  495.                       +-----+     +-----+     +-----+  
  496.                       | TCP |     | UDP | ... | ... |  
  497.                       +-----+     +-----+     +-----+  
  498.                          |           |           |     
  499.                       +--------------------------+----+
  500.                       |    Internet Protocol & ICMP   |
  501.                       +--------------------------+----+
  502.                                      |                 
  503.                         +---------------------------+  
  504.                         |   Local Network Protocol  |  
  505.                         +---------------------------+  
  506.  
  507.                          Protocol Relationships
  508.  
  509.                                Figure 1.
  510.  
  511.   Internet protocol interfaces on one side to the higher level
  512.   host-to-host protocols and on the other side to the local network
  513.   protocol.  In this context a "local network" may be a small network in
  514.   a building or a large network such as the ARPANET.
  515.  
  516. 2.2.  Model of Operation
  517.  
  518.   The  model of operation for transmitting a datagram from one
  519.   application program to another is illustrated by the following
  520.   scenario:
  521.  
  522.     We suppose that this transmission will involve one intermediate
  523.     gateway.
  524.  
  525.     The sending application program prepares its data and calls on its
  526.     local internet module to send that data as a datagram and passes the
  527.     destination address and other parameters as arguments of the call.
  528.  
  529.     The internet module prepares a datagram header and attaches the data
  530.     to it.  The internet module determines a local network address for
  531.     this internet address, in this case it is the address of a gateway.
  532.  
  533.  
  534.                                                                 [Page 5]
  535.  
  536.  
  537.  
  538.                                                           September 1981
  539. Internet Protocol
  540. Overview
  541.  
  542.  
  543.  
  544.     It sends this datagram and the local network address to the local
  545.     network interface.
  546.  
  547.     The local network interface creates a local network header, and
  548.     attaches the datagram to it, then sends the result via the local
  549.     network.
  550.  
  551.     The datagram arrives at a gateway host wrapped in the local network
  552.     header, the local network interface strips off this header, and
  553.     turns the datagram over to the internet module.  The internet module
  554.     determines from the internet address that the datagram is to be
  555.     forwarded to another host in a second network.  The internet module
  556.     determines a local net address for the destination host.  It calls
  557.     on the local network interface for that network to send the
  558.     datagram.
  559.  
  560.     This local network interface creates a local network header and
  561.     attaches the datagram sending the result to the destination host.
  562.  
  563.     At this destination host the datagram is stripped of the local net
  564.     header by the local network interface and handed to the internet
  565.     module.
  566.  
  567.     The internet module determines that the datagram is for an
  568.     application program in this host.  It passes the data to the
  569.     application program in response to a system call, passing the source
  570.     address and other parameters as results of the call.
  571.  
  572.                                     
  573.    Application                                           Application
  574.    Program                                                   Program
  575.          \                                                   /      
  576.        Internet Module      Internet Module      Internet Module    
  577.              \                 /       \                /           
  578.              LNI-1          LNI-1      LNI-2         LNI-2          
  579.                 \           /             \          /              
  580.                Local Network 1           Local Network 2            
  581.  
  582.  
  583.  
  584.                             Transmission Path
  585.  
  586.                                 Figure 2
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594. [Page 6]                                                                
  595.  
  596.  
  597.  
  598. September 1981                                                          
  599.                                                        Internet Protocol
  600.                                                                 Overview
  601.  
  602.  
  603.  
  604. 2.3.  Function Description
  605.  
  606.   The function or purpose of Internet Protocol is to move datagrams
  607.   through an interconnected set of networks.  This is done by passing
  608.   the datagrams from one internet module to another until the
  609.   destination is reached.  The internet modules reside in hosts and
  610.   gateways in the internet system.  The datagrams are routed from one
  611.   internet module to another through individual networks based on the
  612.   interpretation of an internet address.  Thus, one important mechanism
  613.   of the internet protocol is the internet address.
  614.  
  615.   In the routing of messages from one internet module to another,
  616.   datagrams may need to traverse a network whose maximum packet size is
  617.   smaller than the size of the datagram.  To overcome this difficulty, a
  618.   fragmentation mechanism is provided in the internet protocol.
  619.  
  620.   Addressing
  621.  
  622.     A distinction is made between names, addresses, and routes [4].   A
  623.     name indicates what we seek.  An address indicates where it is.  A
  624.     route indicates how to get there.  The internet protocol deals
  625.     primarily with addresses.  It is the task of higher level (i.e.,
  626.     host-to-host or application) protocols to make the mapping from
  627.     names to addresses.   The internet module maps internet addresses to
  628.     local net addresses.  It is the task of lower level (i.e., local net
  629.     or gateways) procedures to make the mapping from local net addresses
  630.     to routes.
  631.  
  632.     Addresses are fixed length of four octets (32 bits).  An address
  633.     begins with a network number, followed by local address (called the
  634.     "rest" field).  There are three formats or classes of internet
  635.     addresses:  in class a, the high order bit is zero, the next 7 bits
  636.     are the network, and the last 24 bits are the local address; in
  637.     class b, the high order two bits are one-zero, the next 14 bits are
  638.     the network and the last 16 bits are the local address; in class c,
  639.     the high order three bits are one-one-zero, the next 21 bits are the
  640.     network and the last 8 bits are the local address.
  641.  
  642.     Care must be taken in mapping internet addresses to local net
  643.     addresses; a single physical host must be able to act as if it were
  644.     several distinct hosts to the extent of using several distinct
  645.     internet addresses.  Some hosts will also have several physical
  646.     interfaces (multi-homing).
  647.  
  648.     That is, provision must be made for a host to have several physical
  649.     interfaces to the network with each having several logical internet
  650.     addresses.
  651.  
  652.  
  653.  
  654.                                                                 [Page 7]
  655.  
  656.  
  657.  
  658.                                                           September 1981
  659. Internet Protocol
  660. Overview
  661.  
  662.  
  663.  
  664.     Examples of address mappings may be found in "Address Mappings" [5].
  665.  
  666.   Fragmentation
  667.  
  668.     Fragmentation of an internet datagram is necessary when it
  669.     originates in a local net that allows a large packet size and must
  670.     traverse a local net that limits packets to a smaller size to reach
  671.     its destination.
  672.  
  673.     An internet datagram can be marked "don't fragment."  Any internet
  674.     datagram so marked is not to be internet fragmented under any
  675.     circumstances.  If internet datagram marked don't fragment cannot be
  676.     delivered to its destination without fragmenting it, it is to be
  677.     discarded instead.
  678.  
  679.     Fragmentation, transmission and reassembly across a local network
  680.     which is invisible to the internet protocol module is called
  681.     intranet fragmentation and may be used [6].
  682.  
  683.     The internet fragmentation and reassembly procedure needs to be able
  684.     to break a datagram into an almost arbitrary number of pieces that
  685.     can be later reassembled.  The receiver of the fragments uses the
  686.     identification field to ensure that fragments of different datagrams
  687.     are not mixed.  The fragment offset field tells the receiver the
  688.     position of a fragment in the original datagram.  The fragment
  689.     offset and length determine the portion of the original datagram
  690.     covered by this fragment.  The more-fragments flag indicates (by
  691.     being reset) the last fragment.  These fields provide sufficient
  692.     information to reassemble datagrams.
  693.  
  694.     The identification field is used to distinguish the fragments of one
  695.     datagram from those of another.  The originating protocol module of
  696.     an internet datagram sets the identification field to a value that
  697.     must be unique for that source-destination pair and protocol for the
  698.     time the datagram will be active in the internet system.  The
  699.     originating protocol module of a complete datagram sets the
  700.     more-fragments flag to zero and the fragment offset to zero.
  701.  
  702.     To fragment a long internet datagram, an internet protocol module
  703.     (for example, in a gateway), creates two new internet datagrams and
  704.     copies the contents of the internet header fields from the long
  705.     datagram into both new internet headers.  The data of the long
  706.     datagram is divided into two portions on a 8 octet (64 bit) boundary
  707.     (the second portion might not be an integral multiple of 8 octets,
  708.     but the first must be).  Call the number of 8 octet blocks in the
  709.     first portion NFB (for Number of Fragment Blocks).  The first
  710.     portion of the data is placed in the first new internet datagram,
  711.     and the total length field is set to the length of the first
  712.  
  713.  
  714. [Page 8] 
  715.  
  716.  
  717.  
  718. September 1981 
  719.                                                        Internet Protocol
  720.                                                                 Overview
  721.  
  722.  
  723.  
  724.     datagram.  The more-fragments flag is set to one.  The second
  725.     portion of the data is placed in the second new internet datagram,
  726.     and the total length field is set to the length of the second
  727.     datagram.  The more-fragments flag carries the same value as the
  728.     long datagram.  The fragment offset field of the second new internet
  729.     datagram is set to the value of that field in the long datagram plus
  730.     NFB.
  731.  
  732.     This procedure can be generalized for an n-way split, rather than
  733.     the two-way split described.
  734.  
  735.     To assemble the fragments of an internet datagram, an internet
  736.     protocol module (for example at a destination host) combines
  737.     internet datagrams that all have the same value for the four fields:
  738.     identification, source, destination, and protocol.  The combination
  739.     is done by placing the data portion of each fragment in the relative
  740.     position indicated by the fragment offset in that fragment's
  741.     internet header.  The first fragment will have the fragment offset
  742.     zero, and the last fragment will have the more-fragments flag reset
  743.     to zero.
  744.  
  745. 2.4.  Gateways
  746.  
  747.   Gateways implement internet protocol to forward datagrams between
  748.   networks.  Gateways also implement the Gateway to Gateway Protocol
  749.   (GGP) [7] to coordinate routing and other internet control
  750.   information.
  751.  
  752.   In a gateway the higher level protocols need not be implemented and
  753.   the GGP functions are added to the IP module.
  754.  
  755.                                     
  756.                    +-------------------------------+   
  757.                    | Internet Protocol & ICMP & GGP|   
  758.                    +-------------------------------+   
  759.                            |                 |         
  760.                  +---------------+   +---------------+ 
  761.                  |   Local Net   |   |   Local Net   | 
  762.                  +---------------+   +---------------+ 
  763.  
  764.                            Gateway Protocols
  765.  
  766.                                Figure 3.
  767.  
  768.   
  769.  
  770.  
  771.  
  772.  
  773.  
  774.                                                                 [Page 9]
  775.  
  776.  
  777.  
  778.                                                           September 1981
  779. Internet Protocol
  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.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834. [Page 10]                                                               
  835.  
  836.  
  837.  
  838. September 1981                                                          
  839.                                                        Internet Protocol
  840.  
  841.  
  842.  
  843.                            3.  SPECIFICATION
  844.  
  845. 3.1.  Internet Header Format
  846.  
  847.   A summary of the contents of the internet header follows:
  848.  
  849.                                     
  850.     0                   1                   2                   3   
  851.     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 
  852.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  853.    |Version|  IHL  |Type of Service|          Total Length         |
  854.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  855.    |         Identification        |Flags|      Fragment Offset    |
  856.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  857.    |  Time to Live |    Protocol   |         Header Checksum       |
  858.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  859.    |                       Source Address                          |
  860.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  861.    |                    Destination Address                        |
  862.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  863.    |                    Options                    |    Padding    |
  864.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  865.  
  866.                     Example Internet Datagram Header
  867.  
  868.                                Figure 4.
  869.  
  870.   Note that each tick mark represents one bit position.
  871.  
  872.   Version:  4 bits
  873.  
  874.     The Version field indicates the format of the internet header.  This
  875.     document describes version 4.
  876.  
  877.   IHL:  4 bits
  878.  
  879.     Internet Header Length is the length of the internet header in 32
  880.     bit words, and thus points to the beginning of the data.  Note that
  881.     the minimum value for a correct header is 5.
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.                                                                [Page 11]
  895.  
  896.  
  897.  
  898.                                                           September 1981
  899. Internet Protocol
  900. Specification
  901.  
  902.  
  903.  
  904.   Type of Service:  8 bits
  905.  
  906.     The Type of Service provides an indication of the abstract
  907.     parameters of the quality of service desired.  These parameters are
  908.     to be used to guide the selection of the actual service parameters
  909.     when transmitting a datagram through a particular network.  Several
  910.     networks offer service precedence, which somehow treats high
  911.     precedence traffic as more important than other traffic (generally
  912.     by accepting only traffic above a certain precedence at time of high
  913.     load).  The major choice is a three way tradeoff between low-delay,
  914.     high-reliability, and high-throughput.
  915.  
  916.       Bits 0-2:  Precedence.
  917.       Bit    3:  0 = Normal Delay,      1 = Low Delay.
  918.       Bits   4:  0 = Normal Throughput, 1 = High Throughput.
  919.       Bits   5:  0 = Normal Relibility, 1 = High Relibility.
  920.       Bit  6-7:  Reserved for Future Use.
  921.  
  922.          0     1     2     3     4     5     6     7
  923.       +-----+-----+-----+-----+-----+-----+-----+-----+
  924.       |                 |     |     |     |     |     |
  925.       |   PRECEDENCE    |  D  |  T  |  R  |  0  |  0  |
  926.       |                 |     |     |     |     |     |
  927.       +-----+-----+-----+-----+-----+-----+-----+-----+
  928.  
  929.         Precedence
  930.  
  931.           111 - Network Control
  932.           110 - Internetwork Control
  933.           101 - CRITIC/ECP
  934.           100 - Flash Override
  935.           011 - Flash
  936.           010 - Immediate
  937.           001 - Priority
  938.           000 - Routine
  939.  
  940.     The use of the Delay, Throughput, and Reliability indications may
  941.     increase the cost (in some sense) of the service.  In many networks
  942.     better performance for one of these parameters is coupled with worse
  943.     performance on another.  Except for very unusual cases at most two
  944.     of these three indications should be set.
  945.  
  946.     The type of service is used to specify the treatment of the datagram
  947.     during its transmission through the internet system.  Example
  948.     mappings of the internet type of service to the actual service
  949.     provided on networks such as AUTODIN II, ARPANET, SATNET, and PRNET
  950.     is given in "Service Mappings" [8].
  951.  
  952.  
  953.  
  954. [Page 12]                                                               
  955.  
  956.  
  957.  
  958. September 1981                                                          
  959.                                                        Internet Protocol
  960.                                                            Specification
  961.  
  962.  
  963.  
  964.     The Network Control precedence designation is intended to be used
  965.     within a network only.  The actual use and control of that
  966.     designation is up to each network. The Internetwork Control
  967.     designation is intended for use by gateway control originators only.
  968.     If the actual use of these precedence designations is of concern to
  969.     a particular network, it is the responsibility of that network to
  970.     control the access to, and use of, those precedence designations.
  971.  
  972.   Total Length:  16 bits
  973.  
  974.     Total Length is the length of the datagram, measured in octets,
  975.     including internet header and data.  This field allows the length of
  976.     a datagram to be up to 65,535 octets.  Such long datagrams are
  977.     impractical for most hosts and networks.  All hosts must be prepared
  978.     to accept datagrams of up to 576 octets (whether they arrive whole
  979.     or in fragments).  It is recommended that hosts only send datagrams
  980.     larger than 576 octets if they have assurance that the destination
  981.     is prepared to accept the larger datagrams.
  982.  
  983.     The number 576 is selected to allow a reasonable sized data block to
  984.     be transmitted in addition to the required header information.  For
  985.     example, this size allows a data block of 512 octets plus 64 header
  986.     octets to fit in a datagram.  The maximal internet header is 60
  987.     octets, and a typical internet header is 20 octets, allowing a
  988.     margin for headers of higher level protocols.
  989.  
  990.   Identification:  16 bits
  991.  
  992.     An identifying value assigned by the sender to aid in assembling the
  993.     fragments of a datagram.
  994.  
  995.   Flags:  3 bits
  996.  
  997.     Various Control Flags.
  998.  
  999.       Bit 0: reserved, must be zero
  1000.       Bit 1: (DF) 0 = May Fragment,  1 = Don't Fragment.
  1001.       Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments.
  1002.  
  1003.           0   1   2
  1004.         +---+---+---+
  1005.         |   | D | M |
  1006.         | 0 | F | F |
  1007.         +---+---+---+
  1008.  
  1009.   Fragment Offset:  13 bits
  1010.  
  1011.     This field indicates where in the datagram this fragment belongs.
  1012.  
  1013.  
  1014.                                                                [Page 13]
  1015.  
  1016.  
  1017.  
  1018.                                                           September 1981
  1019. Internet Protocol
  1020. Specification
  1021.  
  1022.  
  1023.  
  1024.     The fragment offset is measured in units of 8 octets (64 bits).  The
  1025.     first fragment has offset zero.
  1026.  
  1027.   Time to Live:  8 bits
  1028.  
  1029.     This field indicates the maximum time the datagram is allowed to
  1030.     remain in the internet system.  If this field contains the value
  1031.     zero, then the datagram must be destroyed.  This field is modified
  1032.     in internet header processing.  The time is measured in units of
  1033.     seconds, but since every module that processes a datagram must
  1034.     decrease the TTL by at least one even if it process the datagram in
  1035.     less than a second, the TTL must be thought of only as an upper
  1036.     bound on the time a datagram may exist.  The intention is to cause
  1037.     undeliverable datagrams to be discarded, and to bound the maximum
  1038.     datagram lifetime.
  1039.  
  1040.   Protocol:  8 bits
  1041.  
  1042.     This field indicates the next level protocol used in the data
  1043.     portion of the internet datagram.  The values for various protocols
  1044.     are specified in "Assigned Numbers" [9].
  1045.  
  1046.   Header Checksum:  16 bits
  1047.  
  1048.     A checksum on the header only.  Since some header fields change
  1049.     (e.g., time to live), this is recomputed and verified at each point
  1050.     that the internet header is processed.
  1051.  
  1052.     The checksum algorithm is:
  1053.  
  1054.       The checksum field is the 16 bit one's complement of the one's
  1055.       complement sum of all 16 bit words in the header.  For purposes of
  1056.       computing the checksum, the value of the checksum field is zero.
  1057.  
  1058.     This is a simple to compute checksum and experimental evidence
  1059.     indicates it is adequate, but it is provisional and may be replaced
  1060.     by a CRC procedure, depending on further experience.
  1061.  
  1062.   Source Address:  32 bits
  1063.  
  1064.     The source address.  See section 3.2.
  1065.  
  1066.   Destination Address:  32 bits
  1067.  
  1068.     The destination address.  See section 3.2.
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074. [Page 14]                                                               
  1075.  
  1076.  
  1077.  
  1078. September 1981                                                          
  1079.                                                        Internet Protocol
  1080.                                                            Specification
  1081.  
  1082.  
  1083.  
  1084.   Options:  variable
  1085.  
  1086.     The options may appear or not in datagrams.  They must be
  1087.     implemented by all IP modules (host and gateways).  What is optional
  1088.     is their transmission in any particular datagram, not their
  1089.     implementation.
  1090.  
  1091.     In some environments the security option may be required in all
  1092.     datagrams.
  1093.  
  1094.     The option field is variable in length.  There may be zero or more
  1095.     options.  There are two cases for the format of an option:
  1096.  
  1097.       Case 1:  A single octet of option-type.
  1098.  
  1099.       Case 2:  An option-type octet, an option-length octet, and the
  1100.                actual option-data octets.
  1101.  
  1102.     The option-length octet counts the option-type octet and the
  1103.     option-length octet as well as the option-data octets.
  1104.  
  1105.     The option-type octet is viewed as having 3 fields:
  1106.  
  1107.       1 bit   copied flag,
  1108.       2 bits  option class,
  1109.       5 bits  option number.
  1110.  
  1111.     The copied flag indicates that this option is copied into all
  1112.     fragments on fragmentation.
  1113.  
  1114.       0 = not copied
  1115.       1 = copied
  1116.  
  1117.     The option classes are:
  1118.  
  1119.       0 = control
  1120.       1 = reserved for future use
  1121.       2 = debugging and measurement
  1122.       3 = reserved for future use
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.                                                                [Page 15]
  1135.  
  1136.  
  1137.  
  1138.                                                           September 1981
  1139. Internet Protocol
  1140. Specification
  1141.  
  1142.  
  1143.  
  1144.     The following internet options are defined:
  1145.  
  1146.       CLASS NUMBER LENGTH DESCRIPTION
  1147.       ----- ------ ------ -----------
  1148.         0     0      -    End of Option list.  This option occupies only
  1149.                           1 octet; it has no length octet.
  1150.         0     1      -    No Operation.  This option occupies only 1
  1151.                           octet; it has no length octet.
  1152.         0     2     11    Security.  Used to carry Security,
  1153.                           Compartmentation, User Group (TCC), and
  1154.                           Handling Restriction Codes compatible with DOD
  1155.                           requirements.
  1156.         0     3     var.  Loose Source Routing.  Used to route the
  1157.                           internet datagram based on information
  1158.                           supplied by the source.
  1159.         0     9     var.  Strict Source Routing.  Used to route the
  1160.                           internet datagram based on information
  1161.                           supplied by the source.
  1162.         0     7     var.  Record Route.  Used to trace the route an
  1163.                           internet datagram takes.
  1164.         0     8      4    Stream ID.  Used to carry the stream
  1165.                           identifier.
  1166.         2     4     var.  Internet Timestamp.
  1167.  
  1168.       
  1169.  
  1170.     Specific Option Definitions
  1171.  
  1172.       End of Option List
  1173.  
  1174.         +--------+
  1175.         |00000000|
  1176.         +--------+
  1177.           Type=0
  1178.  
  1179.         This option indicates the end of the option list.  This might
  1180.         not coincide with the end of the internet header according to
  1181.         the internet header length.  This is used at the end of all
  1182.         options, not the end of each option, and need only be used if
  1183.         the end of the options would not otherwise coincide with the end
  1184.         of the internet header.
  1185.  
  1186.         May be copied, introduced, or deleted on fragmentation, or for
  1187.         any other reason.
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194. [Page 16]                                                               
  1195.  
  1196.  
  1197.  
  1198. September 1981                                                          
  1199.                                                        Internet Protocol
  1200.                                                            Specification
  1201.  
  1202.  
  1203.  
  1204.       No Operation
  1205.  
  1206.         +--------+
  1207.         |00000001|
  1208.         +--------+
  1209.           Type=1
  1210.  
  1211.         This option may be used between options, for example, to align
  1212.         the beginning of a subsequent option on a 32 bit boundary.
  1213.  
  1214.         May be copied, introduced, or deleted on fragmentation, or for
  1215.         any other reason.
  1216.  
  1217.       Security
  1218.  
  1219.         This option provides a way for hosts to send security,
  1220.         compartmentation, handling restrictions, and TCC (closed user
  1221.         group) parameters.  The format for this option is as follows:
  1222.  
  1223.           +--------+--------+---//---+---//---+---//---+---//---+
  1224.           |10000010|00001011|SSS  SSS|CCC  CCC|HHH  HHH|  TCC   |
  1225.           +--------+--------+---//---+---//---+---//---+---//---+
  1226.            Type=130 Length=11
  1227.  
  1228.         Security (S field):  16 bits
  1229.  
  1230.           Specifies one of 16 levels of security (eight of which are
  1231.           reserved for future use).
  1232.  
  1233.             00000000 00000000 - Unclassified
  1234.             11110001 00110101 - Confidential
  1235.             01111000 10011010 - EFTO
  1236.             10111100 01001101 - MMMM
  1237.             01011110 00100110 - PROG
  1238.             10101111 00010011 - Restricted
  1239.             11010111 10001000 - Secret
  1240.             01101011 11000101 - Top Secret
  1241.             00110101 11100010 - (Reserved for future use)
  1242.             10011010 11110001 - (Reserved for future use)
  1243.             01001101 01111000 - (Reserved for future use)
  1244.             00100100 10111101 - (Reserved for future use)
  1245.             00010011 01011110 - (Reserved for future use)
  1246.             10001001 10101111 - (Reserved for future use)
  1247.             11000100 11010110 - (Reserved for future use)
  1248.             11100010 01101011 - (Reserved for future use)
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.                                                                [Page 17]
  1255.  
  1256.  
  1257.  
  1258.                                                           September 1981
  1259. Internet Protocol
  1260. Specification
  1261.  
  1262.  
  1263.  
  1264.         Compartments (C field):  16 bits
  1265.  
  1266.           An all zero value is used when the information transmitted is
  1267.           not compartmented.  Other values for the compartments field
  1268.           may be obtained from the Defense Intelligence Agency.
  1269.  
  1270.         Handling Restrictions (H field):  16 bits
  1271.  
  1272.           The values for the control and release markings are
  1273.           alphanumeric digraphs and are defined in the Defense
  1274.           Intelligence Agency Manual DIAM 65-19, "Standard Security
  1275.           Markings".
  1276.  
  1277.         Transmission Control Code (TCC field):  24 bits
  1278.  
  1279.           Provides a means to segregate traffic and define controlled
  1280.           communities of interest among subscribers. The TCC values are
  1281.           trigraphs, and are available from HQ DCA Code 530.
  1282.  
  1283.         Must be copied on fragmentation.  This option appears at most
  1284.         once in a datagram.
  1285.  
  1286.       Loose Source and Record Route
  1287.  
  1288.         +--------+--------+--------+---------//--------+
  1289.         |10000011| length | pointer|     route data    |
  1290.         +--------+--------+--------+---------//--------+
  1291.          Type=131
  1292.  
  1293.         The loose source and record route (LSRR) option provides a means
  1294.         for the source of an internet datagram to supply routing
  1295.         information to be used by the gateways in forwarding the
  1296.         datagram to the destination, and to record the route
  1297.         information.
  1298.  
  1299.         The option begins with the option type code.  The second octet
  1300.         is the option length which includes the option type code and the
  1301.         length octet, the pointer octet, and length-3 octets of route
  1302.         data.  The third octet is the pointer into the route data
  1303.         indicating the octet which begins the next source address to be
  1304.         processed.  The pointer is relative to this option, and the
  1305.         smallest legal value for the pointer is 4.
  1306.  
  1307.         A route data is composed of a series of internet addresses.
  1308.         Each internet address is 32 bits or 4 octets.  If the pointer is
  1309.         greater than the length, the source route is empty (and the
  1310.         recorded route full) and the routing is to be based on the
  1311.         destination address field.
  1312.  
  1313.  
  1314. [Page 18]                                                               
  1315.  
  1316.  
  1317.  
  1318. September 1981                                                          
  1319.                                                        Internet Protocol
  1320.                                                            Specification
  1321.  
  1322.  
  1323.  
  1324.         If the address in destination address field has been reached and
  1325.         the pointer is not greater than the length, the next address in
  1326.         the source route replaces the address in the destination address
  1327.         field, and the recorded route address replaces the source
  1328.         address just used, and pointer is increased by four.
  1329.  
  1330.         The recorded route address is the internet module's own internet
  1331.         address as known in the environment into which this datagram is
  1332.         being forwarded.
  1333.  
  1334.         This procedure of replacing the source route with the recorded
  1335.         route (though it is in the reverse of the order it must be in to
  1336.         be used as a source route) means the option (and the IP header
  1337.         as a whole) remains a constant length as the datagram progresses
  1338.         through the internet.
  1339.  
  1340.         This option is a loose source route because the gateway or host
  1341.         IP is allowed to use any route of any number of other
  1342.         intermediate gateways to reach the next address in the route.
  1343.  
  1344.         Must be copied on fragmentation.  Appears at most once in a
  1345.         datagram.
  1346.  
  1347.       Strict Source and Record Route
  1348.  
  1349.         +--------+--------+--------+---------//--------+
  1350.         |10001001| length | pointer|     route data    |
  1351.         +--------+--------+--------+---------//--------+
  1352.          Type=137
  1353.  
  1354.         The strict source and record route (SSRR) option provides a
  1355.         means for the source of an internet datagram to supply routing
  1356.         information to be used by the gateways in forwarding the
  1357.         datagram to the destination, and to record the route
  1358.         information.
  1359.  
  1360.         The option begins with the option type code.  The second octet
  1361.         is the option length which includes the option type code and the
  1362.         length octet, the pointer octet, and length-3 octets of route
  1363.         data.  The third octet is the pointer into the route data
  1364.         indicating the octet which begins the next source address to be
  1365.         processed.  The pointer is relative to this option, and the
  1366.         smallest legal value for the pointer is 4.
  1367.  
  1368.         A route data is composed of a series of internet addresses.
  1369.         Each internet address is 32 bits or 4 octets.  If the pointer is
  1370.         greater than the length, the source route is empty (and the
  1371.  
  1372.  
  1373.  
  1374.                                                                [Page 19]
  1375.  
  1376.  
  1377.  
  1378.                                                           September 1981
  1379. Internet Protocol
  1380. Specification
  1381.  
  1382.  
  1383.  
  1384.         recorded route full) and the routing is to be based on the
  1385.         destination address field.
  1386.  
  1387.         If the address in destination address field has been reached and
  1388.         the pointer is not greater than the length, the next address in
  1389.         the source route replaces the address in the destination address
  1390.         field, and the recorded route address replaces the source
  1391.         address just used, and pointer is increased by four.
  1392.  
  1393.         The recorded route address is the internet module's own internet
  1394.         address as known in the environment into which this datagram is
  1395.         being forwarded.
  1396.  
  1397.         This procedure of replacing the source route with the recorded
  1398.         route (though it is in the reverse of the order it must be in to
  1399.         be used as a source route) means the option (and the IP header
  1400.         as a whole) remains a constant length as the datagram progresses
  1401.         through the internet.
  1402.  
  1403.         This option is a strict source route because the gateway or host
  1404.         IP must send the datagram directly to the next address in the
  1405.         source route through only the directly connected network
  1406.         indicated in the next address to reach the next gateway or host
  1407.         specified in the route.
  1408.  
  1409.         Must be copied on fragmentation.  Appears at most once in a
  1410.         datagram.
  1411.  
  1412.       Record Route
  1413.  
  1414.         +--------+--------+--------+---------//--------+
  1415.         |00000111| length | pointer|     route data    |
  1416.         +--------+--------+--------+---------//--------+
  1417.           Type=7
  1418.  
  1419.         The record route option provides a means to record the route of
  1420.         an internet datagram.
  1421.  
  1422.         The option begins with the option type code.  The second octet
  1423.         is the option length which includes the option type code and the
  1424.         length octet, the pointer octet, and length-3 octets of route
  1425.         data.  The third octet is the pointer into the route data
  1426.         indicating the octet which begins the next area to store a route
  1427.         address.  The pointer is relative to this option, and the
  1428.         smallest legal value for the pointer is 4.
  1429.  
  1430.         A recorded route is composed of a series of internet addresses.
  1431.         Each internet address is 32 bits or 4 octets.  If the pointer is
  1432.  
  1433.  
  1434. [Page 20]                                                               
  1435.  
  1436.  
  1437.  
  1438. September 1981                                                          
  1439.                                                        Internet Protocol
  1440.                                                            Specification
  1441.  
  1442.  
  1443.  
  1444.         greater than the length, the recorded route data area is full.
  1445.         The originating host must compose this option with a large
  1446.         enough route data area to hold all the address expected.  The
  1447.         size of the option does not change due to adding addresses.  The
  1448.         intitial contents of the route data area must be zero.
  1449.  
  1450.         When an internet module routes a datagram it checks to see if
  1451.         the record route option is present.  If it is, it inserts its
  1452.         own internet address as known in the environment into which this
  1453.         datagram is being forwarded into the recorded route begining at
  1454.         the octet indicated by the pointer, and increments the pointer
  1455.         by four.
  1456.  
  1457.         If the route data area is already full (the pointer exceeds the
  1458.         length) the datagram is forwarded without inserting the address
  1459.         into the recorded route.  If there is some room but not enough
  1460.         room for a full address to be inserted, the original datagram is
  1461.         considered to be in error and is discarded.  In either case an
  1462.         ICMP parameter problem message may be sent to the source
  1463.         host [3].
  1464.  
  1465.         Not copied on fragmentation, goes in first fragment only.
  1466.         Appears at most once in a datagram.
  1467.  
  1468.       Stream Identifier
  1469.  
  1470.         +--------+--------+--------+--------+
  1471.         |10001000|00000010|    Stream ID    |
  1472.         +--------+--------+--------+--------+
  1473.          Type=136 Length=4
  1474.  
  1475.         This option provides a way for the 16-bit SATNET stream
  1476.         identifier to be carried through networks that do not support
  1477.         the stream concept.
  1478.  
  1479.         Must be copied on fragmentation.  Appears at most once in a
  1480.         datagram.
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.                                                                [Page 21]
  1495.  
  1496.  
  1497.  
  1498.                                                           September 1981
  1499. Internet Protocol
  1500. Specification
  1501.  
  1502.  
  1503.  
  1504.       Internet Timestamp
  1505.  
  1506.         +--------+--------+--------+--------+
  1507.         |01000100| length | pointer|oflw|flg|
  1508.         +--------+--------+--------+--------+
  1509.         |         internet address          |
  1510.         +--------+--------+--------+--------+
  1511.         |             timestamp             |
  1512.         +--------+--------+--------+--------+
  1513.         |                 .                 |
  1514.                           .
  1515.                           .
  1516.         Type = 68
  1517.  
  1518.         The Option Length is the number of octets in the option counting
  1519.         the type, length, pointer, and overflow/flag octets (maximum
  1520.         length 40).
  1521.  
  1522.         The Pointer is the number of octets from the beginning of this
  1523.         option to the end of timestamps plus one (i.e., it points to the
  1524.         octet beginning the space for next timestamp).  The smallest
  1525.         legal value is 5.  The timestamp area is full when the pointer
  1526.         is greater than the length.
  1527.  
  1528.         The Overflow (oflw) [4 bits] is the number of IP modules that
  1529.         cannot register timestamps due to lack of space.
  1530.  
  1531.         The Flag (flg) [4 bits] values are
  1532.  
  1533.           0 -- time stamps only, stored in consecutive 32-bit words,
  1534.  
  1535.           1 -- each timestamp is preceded with internet address of the
  1536.                registering entity,
  1537.  
  1538.           3 -- the internet address fields are prespecified.  An IP
  1539.                module only registers its timestamp if it matches its own
  1540.                address with the next specified internet address.
  1541.  
  1542.         The Timestamp is a right-justified, 32-bit timestamp in
  1543.         milliseconds since midnight UT.  If the time is not available in
  1544.         milliseconds or cannot be provided with respect to midnight UT
  1545.         then any time may be inserted as a timestamp provided the high
  1546.         order bit of the timestamp field is set to one to indicate the
  1547.         use of a non-standard value.
  1548.  
  1549.         The originating host must compose this option with a large
  1550.         enough timestamp data area to hold all the timestamp information
  1551.         expected.  The size of the option does not change due to adding
  1552.  
  1553.  
  1554. [Page 22]                                                               
  1555.  
  1556.  
  1557.  
  1558. September 1981                                                          
  1559.                                                        Internet Protocol
  1560.                                                            Specification
  1561.  
  1562.  
  1563.  
  1564.         timestamps.  The intitial contents of the timestamp data area
  1565.         must be zero or internet address/zero pairs.
  1566.  
  1567.         If the timestamp data area is already full (the pointer exceeds
  1568.         the length) the datagram is forwarded without inserting the
  1569.         timestamp, but the overflow count is incremented by one.
  1570.  
  1571.         If there is some room but not enough room for a full timestamp
  1572.         to be inserted, or the overflow count itself overflows, the
  1573.         original datagram is considered to be in error and is discarded.
  1574.         In either case an ICMP parameter problem message may be sent to
  1575.         the source host [3].
  1576.  
  1577.         The timestamp option is not copied upon fragmentation.  It is
  1578.         carried in the first fragment.  Appears at most once in a
  1579.         datagram.
  1580.  
  1581.   Padding:  variable
  1582.  
  1583.     The internet header padding is used to ensure that the internet
  1584.     header ends on a 32 bit boundary.  The padding is zero.
  1585.  
  1586. 3.2.  Discussion
  1587.  
  1588.   The implementation of a protocol must be robust.  Each implementation
  1589.   must expect to interoperate with others created by different
  1590.   individuals.  While the goal of this specification is to be explicit
  1591.   about the protocol there is the possibility of differing
  1592.   interpretations.  In general, an implementation must be conservative
  1593.   in its sending behavior, and liberal in its receiving behavior.  That
  1594.   is, it must be careful to send well-formed datagrams, but must accept
  1595.   any datagram that it can interpret (e.g., not object to technical
  1596.   errors where the meaning is still clear).
  1597.  
  1598.   The basic internet service is datagram oriented and provides for the
  1599.   fragmentation of datagrams at gateways, with reassembly taking place
  1600.   at the destination internet protocol module in the destination host.
  1601.   Of course, fragmentation and reassembly of datagrams within a network
  1602.   or by private agreement between the gateways of a network is also
  1603.   allowed since this is transparent to the internet protocols and the
  1604.   higher-level protocols.  This transparent type of fragmentation and
  1605.   reassembly is termed "network-dependent" (or intranet) fragmentation
  1606.   and is not discussed further here.
  1607.  
  1608.   Internet addresses distinguish sources and destinations to the host
  1609.   level and provide a protocol field as well.  It is assumed that each
  1610.   protocol will provide for whatever multiplexing is necessary within a
  1611.   host.
  1612.  
  1613.  
  1614.                                                                [Page 23]
  1615.  
  1616.  
  1617.  
  1618.                                                           September 1981
  1619. Internet Protocol
  1620. Specification
  1621.  
  1622.  
  1623.  
  1624.   Addressing
  1625.  
  1626.     To provide for flexibility in assigning address to networks and
  1627.     allow for the  large number of small to intermediate sized networks
  1628.     the interpretation of the address field is coded to specify a small
  1629.     number of networks with a large number of host, a moderate number of
  1630.     networks with a moderate number of hosts, and a large number of
  1631.     networks with a small number of hosts.  In addition there is an
  1632.     escape code for extended addressing mode.
  1633.  
  1634.     Address Formats:
  1635.  
  1636.       High Order Bits   Format                           Class
  1637.       ---------------   -------------------------------  -----
  1638.             0            7 bits of net, 24 bits of host    a
  1639.             10          14 bits of net, 16 bits of host    b
  1640.             110         21 bits of net,  8 bits of host    c
  1641.             111         escape to extended addressing mode
  1642.  
  1643.       A value of zero in the network field means this network.  This is
  1644.       only used in certain ICMP messages.  The extended addressing mode
  1645.       is undefined.  Both of these features are reserved for future use.
  1646.  
  1647.     The actual values assigned for network addresses is given in
  1648.     "Assigned Numbers" [9].
  1649.  
  1650.     The local address, assigned by the local network, must allow for a
  1651.     single physical host to act as several distinct internet hosts.
  1652.     That is, there must be a mapping between internet host addresses and
  1653.     network/host interfaces that allows several internet addresses to
  1654.     correspond to one interface.  It must also be allowed for a host to
  1655.     have several physical interfaces and to treat the datagrams from
  1656.     several of them as if they were all addressed to a single host.
  1657.  
  1658.     Address mappings between internet addresses and addresses for
  1659.     ARPANET, SATNET, PRNET, and other networks are described in "Address
  1660.     Mappings" [5].
  1661.  
  1662.   Fragmentation and Reassembly.
  1663.  
  1664.     The internet identification field (ID) is used together with the
  1665.     source and destination address, and the protocol fields, to identify
  1666.     datagram fragments for reassembly.
  1667.  
  1668.     The More Fragments flag bit (MF) is set if the datagram is not the
  1669.     last fragment.  The Fragment Offset field identifies the fragment
  1670.     location, relative to the beginning of the original unfragmented
  1671.     datagram.  Fragments are counted in units of 8 octets.  The
  1672.  
  1673.  
  1674. [Page 24]                                                               
  1675.  
  1676.  
  1677.  
  1678. September 1981                                                          
  1679.                                                        Internet Protocol
  1680.                                                            Specification
  1681.  
  1682.  
  1683.  
  1684.     fragmentation strategy is designed so than an unfragmented datagram
  1685.     has all zero fragmentation information (MF = 0, fragment offset =
  1686.     0).  If an internet datagram is fragmented, its data portion must be
  1687.     broken on 8 octet boundaries.
  1688.  
  1689.     This format allows 2**13 = 8192 fragments of 8 octets each for a
  1690.     total of 65,536 octets.  Note that this is consistent with the the
  1691.     datagram total length field (of course, the header is counted in the
  1692.     total length and not in the fragments).
  1693.  
  1694.     When fragmentation occurs, some options are copied, but others
  1695.     remain with the first fragment only.
  1696.  
  1697.     Every internet module must be able to forward a datagram of 68
  1698.     octets without further fragmentation.  This is because an internet
  1699.     header may be up to 60 octets, and the minimum fragment is 8 octets.
  1700.  
  1701.     Every internet destination must be able to receive a datagram of 576
  1702.     octets either in one piece or in fragments to be reassembled.
  1703.  
  1704.     The fields which may be affected by fragmentation include:
  1705.  
  1706.       (1) options field
  1707.       (2) more fragments flag
  1708.       (3) fragment offset
  1709.       (4) internet header length field
  1710.       (5) total length field
  1711.       (6) header checksum
  1712.  
  1713.     If the Don't Fragment flag (DF) bit is set, then internet
  1714.     fragmentation of this datagram is NOT permitted, although it may be
  1715.     discarded.  This can be used to prohibit fragmentation in cases
  1716.     where the receiving host does not have sufficient resources to
  1717.     reassemble internet fragments.
  1718.  
  1719.     One example of use of the Don't Fragment feature is to down line
  1720.     load a small host.  A small host could have a boot strap program
  1721.     that accepts a datagram stores it in memory and then executes it.
  1722.  
  1723.     The fragmentation and reassembly procedures are most easily
  1724.     described by examples.  The following procedures are example
  1725.     implementations.
  1726.  
  1727.     General notation in the following pseudo programs: "=<" means "less
  1728.     than or equal", "#" means "not equal", "=" means "equal", "<-" means
  1729.     "is set to".  Also, "x to y" includes x and excludes y; for example,
  1730.     "4 to 7" would include 4, 5, and 6 (but not 7).
  1731.  
  1732.  
  1733.  
  1734.                                                                [Page 25]
  1735.  
  1736.  
  1737.  
  1738.                                                           September 1981
  1739. Internet Protocol
  1740. Specification
  1741.  
  1742.  
  1743.  
  1744.     An Example Fragmentation Procedure
  1745.  
  1746.       The maximum sized datagram that can be transmitted through the
  1747.       next network is called the maximum transmission unit (MTU).
  1748.  
  1749.       If the total length is less than or equal the maximum transmission
  1750.       unit then submit this datagram to the next step in datagram
  1751.       processing; otherwise cut the datagram into two fragments, the
  1752.       first fragment being the maximum size, and the second fragment
  1753.       being the rest of the datagram.  The first fragment is submitted
  1754.       to the next step in datagram processing, while the second fragment
  1755.       is submitted to this procedure in case it is still too large.
  1756.  
  1757.       Notation:
  1758.  
  1759.         FO    -  Fragment Offset
  1760.         IHL   -  Internet Header Length
  1761.         DF    -  Don't Fragment flag
  1762.         MF    -  More Fragments flag
  1763.         TL    -  Total Length
  1764.         OFO   -  Old Fragment Offset
  1765.         OIHL  -  Old Internet Header Length
  1766.         OMF   -  Old More Fragments flag
  1767.         OTL   -  Old Total Length
  1768.         NFB   -  Number of Fragment Blocks
  1769.         MTU   -  Maximum Transmission Unit
  1770.  
  1771.       Procedure:
  1772.  
  1773.         IF TL =< MTU THEN Submit this datagram to the next step
  1774.              in datagram processing ELSE IF DF = 1 THEN discard the
  1775.         datagram ELSE
  1776.         To produce the first fragment:
  1777.         (1)  Copy the original internet header;
  1778.         (2)  OIHL <- IHL; OTL <- TL; OFO <- FO; OMF <- MF;
  1779.         (3)  NFB <- (MTU-IHL*4)/8;
  1780.         (4)  Attach the first NFB*8 data octets;
  1781.         (5)  Correct the header:
  1782.              MF <- 1;  TL <- (IHL*4)+(NFB*8);
  1783.              Recompute Checksum;
  1784.         (6)  Submit this fragment to the next step in
  1785.              datagram processing;
  1786.         To produce the second fragment:
  1787.         (7)  Selectively copy the internet header (some options
  1788.              are not copied, see option definitions);
  1789.         (8)  Append the remaining data;
  1790.         (9)  Correct the header:
  1791.              IHL <- (((OIHL*4)-(length of options not copied))+3)/4;
  1792.  
  1793.  
  1794. [Page 26]                                                               
  1795.  
  1796.  
  1797.  
  1798. September 1981                                                          
  1799.                                                        Internet Protocol
  1800.                                                            Specification
  1801.  
  1802.  
  1803.  
  1804.              TL <- OTL - NFB*8 - (OIHL-IHL)*4);
  1805.              FO <- OFO + NFB;  MF <- OMF;  Recompute Checksum;
  1806.         (10) Submit this fragment to the fragmentation test; DONE.
  1807.  
  1808.       In the above procedure each fragment (except the last) was made
  1809.       the maximum allowable size.  An alternative might produce less
  1810.       than the maximum size datagrams.  For example, one could implement
  1811.       a fragmentation procedure that repeatly divided large datagrams in
  1812.       half until the resulting fragments were less than the maximum
  1813.       transmission unit size.
  1814.  
  1815.     An Example Reassembly Procedure
  1816.  
  1817.       For each datagram the buffer identifier is computed as the
  1818.       concatenation of the source, destination, protocol, and
  1819.       identification fields.  If this is a whole datagram (that is both
  1820.       the fragment offset and the more fragments  fields are zero), then
  1821.       any reassembly resources associated with this buffer identifier
  1822.       are released and the datagram is forwarded to the next step in
  1823.       datagram processing.
  1824.  
  1825.       If no other fragment with this buffer identifier is on hand then
  1826.       reassembly resources are allocated.  The reassembly resources
  1827.       consist of a data buffer, a header buffer, a fragment block bit
  1828.       table, a total data length field, and a timer.  The data from the
  1829.       fragment is placed in the data buffer according to its fragment
  1830.       offset and length, and bits are set in the fragment block bit
  1831.       table corresponding to the fragment blocks received.
  1832.  
  1833.       If this is the first fragment (that is the fragment offset is
  1834.       zero)  this header is placed in the header buffer.  If this is the
  1835.       last fragment ( that is the more fragments field is zero) the
  1836.       total data length is computed.  If this fragment completes the
  1837.       datagram (tested by checking the bits set in the fragment block
  1838.       table), then the datagram is sent to the next step in datagram
  1839.       processing; otherwise the timer is set to the maximum of the
  1840.       current timer value and the value of the time to live field from
  1841.       this fragment; and the reassembly routine gives up control.
  1842.  
  1843.       If the timer runs out, the all reassembly resources for this
  1844.       buffer identifier are released.  The initial setting of the timer
  1845.       is a lower bound on the reassembly waiting time.  This is because
  1846.       the waiting time will be increased if the Time to Live in the
  1847.       arriving fragment is greater than the current timer value but will
  1848.       not be decreased if it is less.  The maximum this timer value
  1849.       could reach is the maximum time to live (approximately 4.25
  1850.       minutes).  The current recommendation for the initial timer
  1851.       setting is 15 seconds.  This may be changed as experience with
  1852.  
  1853.  
  1854.                                                                [Page 27]
  1855.  
  1856.  
  1857.  
  1858.                                                           September 1981
  1859. Internet Protocol
  1860. Specification
  1861.  
  1862.  
  1863.  
  1864.       this protocol accumulates.  Note that the choice of this parameter
  1865.       value is related to the buffer capacity available and the data
  1866.       rate of the transmission medium; that is, data rate times timer
  1867.       value equals buffer size (e.g., 10Kb/s X 15s = 150Kb).
  1868.  
  1869.       Notation:
  1870.  
  1871.         FO    -  Fragment Offset
  1872.         IHL   -  Internet Header Length
  1873.         MF    -  More Fragments flag
  1874.         TTL   -  Time To Live
  1875.         NFB   -  Number of Fragment Blocks
  1876.         TL    -  Total Length
  1877.         TDL   -  Total Data Length
  1878.         BUFID -  Buffer Identifier
  1879.         RCVBT -  Fragment Received Bit Table
  1880.         TLB   -  Timer Lower Bound
  1881.  
  1882.       Procedure:
  1883.  
  1884.         (1)  BUFID <- source|destination|protocol|identification;
  1885.         (2)  IF FO = 0 AND MF = 0
  1886.         (3)     THEN IF buffer with BUFID is allocated
  1887.         (4)             THEN flush all reassembly for this BUFID;
  1888.         (5)          Submit datagram to next step; DONE.
  1889.         (6)     ELSE IF no buffer with BUFID is allocated
  1890.         (7)             THEN allocate reassembly resources
  1891.                              with BUFID;
  1892.                              TIMER <- TLB; TDL <- 0;
  1893.         (8)          put data from fragment into data buffer with
  1894.                      BUFID from octet FO*8 to
  1895.                                          octet (TL-(IHL*4))+FO*8;
  1896.         (9)          set RCVBT bits from FO
  1897.                                         to FO+((TL-(IHL*4)+7)/8);
  1898.         (10)         IF MF = 0 THEN TDL <- TL-(IHL*4)+(FO*8)
  1899.         (11)         IF FO = 0 THEN put header in header buffer
  1900.         (12)         IF TDL # 0
  1901.         (13)          AND all RCVBT bits from 0
  1902.                                              to (TDL+7)/8 are set
  1903.         (14)            THEN TL <- TDL+(IHL*4)
  1904.         (15)                 Submit datagram to next step;
  1905.         (16)                 free all reassembly resources
  1906.                              for this BUFID; DONE.
  1907.         (17)         TIMER <- MAX(TIMER,TTL);
  1908.         (18)         give up until next fragment or timer expires;
  1909.         (19) timer expires: flush all reassembly with this BUFID; DONE.
  1910.  
  1911.       In the case that two or more fragments contain the same data
  1912.  
  1913.  
  1914. [Page 28]                                                               
  1915.  
  1916.  
  1917.  
  1918. September 1981                                                          
  1919.                                                        Internet Protocol
  1920.                                                            Specification
  1921.  
  1922.  
  1923.  
  1924.       either identically or through a partial overlap, this procedure
  1925.       will use the more recently arrived copy in the data buffer and
  1926.       datagram delivered.
  1927.  
  1928.   Identification
  1929.  
  1930.     The choice of the Identifier for a datagram is based on the need to
  1931.     provide a way to uniquely identify the fragments of a particular
  1932.     datagram.  The protocol module assembling fragments judges fragments
  1933.     to belong to the same datagram if they have the same source,
  1934.     destination, protocol, and Identifier.  Thus, the sender must choose
  1935.     the Identifier to be unique for this source, destination pair and
  1936.     protocol for the time the datagram (or any fragment of it) could be
  1937.     alive in the internet.
  1938.  
  1939.     It seems then that a sending protocol module needs to keep a table
  1940.     of Identifiers, one entry for each destination it has communicated
  1941.     with in the last maximum packet lifetime for the internet.
  1942.  
  1943.     However, since the Identifier field allows 65,536 different values,
  1944.     some host may be able to simply use unique identifiers independent
  1945.     of destination.
  1946.  
  1947.     It is appropriate for some higher level protocols to choose the
  1948.     identifier. For example, TCP protocol modules may retransmit an
  1949.     identical TCP segment, and the probability for correct reception
  1950.     would be enhanced if the retransmission carried the same identifier
  1951.     as the original transmission since fragments of either datagram
  1952.     could be used to construct a correct TCP segment.
  1953.  
  1954.   Type of Service
  1955.  
  1956.     The type of service (TOS) is for internet service quality selection.
  1957.     The type of service is specified along the abstract parameters
  1958.     precedence, delay, throughput, and reliability.  These abstract
  1959.     parameters are to be mapped into the actual service parameters of
  1960.     the particular networks the datagram traverses.
  1961.  
  1962.     Precedence.  An independent measure of the importance of this
  1963.     datagram.
  1964.  
  1965.     Delay.  Prompt delivery is important for datagrams with this
  1966.     indication.
  1967.  
  1968.     Throughput.  High data rate is important for datagrams with this
  1969.     indication.
  1970.  
  1971.  
  1972.  
  1973.  
  1974.                                                                [Page 29]
  1975.  
  1976.  
  1977.  
  1978.                                                           September 1981
  1979. Internet Protocol
  1980. Specification
  1981.  
  1982.  
  1983.  
  1984.     Reliability.  A higher level of effort to ensure delivery is
  1985.     important for datagrams with this indication.
  1986.  
  1987.     For example, the ARPANET has a priority bit, and a choice between
  1988.     "standard" messages (type 0) and "uncontrolled" messages (type 3),
  1989.     (the choice between single packet and multipacket messages can also
  1990.     be considered a service parameter). The uncontrolled messages tend
  1991.     to be less reliably delivered and suffer less delay.  Suppose an
  1992.     internet datagram is to be sent through the ARPANET.  Let the
  1993.     internet type of service be given as:
  1994.  
  1995.       Precedence:    5
  1996.       Delay:         0
  1997.       Throughput:    1
  1998.       Reliability:   1
  1999.  
  2000.     In this example, the mapping of these parameters to those available
  2001.     for the ARPANET would be  to set the ARPANET priority bit on since
  2002.     the Internet precedence is in the upper half of its range, to select
  2003.     standard messages since the throughput and reliability requirements
  2004.     are indicated and delay is not.  More details are given on service
  2005.     mappings in "Service Mappings" [8].
  2006.  
  2007.   Time to Live
  2008.  
  2009.     The time to live is set by the sender to the maximum time the
  2010.     datagram is allowed to be in the internet system.  If the datagram
  2011.     is in the internet system longer than the time to live, then the
  2012.     datagram must be destroyed.
  2013.  
  2014.     This field must be decreased at each point that the internet header
  2015.     is processed to reflect the time spent processing the datagram.
  2016.     Even if no local information is available on the time actually
  2017.     spent, the field must be decremented by 1.  The time is measured in
  2018.     units of seconds (i.e. the value 1 means one second).  Thus, the
  2019.     maximum time to live is 255 seconds or 4.25 minutes.  Since every
  2020.     module that processes a datagram must decrease the TTL by at least
  2021.     one even if it process the datagram in less than a second, the TTL
  2022.     must be thought of only as an upper bound on the time a datagram may
  2023.     exist.  The intention is to cause undeliverable datagrams to be
  2024.     discarded, and to bound the maximum datagram lifetime.
  2025.  
  2026.     Some higher level reliable connection protocols are based on
  2027.     assumptions that old duplicate datagrams will not arrive after a
  2028.     certain time elapses.  The TTL is a way for such protocols to have
  2029.     an assurance that their assumption is met.
  2030.  
  2031.  
  2032.  
  2033.  
  2034. [Page 30]                                                               
  2035.  
  2036.  
  2037.  
  2038. September 1981                                                          
  2039.                                                        Internet Protocol
  2040.                                                            Specification
  2041.  
  2042.  
  2043.  
  2044.   Options
  2045.  
  2046.     The options are optional in each datagram, but required in
  2047.     implementations.  That is, the presence or absence of an option is
  2048.     the choice of the sender, but each internet module must be able to
  2049.     parse every option.  There can be several options present in the
  2050.     option field.
  2051.  
  2052.     The options might not end on a 32-bit boundary.  The internet header
  2053.     must be filled out with octets of zeros.  The first of these would
  2054.     be interpreted as the end-of-options option, and the remainder as
  2055.     internet header padding.
  2056.  
  2057.     Every internet module must be able to act on every option.  The
  2058.     Security Option is required if classified, restricted, or
  2059.     compartmented traffic is to be passed.
  2060.  
  2061.   Checksum
  2062.  
  2063.     The internet header checksum is recomputed if the internet header is
  2064.     changed.  For example, a reduction of the time to live, additions or
  2065.     changes to internet options, or due to fragmentation.  This checksum
  2066.     at the internet level is intended to protect the internet header
  2067.     fields from transmission errors.
  2068.  
  2069.     There are some applications where a few data bit errors are
  2070.     acceptable while retransmission delays are not.  If the internet
  2071.     protocol enforced data correctness such applications could not be
  2072.     supported.
  2073.  
  2074.   Errors
  2075.  
  2076.     Internet protocol errors may be reported via the ICMP messages [3].
  2077.  
  2078. 3.3.  Interfaces
  2079.  
  2080.   The functional description of user interfaces to the IP is, at best,
  2081.   fictional, since every operating system will have different
  2082.   facilities.  Consequently, we must warn readers that different IP
  2083.   implementations may have different user interfaces.  However, all IPs
  2084.   must provide a certain minimum  set of services to guarantee that all
  2085.   IP implementations can support the same protocol hierarchy.  This
  2086.   section specifies the functional interfaces required of all IP
  2087.   implementations.
  2088.  
  2089.   Internet protocol interfaces on one side to the local network and on
  2090.   the other side to either a higher level protocol or an application
  2091.   program.  In the following, the higher level protocol or application
  2092.  
  2093.  
  2094.                                                                [Page 31]
  2095.  
  2096.  
  2097.  
  2098.                                                           September 1981
  2099. Internet Protocol
  2100. Specification
  2101.  
  2102.  
  2103.  
  2104.   program (or even a gateway program) will be called the "user" since it
  2105.   is using the internet module.  Since internet protocol is a datagram
  2106.   protocol, there is minimal memory or state maintained between datagram
  2107.   transmissions, and each call on the internet protocol module by the
  2108.   user supplies all information necessary for the IP to perform the
  2109.   service requested.
  2110.  
  2111.   An Example Upper Level Interface
  2112.  
  2113.   The following two example calls satisfy the requirements for the user
  2114.   to internet protocol module communication ("=>" means returns):
  2115.  
  2116.   SEND (src, dst, prot, TOS, TTL, BufPTR, len, Id, DF, opt => result)
  2117.  
  2118.     where:
  2119.  
  2120.       src = source address
  2121.       dst = destination address
  2122.       prot = protocol
  2123.       TOS = type of service
  2124.       TTL = time to live
  2125.       BufPTR = buffer pointer
  2126.       len = length of buffer
  2127.       Id  = Identifier
  2128.       DF = Don't Fragment
  2129.       opt = option data
  2130.       result = response
  2131.         OK = datagram sent ok
  2132.         Error = error in arguments or local network error
  2133.  
  2134.     Note that the precedence is included in the TOS and the
  2135.     security/compartment is passed as an option.
  2136.  
  2137.   RECV (BufPTR, prot, => result, src, dst, TOS, len, opt)
  2138.  
  2139.     where:
  2140.  
  2141.       BufPTR = buffer pointer
  2142.       prot = protocol
  2143.       result = response
  2144.         OK = datagram received ok
  2145.         Error = error in arguments
  2146.       len = length of buffer
  2147.       src = source address
  2148.       dst = destination address
  2149.       TOS = type of service
  2150.       opt = option data
  2151.  
  2152.  
  2153.  
  2154. [Page 32]                                                               
  2155.  
  2156.  
  2157.  
  2158. September 1981                                                          
  2159.                                                        Internet Protocol
  2160.                                                            Specification
  2161.  
  2162.  
  2163.  
  2164.   When the user sends a datagram, it executes the SEND call supplying
  2165.   all the arguments.  The internet protocol module, on receiving this
  2166.   call, checks the arguments and prepares and sends the message.  If the
  2167.   arguments are good and the datagram is accepted by the local network,
  2168.   the call returns successfully.  If either the arguments are bad, or
  2169.   the datagram is not accepted by the local network, the call returns
  2170.   unsuccessfully.  On unsuccessful returns, a reasonable report must be
  2171.   made as to the cause of the problem, but the details of such reports
  2172.   are up to individual implementations.
  2173.  
  2174.   When a datagram arrives at the internet protocol module from the local
  2175.   network, either there is a pending RECV call from the user addressed
  2176.   or there is not.  In the first case, the pending call is satisfied by
  2177.   passing the information from the datagram to the user.  In the second
  2178.   case, the user addressed is notified of a pending datagram.  If the
  2179.   user addressed does not exist, an ICMP error message is returned to
  2180.   the sender, and the data is discarded.
  2181.  
  2182.   The notification of a user may be via a pseudo interrupt or similar
  2183.   mechanism, as appropriate in the particular operating system
  2184.   environment of the implementation.
  2185.  
  2186.   A user's RECV call may then either be immediately satisfied by a
  2187.   pending datagram, or the call may be pending until a datagram arrives.
  2188.  
  2189.   The source address is included in the send call in case the sending
  2190.   host has several addresses (multiple physical connections or logical
  2191.   addresses).  The internet module must check to see that the source
  2192.   address is one of the legal address for this host.
  2193.  
  2194.   An implementation may also allow or require a call to the internet
  2195.   module to indicate interest in or reserve exclusive use of a class of
  2196.   datagrams (e.g., all those with a certain value in the protocol
  2197.   field).
  2198.  
  2199.   This section functionally characterizes a USER/IP interface.  The
  2200.   notation used is similar to most procedure of function calls in high
  2201.   level languages, but this usage is not meant to rule out trap type
  2202.   service calls (e.g., SVCs, UUOs, EMTs), or any other form of
  2203.   interprocess communication.
  2204.  
  2205.   
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.                                                                [Page 33]
  2215.  
  2216.  
  2217.  
  2218.                                                           September 1981
  2219. Internet Protocol
  2220.  
  2221.  
  2222.  
  2223. APPENDIX A:  Examples & Scenarios
  2224.  
  2225. Example 1:
  2226.  
  2227.   This is an example of the minimal data carrying internet datagram:
  2228.  
  2229.                                     
  2230.     0                   1                   2                   3   
  2231.     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 
  2232.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2233.    |Ver= 4 |IHL= 5 |Type of Service|        Total Length = 21      |
  2234.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2235.    |      Identification = 111     |Flg=0|   Fragment Offset = 0   |
  2236.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2237.    |   Time = 123  |  Protocol = 1 |        header checksum        |
  2238.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2239.    |                         source address                        |
  2240.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2241.    |                      destination address                      |
  2242.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2243.    |     data      |                                                
  2244.    +-+-+-+-+-+-+-+-+                                                
  2245.  
  2246.                        Example Internet Datagram
  2247.  
  2248.                                Figure 5.
  2249.  
  2250.   Note that each tick mark represents one bit position.
  2251.  
  2252.   This is a internet datagram in version 4 of internet protocol; the
  2253.   internet header consists of five 32 bit words, and the total length of
  2254.   the datagram is 21 octets.  This datagram is a complete datagram (not
  2255.   a fragment).
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274. [Page 34]                                                               
  2275.  
  2276.  
  2277.  
  2278. September 1981                                                          
  2279.                                                        Internet Protocol
  2280.  
  2281.  
  2282.  
  2283. Example 2:
  2284.  
  2285.   In this example, we show first a moderate size internet datagram (452
  2286.   data octets), then two internet fragments that might result from the
  2287.   fragmentation of this datagram if the maximum sized transmission
  2288.   allowed were 280 octets.
  2289.  
  2290.                                     
  2291.     0                   1                   2                   3   
  2292.     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 
  2293.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2294.    |Ver= 4 |IHL= 5 |Type of Service|       Total Length = 472      |
  2295.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2296.    |     Identification = 111      |Flg=0|     Fragment Offset = 0 |
  2297.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2298.    |   Time = 123  | Protocol = 6  |        header checksum        |
  2299.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2300.    |                         source address                        |
  2301.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2302.    |                      destination address                      |
  2303.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2304.    |                             data                              |
  2305.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2306.    |                             data                              |
  2307.    \                                                               \
  2308.    \                                                               \
  2309.    |                             data                              |
  2310.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2311.    |             data              |                                
  2312.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                
  2313.  
  2314.                        Example Internet Datagram
  2315.  
  2316.                                Figure 6.
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.                                                                [Page 35]
  2335.  
  2336.  
  2337.  
  2338.                                                           September 1981
  2339. Internet Protocol
  2340.  
  2341.  
  2342.  
  2343.   Now the first fragment that results from splitting the datagram after
  2344.   256 data octets.
  2345.  
  2346.                                     
  2347.     0                   1                   2                   3   
  2348.     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 
  2349.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2350.    |Ver= 4 |IHL= 5 |Type of Service|       Total Length = 276      |
  2351.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2352.    |     Identification = 111      |Flg=1|     Fragment Offset = 0 |
  2353.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2354.    |   Time = 119  | Protocol = 6  |        Header Checksum        |
  2355.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2356.    |                         source address                        |
  2357.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2358.    |                      destination address                      |
  2359.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2360.    |                             data                              |
  2361.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2362.    |                             data                              |
  2363.    \                                                               \
  2364.    \                                                               \
  2365.    |                             data                              |
  2366.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2367.    |                             data                              |
  2368.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2369.  
  2370.                        Example Internet Fragment
  2371.  
  2372.                                Figure 7.
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394. [Page 36]                                                               
  2395.  
  2396.  
  2397.  
  2398. September 1981                                                          
  2399.                                                        Internet Protocol
  2400.  
  2401.  
  2402.  
  2403.   And the second fragment.
  2404.  
  2405.                                     
  2406.     0                   1                   2                   3   
  2407.     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 
  2408.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2409.    |Ver= 4 |IHL= 5 |Type of Service|       Total Length = 216      |
  2410.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2411.    |     Identification = 111      |Flg=0|  Fragment Offset  =  32 |
  2412.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2413.    |   Time = 119  | Protocol = 6  |        Header Checksum        |
  2414.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2415.    |                         source address                        |
  2416.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2417.    |                      destination address                      |
  2418.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2419.    |                             data                              |
  2420.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2421.    |                             data                              |
  2422.    \                                                               \
  2423.    \                                                               \
  2424.    |                             data                              |
  2425.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2426.    |            data               |                                
  2427.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                
  2428.  
  2429.                        Example Internet Fragment
  2430.  
  2431.                                Figure 8.
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.                                                                [Page 37]
  2455.  
  2456.  
  2457.  
  2458.                                                           September 1981
  2459. Internet Protocol
  2460.  
  2461.  
  2462.  
  2463. Example 3:
  2464.  
  2465.   Here, we show an example of a datagram containing options:
  2466.  
  2467.                                     
  2468.     0                   1                   2                   3   
  2469.     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 
  2470.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2471.    |Ver= 4 |IHL= 8 |Type of Service|       Total Length = 576      |
  2472.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2473.    |       Identification = 111    |Flg=0|     Fragment Offset = 0 |
  2474.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2475.    |   Time = 123  |  Protocol = 6 |       Header Checksum         |
  2476.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2477.    |                        source address                         |
  2478.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2479.    |                      destination address                      |
  2480.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2481.    | Opt. Code = x | Opt.  Len.= 3 | option value  | Opt. Code = x |
  2482.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2483.    | Opt. Len. = 4 |           option value        | Opt. Code = 1 |
  2484.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2485.    | Opt. Code = y | Opt. Len. = 3 |  option value | Opt. Code = 0 |
  2486.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2487.    |                             data                              |
  2488.    \                                                               \
  2489.    \                                                               \
  2490.    |                             data                              |
  2491.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2492.    |                             data                              |
  2493.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2494.  
  2495.                        Example Internet Datagram
  2496.  
  2497.                                Figure 9.
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514. [Page 38]                                                               
  2515.  
  2516.  
  2517.  
  2518. September 1981                                                          
  2519.                                                        Internet Protocol
  2520.  
  2521.  
  2522.  
  2523. APPENDIX B:  Data Transmission Order
  2524.  
  2525. The order of transmission of the header and data described in this
  2526. document is resolved to the octet level.  Whenever a diagram shows a
  2527. group of octets, the order of transmission of those octets is the normal
  2528. order in which they are read in English.  For example, in the following
  2529. diagram the octets are transmitted in the order they are numbered.
  2530.  
  2531.                                     
  2532.     0                   1                   2                   3   
  2533.     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 
  2534.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2535.    |       1       |       2       |       3       |       4       |
  2536.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2537.    |       5       |       6       |       7       |       8       |
  2538.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2539.    |       9       |      10       |      11       |      12       |
  2540.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2541.  
  2542.                       Transmission Order of Bytes
  2543.  
  2544.                                Figure 10.
  2545.  
  2546. Whenever an octet represents a numeric quantity the left most bit in the
  2547. diagram is the high order or most significant bit.  That is, the bit
  2548. labeled 0 is the most significant bit.  For example, the following
  2549. diagram represents the value 170 (decimal).
  2550.  
  2551.                                     
  2552.                             0 1 2 3 4 5 6 7 
  2553.                            +-+-+-+-+-+-+-+-+
  2554.                            |1 0 1 0 1 0 1 0|
  2555.                            +-+-+-+-+-+-+-+-+
  2556.  
  2557.                           Significance of Bits
  2558.  
  2559.                                Figure 11.
  2560.  
  2561. Similarly, whenever a multi-octet field represents a numeric quantity
  2562. the left most bit of the whole field is the most significant bit.  When
  2563. a multi-octet quantity is transmitted the most significant octet is
  2564. transmitted first.
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.                                                                [Page 39]
  2575.  
  2576.  
  2577.  
  2578.                                                           September 1981
  2579. Internet Protocol
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634. [Page 40]                                                               
  2635.  
  2636.  
  2637.  
  2638. September 1981                                                          
  2639.                                                        Internet Protocol
  2640.  
  2641.  
  2642.  
  2643.                                 GLOSSARY
  2644.  
  2645.  
  2646.  
  2647. 1822
  2648.           BBN Report 1822, "The Specification of the Interconnection of
  2649.           a Host and an IMP".  The specification of interface between a
  2650.           host and the ARPANET.
  2651.  
  2652. ARPANET leader
  2653.           The control information on an ARPANET message at the host-IMP
  2654.           interface.
  2655.  
  2656. ARPANET message
  2657.           The unit of transmission between a host and an IMP in the
  2658.           ARPANET.  The maximum size is about 1012 octets (8096 bits).
  2659.  
  2660. ARPANET packet
  2661.           A unit of transmission used internally in the ARPANET between
  2662.           IMPs. The maximum size is about 126 octets (1008 bits).
  2663.  
  2664. Destination
  2665.           The destination address, an internet header field.
  2666.  
  2667. DF
  2668.           The Don't Fragment bit carried in the flags field.
  2669.  
  2670. Flags
  2671.           An internet header field carrying various control flags.
  2672.  
  2673. Fragment Offset
  2674.           This internet header field indicates where in the internet
  2675.           datagram a fragment belongs.
  2676.  
  2677. GGP
  2678.           Gateway to Gateway Protocol, the protocol used primarily
  2679.           between gateways to control routing and other gateway
  2680.           functions.
  2681.  
  2682. header
  2683.           Control information at the beginning of a message, segment,
  2684.           datagram, packet or block of data.
  2685.  
  2686. ICMP
  2687.           Internet Control Message Protocol, implemented in the internet
  2688.           module, the ICMP is used from gateways to hosts and between
  2689.           hosts to report errors and make routing suggestions.
  2690.  
  2691.  
  2692.  
  2693.  
  2694.                                                                [Page 41]
  2695.  
  2696.  
  2697.  
  2698.                                                           September 1981
  2699. Internet Protocol
  2700. Glossary
  2701.  
  2702.  
  2703.  
  2704. Identification
  2705.           An internet header field carrying the identifying value
  2706.           assigned by the sender to aid in assembling the fragments of a
  2707.           datagram.
  2708.  
  2709. IHL
  2710.           The internet header field Internet Header Length is the length
  2711.           of the internet header measured in 32 bit words.
  2712.  
  2713. IMP
  2714.           The Interface Message Processor, the packet switch of the
  2715.           ARPANET.
  2716.  
  2717. Internet Address
  2718.           A four octet (32 bit) source or destination address consisting
  2719.           of a Network field and a Local Address field.
  2720.  
  2721. internet datagram
  2722.           The unit of data exchanged between a pair of internet modules
  2723.           (includes the internet header).
  2724.  
  2725. internet fragment
  2726.           A portion of the data of an internet datagram with an internet
  2727.           header.
  2728.  
  2729. Local Address
  2730.           The address of a host within a network.  The actual mapping of
  2731.           an internet local address on to the host addresses in a
  2732.           network is quite general, allowing for many to one mappings.
  2733.  
  2734. MF
  2735.           The More-Fragments Flag carried in the internet header flags
  2736.           field.
  2737.  
  2738. module
  2739.           An implementation, usually in software, of a protocol or other
  2740.           procedure.
  2741.  
  2742. more-fragments flag
  2743.           A flag indicating whether or not this internet datagram
  2744.           contains the end of an internet datagram, carried in the
  2745.           internet header Flags field.
  2746.  
  2747. NFB
  2748.           The Number of Fragment Blocks in a the data portion of an
  2749.           internet fragment.  That is, the length of a portion of data
  2750.           measured in 8 octet units.
  2751.  
  2752.  
  2753.  
  2754. [Page 42]                                                               
  2755.  
  2756.  
  2757.  
  2758. September 1981                                                          
  2759.                                                        Internet Protocol
  2760.                                                                 Glossary
  2761.  
  2762.  
  2763.  
  2764. octet
  2765.           An eight bit byte.
  2766.  
  2767. Options
  2768.           The internet header Options field may contain several options,
  2769.           and each option may be several octets in length.
  2770.  
  2771. Padding
  2772.           The internet header Padding field is used to ensure that the
  2773.           data begins on 32 bit word boundary.  The padding is zero.
  2774.  
  2775. Protocol
  2776.           In this document, the next higher level protocol identifier,
  2777.           an internet header field.
  2778.  
  2779. Rest
  2780.           The local address portion of an Internet Address.
  2781.  
  2782. Source
  2783.           The source address, an internet header field.
  2784.  
  2785. TCP
  2786.           Transmission Control Protocol:  A host-to-host protocol for
  2787.           reliable communication in internet environments.
  2788.  
  2789. TCP Segment
  2790.           The unit of data exchanged between TCP modules (including the
  2791.           TCP header).
  2792.  
  2793. TFTP
  2794.           Trivial File Transfer Protocol:  A simple file transfer
  2795.           protocol built on UDP.
  2796.  
  2797. Time to Live
  2798.           An internet header field which indicates the upper bound on
  2799.           how long this internet datagram may exist.
  2800.  
  2801. TOS
  2802.           Type of Service
  2803.  
  2804. Total Length
  2805.           The internet header field Total Length is the length of the
  2806.           datagram in octets including internet header and data.
  2807.  
  2808. TTL
  2809.           Time to Live
  2810.  
  2811.  
  2812.  
  2813.  
  2814.                                                                [Page 43]
  2815.  
  2816.  
  2817.  
  2818.                                                           September 1981
  2819. Internet Protocol
  2820. Glossary
  2821.  
  2822.  
  2823.  
  2824. Type of Service
  2825.           An internet header field which indicates the type (or quality)
  2826.           of service for this internet datagram.
  2827.  
  2828. UDP
  2829.           User Datagram Protocol:  A user level protocol for transaction
  2830.           oriented applications.
  2831.  
  2832. User
  2833.           The user of the internet protocol.  This may be a higher level
  2834.           protocol module, an application program, or a gateway program.
  2835.  
  2836. Version
  2837.           The Version field indicates the format of the internet header.
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874. [Page 44]                                                               
  2875.  
  2876.  
  2877.  
  2878. September 1981                                                          
  2879.                                                        Internet Protocol
  2880.  
  2881.  
  2882.  
  2883.                                REFERENCES
  2884.  
  2885.  
  2886.  
  2887. [1]  Cerf, V., "The Catenet Model for Internetworking," Information
  2888.      Processing Techniques Office, Defense Advanced Research Projects
  2889.      Agency, IEN 48, July 1978.
  2890.  
  2891. [2]  Bolt Beranek and Newman, "Specification for the Interconnection of
  2892.      a Host and an IMP," BBN Technical Report 1822, Revised May 1978.
  2893.  
  2894. [3]  Postel, J., "Internet Control Message Protocol - DARPA Internet
  2895.      Program Protocol Specification," RFC 792, USC/Information Sciences
  2896.      Institute, September 1981.
  2897.  
  2898. [4]  Shoch, J., "Inter-Network Naming, Addressing, and Routing,"
  2899.      COMPCON, IEEE Computer Society, Fall 1978.
  2900.  
  2901. [5]  Postel, J., "Address Mappings," RFC 796, USC/Information Sciences
  2902.      Institute, September 1981.
  2903.  
  2904. [6]  Shoch, J., "Packet Fragmentation in Inter-Network Protocols,"
  2905.      Computer Networks, v. 3, n. 1, February 1979.
  2906.  
  2907. [7]  Strazisar, V., "How to Build a Gateway", IEN 109, Bolt Beranek and
  2908.      Newman, August 1979.
  2909.  
  2910. [8]  Postel, J., "Service Mappings," RFC 795, USC/Information Sciences
  2911.      Institute, September 1981.
  2912.  
  2913. [9]  Postel, J., "Assigned Numbers," RFC 790, USC/Information Sciences
  2914.      Institute, September 1981.
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.                                                                [Page 45]
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.