home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 600s / rfc636.txt < prev    next >
Text File  |  1992-10-14  |  20KB  |  447 lines

  1.  
  2. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  3. TIP/TENEX Reliability Improvements
  4.  
  5.  
  6.  
  7. RFC 636                                    J. Burchfiel  - BBN-TENEX
  8.                                            B. Cosell     - BBN-NET
  9. NIC 30490                                  R. Tomlinson  - BBN-TENEX
  10.                                            D. Walden     - BBN-NET
  11.                                                             10 June 1974
  12.                                                                        
  13.                    TIP/TENEX Reliability Improvements
  14.  
  15.  
  16.  
  17.                                                                        
  18.  
  19. During the past months we have felt strong pressure to improve the
  20. reliability of TIP/TENEX network connection as improvement in the
  21. reliability of users' connections between TENEXs and TIPs would have
  22. major impact on the appearance of overall network reliability due to the
  23. large number and high visibility of TENEXs and TIPs.  Despite the
  24. emphasis on TIP/TENEX interaction, all work done applies equally well to
  25. interactions between Hosts of any type.                                
  26.  
  27. The remainder of this RFC gives a sketch of our plan for improving the
  28. reliability of connections bettween TIPs and TENEXs.  Major portions of
  29. this plan have already been implemented (TIP version 322; TENEX version
  30. 1.32) and are now undergoing final test prior to release throughout the
  31. network.  Completion of the implementation of the plan is expected in
  32. the next quarter.                                                      
  33.  
  34. Our plan for improving the reliability of TIP/TENEX connections is
  35. concerned with obtaining and maintaining TIP/TENEX connections,
  36. gracefully recovering from lost connections, and providing clear
  37. messages to the user whenever the state of his connection changes.     
  38.  
  39. When a TIP user attempts to open a connection to any Host, the Host may
  40. be down.  In this case it would be helpful to provide the user with
  41. information about the extent of the Host's unavailability. To facilitate
  42. this, we modified the IMP program to accept and utilize information from
  43. a Host about when the Host will be back up and for what reason it is
  44. down.  TENEX is to be modified to supply such information before it goes
  45. down, or through manual means, after it has gone down.  When the TIP
  46. user then attempts to connect to the down TENEX, the IMP local to the
  47. TENEX returns the information about why and for how long TENEX will be
  48. down.  The TIP is to be modified to report this sort of information to
  49. the user; e.g., "Host unavailable because of hardware maintenance --
  50. expected available Tuesday at 16:30 GMT".                              
  51.  
  52. The TIP's logger is presently not reentrant.  Thus, no single TIP user
  53. can be allowed to tie up the logger for too long at a time; and the TIP
  54.  
  55. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  56. TIP/TENEX Reliability Improvements
  57.  
  58.  
  59.  
  60. therefore enforces a timeout of arbitrary length (about 60 seconds) on
  61. logger use.  However, a heavily loaded Host cannot be guaranteed always
  62. to respond within 60 seconds to a TIP login request, and at present TIP
  63. users sometimes cannot get connected to a heavily loaded TENEX.  To
  64. correct this problem, the TIP logger will be made reentrant and the
  65. timeout on logger use will be eliminated.                              
  66.  
  67. One notorious soft spot in the Host/Host protocol which degrades the
  68. reliability of connections is the Host/Host protocol incremental
  69. allocate mechanism.  Low frequency software bugs, intermittant hardware
  70. bugs, etc., can lead to the incremental allocates associated with a
  71. connection getting out of synchronization.  When this happens it usually
  72. appears to the user as if the connection just "hung up".  A slight
  73. addiition to the Host/Host protocol to allow connection allocates to be
  74. resynchronized has been designed and implemented for both the TIP and
  75. TENEX.                                                                 
  76.  
  77. TENEX has a number of internal consistency checks (called "bughalts")
  78. which occasionally cause TENEX to halt.  Frequently, after diagnosis by
  79. system personnel, TENEX can be made to proceed without loss from the
  80. viewpoint of local users.  A mechanism is being provided which allows
  81. TENEX to proceed in this case from the point of view of TIP users of
  82. TENEX.                                                                 
  83.  
  84. The appropriate mechanism entails the following:  TENEX will not drop
  85. its ready line during a bughalt (from which TENEX can usually proceed
  86. successfully), nor will it clear its NCP tables and abort all
  87. connections.  Instead, after a bughalt TENEX will:  discard the message
  88. it is currently receiving, as the IMP has returned an Incomplete
  89. Transmission to the source for this message; reinitialize the interface
  90. to the IMP; and resynchronize, on all connections possible, Host/Host
  91. protocol allocate inconsistencies due to lost messages, RFNMs etc.  The
  92. latter is done with the same mechanism described above.  This procedure
  93. is not guaranteed to save all data -- a tiny bit may be lost -- but this
  94. is of secondary importance to maintaining the connection over the TENEX
  95. bughalt.                                                              
  96.  
  97. The TIP user must be kept fully informed as TENEX halts and then
  98. continues.  Therefore, the TIP has been modified to report "Host not
  99. responding -- connection suspended" when it senses that TENEX has halted
  100. (it does this by properly interpreting messages returned by the
  101. destination IMP).  When TENEX resumes service after proceeding from a
  102. bughalt, the above procedure notifies the TIP that service is restored,
  103. and the TIP has been modified to report "Service resumed" to all users
  104. of that Host.                                                         
  105.  
  106. On the other hand, the service interruption may not be proceedable and
  107.  
  108.  
  109.  
  110.  
  111.  
  112.                                    1
  113.  
  114. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  115. TIP/TENEX Reliability Improvements
  116.  
  117.  
  118.  
  119. TENEX may have to do a total system reload and restart.  In this case
  120. TENEX will clear its NCP connection tables and send a Host/Host protocol
  121. reset command to all other Hosts.  On receiving this reset command, the
  122. TIP will report "Host reset -- connection closed" to all users of that
  123. Host with suspended connections.  The TIP user can then re-login to the
  124. TENEX or to some other Host.                                          
  125.  
  126. Of couse, the user may not have the patience to wait for service to
  127. resume after a TENEX bughalt.  Instead, he may unilaterally choose to
  128. connect to some other Host, ignoring the previously suspended
  129. connection.  If TENEX is then able to proceed, its NCP will still think
  130. its connection to the TIP is good and suitable for use.  Thus, we have a
  131. connection which the TIP thinks is closed and TENEX thinks is open, a
  132. phenomenon known as the "half-closed connection".  An automatic
  133. procedure for cleanly completing the closing of such a connection has
  134. been specified and implemented for the TIP and TENEX.                 
  135.  
  136. Since TENEX will maintain connections across service interruptions, the
  137. TIP user will be required to take the security procedure telling the TIP
  138. to "forget" his suspended connection before abandoning his terminal.
  139. The command @H 0 (for example) will guarantee that his connection will
  140. not be reestablished on resumpption of service.  Otherwise, his job
  141. would be left at the mercy of anyone who acquires that terminal.      
  142.  
  143. An appendix follows which describes the Host/Host protocol changes made.
  144. These changes are backward compatible (with the exception that Hosts
  145. which have not implemented these changes will sometimes receive
  146. unrecognizable Host/Host protocol commands which they presumably discard
  147. without suffering harm).  These protocol changes are ad hoc in nature
  148. but in light of their backward compatibility and potential utility, ARPA
  149. okayed their addition to the TIP and TENEX NCPs without (we believe) any
  150. implication that other Hosts have to implement them (although we would
  151. encourage their widespread implementation).                           
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.                                    2
  172.  
  173. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  174. TIP/TENEX Reliability Improvements
  175.  
  176.  
  177.  
  178.              Appendix - Ad Hoc Change to Host-Host Protocol           
  179.  
  180.    A.1  Introduction                                                 
  181.  
  182.       The current Host-Host protocol (NIC #8246) contains no provisions
  183.       for resynchronizing the status information kept at the two ends of
  184.       each connection.  In particular, if either host suffers a service
  185.       interruption, or if a control message is lost or corrupted in an
  186.       interface or in the subnet, the status information at the two ends
  187.       of the connection will be inconsistent.                       
  188.  
  189.       Since the current protocol provides no way to correct this
  190.       condition, the NCPs at the two ends stay "confused" forever.  An
  191.       occasional frustrating symptom of this effect is the "lost
  192.       allocate" phenomenon, where the receiving NCP believes that it has
  193.       bit and message allocations outstanding, while the sending NCP
  194.       believes that it does not have any allocation.  As a result,
  195.       information flow over that connection can never be restarted. 
  196.  
  197.       Use of the Host-Host RST (reset) command is inappropriate here, as
  198.       it destroys all connections between the two hosts.  What is needed
  199.       is a way to resynchronize only the affected connection without
  200.       disturbing any others.                                        
  201.  
  202.       A second troublesome symptom of inconsistency in status
  203.       information is the "half-closed" connection:  after a service
  204.       interruption or network partitioning, one NCP may believe that a
  205.       connection is still open, while the other believes that the
  206.       connection is closed (does not exist).  When such an inconsistency
  207.       is discovered, the "open" end of the connection should be closed.
  208.                                                                     
  209.    A.2  The RAR, RAS and RAP commands                               
  210.  
  211.       To achieve resynchronization of allocation, we add the following
  212.       three commands to the host-host protocol.                     
  213.  
  214.               8 bits   8 bits
  215.             -------------------
  216.             !        !        !
  217.          16 !  RAR   !  link  !
  218.             !        !        !
  219.             -------------------
  220.          Reset Allocation by Receiver
  221.  
  222.               8 bits   8 bits
  223.             -------------------
  224.             !        !        !
  225.  
  226.  
  227.  
  228.  
  229.  
  230.                                    3
  231.  
  232. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  233. TIP/TENEX Reliability Improvements
  234.  
  235.  
  236.  
  237.          17 !  RAS   !  link  !
  238.             !        !        !
  239.             -------------------
  240.          Reset Allocation by Sender
  241.  
  242.               8 bits   8 bits
  243.             -------------------
  244.             !        !        !
  245.          20 !  RAP   !  link  !
  246.             !        !        !
  247.             -------------------
  248.          Reset Allocation Please
  249.  
  250.       The RAS command is sent from the Host sending on "link" to the
  251.       Host receiving on "link".  This command may be sent whenever the
  252.       sending Host desires to resynch the status information associated
  253.       with the connection (and doesn't have a message in transit through
  254.       the network).  Some circumstances in which the sending Host may
  255.       choose to do this are:                                        
  256.  
  257.          1)  After a timeout when there is traffic to move but no
  258.          allocation (assumes that an allocation has been lost);
  259.  
  260.          2)  When an inconsistent event occurs associated with that
  261.          connection (e.g. an outstanding allocation in excess of 2^32
  262.          bits or 2^16 messages);
  263.  
  264.          3)  After the sending host has suffered an interruption of
  265.          network service;
  266.  
  267.          4)  In response to a RAP (see below).
  268.  
  269.       The RAR command is sent from the Host receiving on "link" to the
  270.       Host sending on "link" in response to an RAS.  It marks the
  271.       completion of the connection resynchronization.  When the RAR is
  272.       returned the connection is in the known state of having no
  273.       messages in transit in either direction and the allocations are
  274.       zero.  The receiving Host may then start afresh with a new
  275.       allocation and normal message transmission can proceed.  Since the
  276.       RAR may be sent ONLY in response to an RAS, there are no races in
  277.       the resynchronization.  All of the initiative lies with the
  278.       sending Host.                                                 
  279.  
  280.       If the receiving Host detects an anomalous situation, however,
  281.       there is no way to inform the sending Host that a
  282.       resynchronization is desirable.  For this purpose, the RAP command
  283.       is provided.  It constitutes a "suggestion" on the part of the
  284.  
  285.  
  286.  
  287.  
  288.  
  289.                                    4
  290.  
  291. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  292. TIP/TENEX Reliability Improvements
  293.  
  294.  
  295.  
  296.       receiving Host that the sending Host resynchronize; the sending
  297.       Host is free to honor it or not as it sees fit.  Since there is no
  298.       obligatory response to a RAP, the receiving Host may send them as
  299.       frequently as it chooses and no harm can occur.  For example, if a
  300.       message in excess of the allocate arrives, the receiving Host
  301.       might send RAPs every few seconds until the sending Host replies
  302.       with no fears of races if one or more RAPs pass a RAS in the
  303.       network.                                                      
  304.  
  305.    A.3  Resynchronization Procedure                                 
  306.  
  307.       The resynchronization sequence below may be initiated only by the
  308.       sender either for internally generated reasons or upon the receipt
  309.       of a RAP.                                                     
  310.  
  311.          a)  Sender - decision to resynch
  312.  
  313.             1)  Set state to "Wait-for-RAR" (Defer transmission of
  314.             message.)
  315.             2)  Wait until no RFNM outstanding
  316.             3)  Send RAS
  317.             4)  Zero allocation
  318.             5)  Ignore allocates until RAR received
  319.             6)  Set state to "Open" (Resume normal message transmission
  320.             subject to flow control.)
  321.  
  322.          b)  Receiver - receipt of RAS
  323.  
  324.             1)  Send RAR
  325.             2)  Zero allocation
  326.             3)  Send a new allocation
  327.  
  328.       When the sender is in the "Wait-for-RAR" state it is not permitted
  329.       to send new regular messages.  (Note that steps 4 and 5 will
  330.       insure this in the normal course of events.)  With the return of
  331.       the RAR the pipeline contains no messages and no allocates, the
  332.       outstanding allocation variables at both ends are forced into
  333.       agreement by setting them both to zero.  The receiver will then
  334.       reconsider bit and message allocation, and send an ALL command for
  335.       any allocation it cares to do.                                
  336.  
  337.    A.4  The Problem of Half-closed Connections                      
  338.  
  339.       The above procedures provide a way to resynchronize a connection
  340.       after a brief lapse by a communications component, which results
  341.       in lost messages or allocates for an open connection.         
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.                                    5
  349.  
  350. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  351. TIP/TENEX Reliability Improvements
  352.  
  353.  
  354.  
  355.       A longer and more severe interruption of communication may result
  356.       from a partitioning of the subnet or from a service interruption
  357.       on one of the communicating hosts.  It is undesirable to tie up
  358.       resources indefinitely under such circumstances, so the user is
  359.       provided with the option of freeing up these resources (including
  360.       himself) by unilaterally dissolving the connection.  Here
  361.       "unilaterally" means sending the CLS command and closing the
  362.       connection without receiving the CLS acknowledgement.  Note that
  363.       this is legal only if the subnet indicates that the destination is
  364.       dead.                                                         
  365.  
  366.       When service is restored ater such an interruption, the status
  367.       information at the two ends of the connection is out of
  368.       synchronization.  One end believes that the connection is open,
  369.       and may proceed to use the connection.  The disconnecting end
  370.       believes that the connection is closed (does not exist), and may
  371.       proceed to re-initialize communication by opening a new connection
  372.       (RTS or STR command) using the same socket pair or same link. 
  373.  
  374.       The resynchronization needed here is to properly close the open
  375.       end of the connection when the inconsistency is detected.  We will
  376.       accomplish this by specifying consistency checks and adding a new
  377.       pair of commands.                                             
  378.  
  379.    A.5  The NXS and NXR Commands                                    
  380.  
  381.       The "missing CLS" situation described above can manifest itself in
  382.       two ways.  The first way involves action taken by the NCP at the
  383.       "open" end of the connection.  It may continue to send regular
  384.       messages on the link of the half-closed connection, or control
  385.       messages referencing its link.  The closed end should respond with
  386.       an NXS if the message referred to a non-existent transmit link
  387.       (e.g. was an ALL) or NXR if the message referred to a non-existent
  388.       receive link (e.g. a data message).  On receipt of such an NXS or
  389.       NXR message, the NCP at the "open" end should close the connection
  390.       by modifying its tables (without sending any CLS command) thereby
  391.       bringing both ends into agreement.                            
  392.  
  393.               8 bits   8 bits
  394.             -------------------
  395.             !        !        !
  396.          21 !  NXR   !  link  !
  397.             !        !        !
  398.             -------------------
  399.          Non-existent Receive Link
  400.  
  401.               8 bits   8 bits
  402.  
  403.  
  404.  
  405.  
  406.  
  407.                                    6
  408.  
  409. NWG/RFC# 636                 JDB BPC RST DCW3 MLK 23-OCT-75 22:27  30490
  410. TIP/TENEX Reliability Improvements
  411.  
  412.  
  413.  
  414.             -------------------
  415.             !        !        !
  416.          22 !  NXS   !  link  !
  417.             !        !        !
  418.             -------------------
  419.          Non-existent Send Link
  420.  
  421.    A.6  Consistency Checks                                          
  422.  
  423.       A second way this inconsistency can show up involves actions
  424.       initiated by the NCP at the "closed" end.  It may (thinking the
  425.       connection is closed) send an STR or RTS to reopen the connection.
  426.       The NCP at the "open" end should detect the inconsistency when it
  427.       receives such an RTS or STR command, because it specifies the same
  428.       socket pair as an existing open connection, or, in the case of an
  429.       RTS, the same link.  In this case, the NCP at the "open" end
  430.       should close the connection (without sending any CLS command) to
  431.       bring the two ends into agreement before responding to the
  432.       RTS/STR.                                                      
  433.  
  434.    A.7  Conclusion                                                  
  435.  
  436.       The scheme presented in Section A.2 to resynchronize allocation
  437.       has one very important property:  the data stream is preserved
  438.       through the exchange.  Since no data is lost, it is safe to
  439.       initiate resynchronization from either end at any time.  When in
  440.       doubt, resynchronize.                                         
  441.  
  442.       The consistency checks for RTS and STR, and the NXR and NXS
  443.       commands provide the synchronization needed to complete the
  444.       closing of "half-closed" connections.                         
  445.  
  446.       The protocol changes above 
  447.