home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 00s / rfc54.txt < prev    next >
Text File  |  1997-03-12  |  20KB  |  509 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                               Steve Crocker (UCLA)
  8. Request for Comments # 54                              Jon Postel (UCLA)
  9. June 18, 1970                                     John Newkirk (Harvard)
  10.                                                    Mike Kraley (Harvard)
  11.  
  12.                     An Official Protocol Proffering
  13.  
  14. I. INTRODUCTION
  15.  
  16.    As advertised in NEW/RFC #53, we are submitting the protocol herein
  17.    for criticism, comments, etc.  We intend for this protocol to become
  18.    the initial official protocol, and will, therefore, be happiest if no
  19.    serious objections are raised.  Nevertheless, we will entertain all
  20.    manner of criticism until July 13, 1970, and such criticism should be
  21.    published as a NWG/RFC or directed to the first author.
  22.  
  23.    After July 13, a decision will be made whether to adopt this protocol
  24.    (or slight variation) or whether to redesign it and resubmit it for
  25.    criticism.
  26.  
  27. Only the Protocol
  28.  
  29.    In preceding discussions of protocol, no clear distinction has been
  30.    made between the network-wide specifications and local strategies.
  31.    We state here that the only network-wide issues are message formats
  32.    and restrictions on message content.  Implementation of a Network
  33.    Control Program (NCP) and choice of system calls are strictly local
  34.    issues.
  35.  
  36.    This document is constrained to cover only network-wide issues and
  37.    thus will not treat system calls or NCP tables; nevertheless, a
  38.    protocol is useless without an NCP and a set of system calls, so we
  39.    have expended a great deal of effort in deriving a protypical NCP.
  40.    This effort is reported in NWG/RFC #55, and the reader should
  41.    correlate the protocol presented here with the suggestions for using
  42.    it presented there.  It is important to remember, however, that the
  43.    content of NWG/RFC #55 is only suggestive and that competitive
  44.    proposals should be examined before choosing an implementation.
  45.  
  46. Flow Control
  47.  
  48.    In the course of designing this current protocol, we have come to
  49.    understand that flow control is more complex than we imagined.  We
  50.    now believe that flow control techniques will be one of the active
  51.    areas of concern as the network traffic increases.  We have,
  52.    therefore, benefitted from some ideas stimulated by Richard Kaline
  53.    and Anatol Holt and have modified the flow control procedure.
  54.    (Defects in our scheme are, of course, only our fault).  This new
  55.  
  56.  
  57.  
  58. Crocker, Postel, Newkirk & Kraley                              [Page 1]
  59.  
  60. RFC 54              An Official Protocol Proffering        18 June 1970
  61.  
  62.  
  63.    procedure has demonstrable limitations, but has the advantages that
  64.    it is more cleanly implementable and will support initial network
  65.    use.  This is the only substantive change from the protocol already
  66.    agreed upon.
  67.  
  68.    The new flow control mechanism requires the receiving host to
  69.    allocate buffer space for each connection and to notify the sending
  70.    host of how much space in bits is available.  The sending host keeps
  71.    track of how much room is available and never sends more text than it
  72.    believes the receiving host can accept.
  73.  
  74.    To implement this mechanism, the sending host keeps a counter
  75.    associated with each connection.  The counter is initialized to zero,
  76.    increased by control commands sent from the receiving host, and
  77.    decremented by the text length of any message sent over the
  78.    connection.  The sending host is prohibited from sending text longer
  79.    than the value of the counter, so the counter never goes below zero.
  80.  
  81.    Ideally, the receiving host will allocate some buffer space as soon
  82.    as the connection is established.  The amount allocated must never
  83.    exceed what the receiver can guarantee to accept.  As text arrives,
  84.    it occupies the allocated buffer space.  When the receiving process
  85.    absorbs the waiting text from the buffer, the NCP fires back a new
  86.    allocation of space for that connection.  The NCP may allocate space
  87.    even if the receiving process has not absorbed waiting text if it
  88.    believes that extra buffer space is appropriate.  Similarly, the NCP
  89.    may decide not to reallocate buffer space after the receiving process
  90.    makes it available.
  91.  
  92.    The control command which allocates space is
  93.  
  94.                    ALL     <link>  <space>
  95.  
  96.    This command is sent only from the receiving host to the sending
  97.    host.
  98.  
  99.    This formulation of flow control obviates the RSM and SPD commands in
  100.    NWG/RFC #36, and the Host-to-Imp message type 10 and Imp-to-Host
  101.    message types 10 and 11 in the current revision of BBN Report 1822.
  102.  
  103.    The obvious limitation in this scheme is that the receiving host is
  104.    not permitted to depend upon average buffer usage -- worse case is
  105.    always assumed.  If only a few connections are open, it is unlikely
  106.    that there would be much savings.  However, for more than a few
  107.    connections, average buffer usage will be much less than allocated
  108.    buffer space.  We have looked at extensions of this protocol which
  109.    would include adaptive allocation, and we believe this to be
  110.    feasible.  For the present this limited scheme seems best, and we
  111.  
  112.  
  113.  
  114. Crocker, Postel, Newkirk & Kraley                              [Page 2]
  115.  
  116. RFC 54              An Official Protocol Proffering        18 June 1970
  117.  
  118.  
  119.    look forward to discussing more sophisticated schemes later.  The old
  120.    scheme of special RFNM's, etc. also remains under discussion.
  121.  
  122.    In order to answer questions and discuss details, we will hold a pair
  123.    of network meetings.  The first will be on June 29 at Harvard and the
  124.    second on July 1 at UCLA.  We request that no more than on programmer
  125.    per host attend a meeting and that hosts be represented at only one
  126.    of these meetings.  Two of us (J.N. and S.C.) will be at both
  127.    meetings.
  128.  
  129.    To make reservations to attend the Harvard meeting, contact
  130.  
  131.    Mrs. Margi Robison
  132.    (617) 495-3989
  133.       or 495-3991
  134.  
  135.    To make reservations to attend the UCLA meeting, contact Mrs. Benita
  136.    Kirstel (213) 825-2368.
  137.  
  138. II. THE PROTOCOL
  139.  
  140.    The notion of a connection as explained in NWG/RFC #33 pervades the
  141.    protocol.  A connection is a simplex communication path, intended to
  142.    be between two processes.
  143.  
  144.    The primary function of the protocol is to provide for
  145.        (1)  establishment of connections,
  146.        (2)  regulation of flow over connections, and
  147.        (3)  termination of connections.
  148.  
  149.    In addition, the protocol provides some ancillary functions such as
  150.    sending simulated interrupt pulses and echoing test messages.
  151.  
  152.    To provide a path for exchanging information about connections, we
  153.    designate specific links, i.e. link one between each pair of hosts to
  154.    be control links.  Traffic on control links consists only of control
  155.    commands, defined below.
  156.  
  157.    Connections are named by a pair of sockets.  Sockets are 40 bit names
  158.    which are known throughout the network.  Each host is assigned a
  159.    private subset of these names, and a command which requests a
  160.    connection names one socket which is local to the requesting host and
  161.    one local to the receiver of the request.
  162.  
  163.    Sockets are polarized; even numbered sockets are receive sockets; odd
  164.    numbered ones are send sockets.  One of each is required to make a
  165.    connection.
  166.  
  167.  
  168.  
  169.  
  170. Crocker, Postel, Newkirk & Kraley                              [Page 3]
  171.  
  172. RFC 54              An Official Protocol Proffering        18 June 1970
  173.  
  174.  
  175.    To facilitate transmission of information over a connection, a unique
  176.    link is assigned to each connection.  One of the steps in
  177.    establishing a connection, therefore, is the assignment of a link.
  178.    Of the non-control links, zero is reserved for intra-network use, and
  179.    links 32 to 255 are reserved for experiment and expansion.  Thus only
  180.    links 2 through 31 are available for regular use.  Link assignment
  181.    must either always be done by the receiver or always by the sender.
  182.    We have (almost) arbitrarily chosen this to be the receiver's
  183.    responsibility.
  184.  
  185.    All regular messages consist of a 32 bit leader, marking, text, and
  186.    padding.  Marking is a (possibly null) sequence of zeroes followed by
  187.    a 1; padding is a 1 followed by a (possibly null) sequence of zeroes.
  188.  
  189.    A regular message sent over the control link (link 1) is called a
  190.    control message.  Its text is an integral (possibly zero) number of
  191.    control commands in the form described below, and this text must end
  192.    on a command boundary.
  193.  
  194.    The commands used to establish a connection are STR and RTS.  The STR
  195.    command is sent from a prospective sender to a prospective receiver.
  196.    Its <my socket> field contains a send socket local to the prospective
  197.    sender; its <your socket> field contains a receive socket local to
  198.    the prospective receiver.  The RTS command is the dual, but is also
  199.    contains a <link> field for link assignment.  These two commands are
  200.    referred to as requests-for-connection (RFC).  A STR and an RTS match
  201.    if the <my socket> field of one is identical to the <your socket>
  202.    field of the other and vice versa.  A connection is established where
  203.    a matching pair of RFC's have been exchanged.
  204.  
  205.    Hosts are prohibited from establishing more than one connection to
  206.    any local socket.  Therefore, a host may not use a socket for the <my
  207.    socket>  field of an RFC if that socket is mentioned in a previous
  208.    RFC and the connection is not yet terminated.
  209.  
  210.    The command used to terminate a connection is CLS.  Each side must
  211.    send and receive a CLS command before a connection is completely
  212.    terminated and the sockets are free to participate in other
  213.    connections.  It is not necessary that both RFC's be exchanged before
  214.    a connection is terminated.  More details on termination are given
  215.    below.
  216.  
  217.    After a connection is established, the receiving host sends a ALL
  218.    command which allocates space for the connection.  The sender keeps
  219.    track of how much space is available in the receiving host and does
  220.    not transmit more text than the receiving host can accept, as
  221.    explained above.  A sender is also constrained by the local IMP from
  222.    sending a message over a connection until  the RFNM from the previous
  223.  
  224.  
  225.  
  226. Crocker, Postel, Newkirk & Kraley                              [Page 4]
  227.  
  228. RFC 54              An Official Protocol Proffering        18 June 1970
  229.  
  230.  
  231.    message is received.
  232.  
  233.    After a connection is established, CLS commands sent by the receiver
  234.    and sender have slightly different effects.  CLS command sent by the
  235.    sender indicate that no more messages will be sent over the
  236.    connection.  This command must not be sent if there is a message in
  237.    transit over the connection.
  238.  
  239.    CLS commands sent by the receiver act as demands on the sender to
  240.    terminate transmission.  However, since there is a delay in getting
  241.    the CLS command to the sender, the receiver must expect its buffers
  242.    to fill to the limit provided in ALL commands.
  243.  
  244.    While a connection is established, either side may send INR or INS
  245.    commands.  The interpretation of these commands is a local matter,
  246.    but in general they will provide and escape function.
  247.  
  248.    Note that the ALL, INR and INS commands may be sent only after the
  249.    connection is established and before a CLS command is sent.
  250.  
  251.    A very simple test facility is provided by the ECO and ERP commands.
  252.    Upon receiving a ECO command, a host must change the first eight bits
  253.    to ERP and return it.  These commands have no relationship to
  254.    connections.
  255.  
  256.    A NOP command is included for convenience.  It is coded as zero to
  257.    facilitate command message construction.
  258.  
  259.    Finally, an ERR command is included for notifying a foreign host it
  260.    has (apparently) made an error.  At present, no specific list of
  261.    errors is defined, and no action is defined for the receipt of ERR
  262.    commands.  Hosts should log ERR commands upon receipt so that system
  263.    programmers can diagnose the trouble.  A host may generate an ERR
  264.    command at any time and for any reason, but it is advised that each
  265.    host publish an exhaustive list of the ERR commands it may sent and
  266.    their interpretations.
  267.  
  268. NETWORK CONTROL COMMANDS
  269.  
  270.    The following is a detailed description of the structure and format
  271.    of each of the control commands.
  272.  
  273.  
  274.    To facilitate and clarify socket descriptions, the following
  275.    conventions have been adopted:
  276.  
  277.    <my socket> and <your socket> are used in the command descriptions.
  278.  
  279.  
  280.  
  281.  
  282. Crocker, Postel, Newkirk & Kraley                              [Page 5]
  283.  
  284. RFC 54              An Official Protocol Proffering        18 June 1970
  285.  
  286.  
  287.    <my socket> is local to the originator of the command.
  288.  
  289.    <your socket> is local to the receiver of the command.
  290.  
  291. CONTROL COMMAND FORMATS
  292.  
  293.  
  294.    No Operation
  295.                       _______
  296.                      |       |
  297.                      |  NOP  |
  298.                      |_______|
  299.  
  300.    Request Connection, Receiver to Sender
  301.                       ______________________________________________
  302.                      |       |             |               |        |
  303.                      |  RTS  |  my socket  |  your socket  |  link  |
  304.                      |_______|_____________|_______________|________|
  305.  
  306.    Request Connection, Sender to Receiver
  307.                       _____________________________________
  308.                      |       |             |               |
  309.                      |  STR  |  my socket  |  your socket  |
  310.                      |_______|_____________|_______________|
  311.  
  312.    Close
  313.                       _____________________________________
  314.                      |       |             |               |
  315.                      |  CLS  |  my socket  |  your socket  |
  316.                      |_______|_____________|_______________|
  317.  
  318.    Allocate
  319.                       __________________________
  320.                      |       |        |         |
  321.                      |  ALL  |  link  |  space  |
  322.                      |_______|________|_________|
  323.  
  324.    Interrupt Sent by Receiving Process
  325.                       _______________
  326.                      |      |        |
  327.                      | INR  |  link  |
  328.                      |______|________|
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Crocker, Postel, Newkirk & Kraley                              [Page 6]
  339.  
  340. RFC 54              An Official Protocol Proffering        18 June 1970
  341.  
  342.  
  343.    Interrupt Sent by Sending Process
  344.                      _______________
  345.                     |      |        |
  346.                     | INS  |  link  |
  347.                     |______|________|
  348.  
  349.    Echo Request
  350.                      ____________________________   _________
  351.                     |       |                    \  \        |
  352.                     |  ECO  |  length            /  /  text  |
  353.                     |_______|____________________\  \________|
  354.  
  355.    Echo Reply
  356.                      ____________________________   _________
  357.                     |       |                    \  \        |
  358.                     |  ERP  |  length            /  /  text  |
  359.                     |_______|____________________\  \________|
  360.  
  361.    Error Detected
  362.                      ____________________________   _________
  363.                     |       |                    \  \        |
  364.                     |  ERR  |  length            /  /  text  |
  365.                     |_______|____________________\  \________|
  366.  
  367.  
  368.  
  369.  
  370.    The host is specified in the leader.
  371.  
  372.    <link> is 8 bits
  373.  
  374.    <space> is 32 bits long and is an unsigned integer.
  375.  
  376.    <length> is an unsigned 16 bit integer.
  377.  
  378.    <text> is as long as the length.  The command is therefore 24 bits
  379.    longer that the length.  Maximum length is one message, to facilitate
  380.    command decoding and manipulation.
  381.  
  382.  
  383.    All control command codes are 8 bit long:
  384.  
  385.              NOP = 0
  386.              RTS = 1
  387.              STR = 2
  388.              CLS = 3
  389.              ALL = 4
  390.              INR = 5
  391.  
  392.  
  393.  
  394. Crocker, Postel, Newkirk & Kraley                              [Page 7]
  395.  
  396. RFC 54              An Official Protocol Proffering        18 June 1970
  397.  
  398.  
  399.              INS = 6
  400.              ECO = 7
  401.              ERP = 8
  402.              ERR = 9
  403.  
  404.    <my socket> and <your socket> are 32 bits long,
  405.                      _______________________
  406.                     |               |       |
  407.                     |  User number  |  AEN  |
  408.                     |_______________|_______|
  409.  
  410.    24 bits for user number and 8 bits for AEN.
  411.  
  412. III.  Conclusion
  413.  
  414.    Extensions to the Protocol
  415.  
  416.    Some issues have not been adequately treated in the current protocol.
  417.    We have in mind the following topics to consider more thoroughly and
  418.    perhaps experiment with.
  419.  
  420.    1. More Sophisticated Flow Control.
  421.  
  422.    As mentioned above, other schemes for flow control are still being
  423.    considered.  Other than the necessity of providing some form of it,
  424.    we are completely unsure of the nature of the problem.  It may turn
  425.    out that the present scheme is completely adequate; it may also turn
  426.    out that we will need a much more complex scheme.
  427.  
  428.    2. Error Detection and Recovery
  429.  
  430.    As we gain some experience with the network, we will develop a better
  431.    understanding of what errors can occur and, perhaps more importantly,
  432.    what to do about these errors.  We expect the protocol to change as
  433.    we understand error control.
  434.  
  435.    3. Start Up and Shut Down Procedures
  436.  
  437.    We have not done enough thinking about the problem of the host which
  438.    participates part-time in the network, which ceases normal network
  439.    operation but remains on the network for special purposes, or which
  440.    recovers from a system failure.  These issues are critical to robust
  441.    network operation and are possibly our highest priority.  4. Query
  442.    and Response
  443.  
  444.    A host-to-host status test would be a valuable tool, but it is not
  445.    yet clear what is appropriate to provide.
  446.  
  447.  
  448.  
  449.  
  450. Crocker, Postel, Newkirk & Kraley                              [Page 8]
  451.  
  452. RFC 54              An Official Protocol Proffering        18 June 1970
  453.  
  454.  
  455. Coming onto the Network
  456.  
  457.    We suggest that hosts come onto the network gingerly.  First, each
  458.    host should thoroughly exercise connections to itself.  Then it
  459.    should arrange experiments with some other host who is already
  460.    functioning.  Finally, it may begin to exercise the facilities of
  461.    other hosts.  It is not clear at this time which host will be in the
  462.    best position to help other hosts first, but UCLA will attempt to
  463.    serve this function.
  464.  
  465. Private Networking
  466.  
  467.    A common ploy is to use the IMP to connect several local computers,
  468.    one or more of which is not available to the whole network.  For
  469.    example, Harvard is connecting its PDP-1 to its PDP-10 via an IMP;
  470.    Lincoln Laboratories is connecting its TSP to the 360/67 and the TX2
  471.    via an IMP; and UCLA is similarly connecting a XDS 920 to its Sigma-
  472.    7.  In each of these cases, the small machine will not initially
  473.    provide services to the network.
  474.  
  475.    Although there should be no unwanted traffic to any of these extra
  476.    hosts, it is desirable that they conform minimally to the network
  477.    protocol.  Provided that they never initiate a connection or send out
  478.    spurious control commands, it is sufficient for a host to respond to
  479.    CLS commands with acknowledging CLS commands, and to respond to ECO
  480.    commands with ERP commands.
  481.  
  482. Acknowledgments
  483.  
  484.    The work presented above is only a small portion of the concurrent
  485.    effort.  Most of the related effort will be reported in immediately
  486.    forthcoming RFC's.  A number of people provided extremely valuable
  487.    aid during the last two weeks.  We are particularly grateful to
  488.    Professor George Mealy of Harvard for supporting four of his students
  489.    to come westward to work on the network, to Robert Uzgalis for
  490.    facilitating access to CCN at UCLA, and to the secretarial staff of
  491.    the Computer Science Division of the University of Utah, and
  492.    especially Peggy Tueller and Marcella Sanchez, for excellent help in
  493.    preparing these documents.
  494.  
  495.  
  496.        [ This RFC was put into machine readable form for entry ]
  497.       [ into the online RFC archives by Eitetsu Baumgardner 3/97 ]
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507. Crocker, Postel, Newkirk & Kraley                              [Page 9]
  508.  
  509.