home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft__misc / part1.txt < prev    next >
Text File  |  1997-04-17  |  62KB  |  1,405 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. Network Working Group                                   John C. C. White
  7. Internet-Draft                                     The MITRE Corporation
  8. Obsoletes: RFC998                                             April 1997
  9. Category: Proposed Standard
  10.  
  11.  
  12.                 NETBLT (Network Block Transfer Protocol)
  13.  
  14.                     draft-white-protocol-stack-00.txt
  15.  
  16. Status of this Memo
  17.  
  18.    This document is an Internet-Draft.  Internet-Drafts are working
  19.    documents of the Internet Engineering Task Force (IETF), its areas,
  20.    and its working groups.  Note that other groups may also distribute
  21.    working documents as Internet-Drafts.
  22.  
  23.    Internet-Drafts are draft documents valid for a maximum of six months
  24.    and may be updated, replaced, or obsoleted by other documents at any
  25.    time.  It is inappropriate to use Internet- Drafts as reference
  26.    material or to cite them other than as ``work in progress.''
  27.  
  28.    To learn the current status of any Internet-Draft, please check the
  29.    ``1id-abstracts.txt'' listing contained in the Internet- Drafts
  30.    Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  31.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  32.    ftp.isi.edu (US West Coast).
  33.  
  34. Abstract
  35.  
  36.    The NETBLT protocol [RFC998] was designed as an experimental
  37.    transport layer protocol, intended for moving large quantities of
  38.    data across a wide variety of networks. It provides reliable bulk
  39.    transfer with an end-to-end flow-control mechanism meant to deal with
  40.    network congestion by throttling the rate at which data is inserted
  41.    into the network. However, experiments with NETBLT across shared
  42.    links revealed problems with fairness; traffic from one connection
  43.    could hog most of a link's bandwidth, and there seems to be no way to
  44.    prevent this under the current rate-control scheme, so further
  45.    application of NETBLT was not pursued by its original developers.
  46.  
  47.    However, NETBLT has a number of characteristics which make it very
  48.    attractive for use across noisy, long-delay, slow-turnaround, or
  49.    asymmetric communications links. Such links are common in military
  50.    usage, and may become more widespread with the development of mobile
  51.    computing. NETBLT's attractive characteristics include selective
  52.    retransmission of lost packets, potentially large transmission
  53.    windows, and control of transmission from the receiving, rather than
  54.    the sending side; the latter makes NETBLT relatively insensitive to
  55.  
  56.  
  57.  
  58. White                                                           [Page 1]
  59.  
  60. INTERNET DRAFT                   NETBLT                       April 1997
  61.  
  62.  
  63.    network delays. NETBLT, with minor modifications, was adopted as the
  64.    transport layer of the military standard TACO2 (Tactical
  65.    Communications Protocol 2) [MIL- STD], which is intended for the
  66.    transmission of images and other bulk data across links that cannot
  67.    support the usual TCP/IP operation. This document describes NETBLT as
  68.    it is currently used, and is intended partly to encourage
  69.    consideration of NETBLT in other difficult communications
  70.    environments.
  71.  
  72. 1. Document History
  73.  
  74.    The military standard definition of NETBLT was developed from RFC998
  75.    by expunging most of the tutorial information and translating the
  76.    remainder into the language required by military standards. This
  77.    document was then prepared from the military standard; as a result,
  78.    there may be some unnecessary rearrangements and rewordings. In any
  79.    case, most of the protocol remains as designed by the original
  80.    developers. Modifications have been made to simplify protocol
  81.    operation and to extend its capability.
  82.  
  83. 2. NETBLT Overview
  84.  
  85.    The bulk data transfer protocol NETBLT works by opening a connection
  86.    between a sender and a receiver, transferring a message in one or
  87.    more buffers, and closing the connection.  Each buffer is transferred
  88.    as a sequence of packets; the interaction between sender and receiver
  89.    is primarily on a per-buffer basis.  This section provides an
  90.    overview of NETBLT; further explanation and detailed requirements are
  91.    found in the following sections.  The material here assumes the
  92.    existence of a full- duplex connection between sender and receiver,
  93.    such that information can be transferred in both directions more or
  94.    less concurrently.  Changes for half-duplex and simplex operation are
  95.    provided later.
  96.  
  97.    Specific packet types are identified in the following sections by
  98.    upper-case names (e.g., DATA packets), in contrast with packet
  99.    functions (e.g., keepalive packets) which are accomplished by more
  100.    than one packet type.
  101.  
  102. 2.1 Single-buffer operation.
  103.  
  104.    In its simplest form, a NETBLT transfer works as follows: first, a
  105.    connection is opened between a sending and a receiving NETBLT. That
  106.    step includes negotiation of various transmission parameters. The
  107.    sending client loads a buffer of data and passes it to the NETBLT
  108.    layer to be transferred.  NETBLT breaks the buffer up into packets
  109.    and sends these packets across the network via datagrams.  The
  110.    receiving NETBLT loads these packets into a matching buffer.  When
  111.  
  112.  
  113.  
  114. White                                                           [Page 2]
  115.  
  116. INTERNET DRAFT                   NETBLT                       April 1997
  117.  
  118.  
  119.    the last packet in the buffer should have arrived at the receiver,
  120.    the receiving NETBLT checks whether all packets in that buffer have
  121.    been received correctly.  If some packets have not been received
  122.    correctly, the receiving NETBLT requests that they be resent.  When
  123.    the buffer has been completely received, the receiving NETBLT passes
  124.    it to the receiving client, and confirms its receipt to the sender.
  125.    When a new buffer is ready to receive more data, the receiving NETBLT
  126.    notifies the sender that the new buffer is ready, and the sender
  127.    prepares and sends the next buffer in the same manner.  This
  128.    continues until all the data has been sent; at that time the sender
  129.    notifies the receiver that the transmission has been completed.  The
  130.    two sides then close the connection.
  131.  
  132. 2.2 Multiple-buffer operation.
  133.  
  134.    As described above the NETBLT protocol is "lock-step".  Action halts
  135.    after a buffer is transmitted, and begins again after confirmation is
  136.    received from the receiver of data.  NETBLT provides for multiple
  137.    buffering, so that the sending NETBLT can transmit new buffers while
  138.    waiting for confirmation of earlier buffers from the receiving
  139.    NETBLT.
  140.  
  141. 2.3 Buffers and packets.
  142.  
  143.    The data to be transmitted is broken up into buffers by the sending
  144.    client. All buffers are the same size, except for the last buffer.
  145.    During connection setup, the sending and receiving NETBLTs negotiate
  146.    the buffer size.  Buffer sizes are in bytes; data is placed in
  147.    buffers on byte boundaries.
  148.  
  149.    Each buffer is broken down by NETBLT into a sequence of DATA packets
  150.    terminated by an LDATA packet.  DATA packet size is negotiated
  151.    between the sending and receiving NETBLTs during connection setup.
  152.    All DATA packets are the same size.  DATA and LDATA packets are
  153.    identical in format except for the packet type.
  154.  
  155. 2.4 Flow control.
  156.  
  157.    NETBLT uses two strategies for flow control, one at the client level
  158.    and one internal.
  159.  
  160. 2.4.1 Client level flow control.
  161.  
  162.    The sending and receiving NETBLTs transmit data in buffers; client
  163.    flow control is therefore by buffer.  Before a buffer can be
  164.    transmitted, NETBLT confirms that both clients have set up matching
  165.    buffers, that one is ready to send data, and that the other is ready
  166.    to receive data. Either client can therefore control the flow of data
  167.  
  168.  
  169.  
  170. White                                                           [Page 3]
  171.  
  172. INTERNET DRAFT                   NETBLT                       April 1997
  173.  
  174.  
  175.    by not providing a new buffer.  Clients cannot stop a buffer transfer
  176.    once it is in progress, except by aborting the entire transfer.
  177.  
  178. 2.4.2 Internal flow control.
  179.  
  180.    The internal flow control mechanism for NETBLT is rate control.  The
  181.    transmission rate is negotiated by the sending and receiving NETBLTs
  182.    during connection setup and after each buffer transmission.  The
  183.    sender uses timers to maintain the negotiated rate, by controlling
  184.    the time to transmit groups of packets.  The sender transmits a burst
  185.    of packets over the negotiated time interval, and sends another burst
  186.    in the next interval. NETBLT's rate control therefore has two parts,
  187.    a burst size and a burst interval, with (burst interval)/(burst size)
  188.    equal to the average transmission time per packet.
  189.  
  190.    A burst interval value of zero means that internal flow control is
  191.    turned off, so that only client level flow control is in effect.  In
  192.    this case, the sending NETBLT will transmit packets without regard
  193.    for the rate control mechanism.
  194.  
  195.    All NETBLT flow control parameters (packet size, buffer size, number
  196.    of buffers outstanding, burst size, and burst interval) are
  197.    negotiated during connection setup.  The negotiation process is the
  198.    same for all parameters.  The client initiating the connection (the
  199.    active side) sends a value for each parameter in its OPEN packet.
  200.    The other client (the passive side) will compare these values with
  201.    the highest- performance values it can support.  The passive side can
  202.    modify any of the parameters, but only by making them more
  203.    restrictive; i. e., smaller packet size, smaller buffer size, fewer
  204.    buffers, smaller burst size, and larger burst interval.  The
  205.    (possibly modified) parameters are sent back to the active side in
  206.    the RESPONSE packet.
  207.  
  208.    The burst size and burst interval may also be re-negotiated after
  209.    each buffer transmission to adjust the transfer rate according to the
  210.    performance observed from transferring the previous buffer.  The
  211.    receiving end sends burst size and burst interval values in its OK
  212.    messages (which acknowledge successful receipt of a buffer) and in
  213.    its RESEND messages (which request retransmission of specific
  214.    packets).  The sender will compare these values with the values it
  215.    can support.  Again, it may modify either of these parameters, but
  216.    only by making them more restrictive.  The modified parameters will
  217.    then be communicated to the receiver in DATA, LDATA, or NULL-ACK
  218.    packets.
  219.  
  220. 2.5 Checksumming.
  221.  
  222.    NETBLT automatically checksums each packet header and, optionally,
  223.  
  224.  
  225.  
  226. White                                                           [Page 4]
  227.  
  228. INTERNET DRAFT                   NETBLT                       April 1997
  229.  
  230.  
  231.    the data portion of each DATA and LDATA packet. The checksum value is
  232.    the bitwise negation of the ones-complement sum of the 16-bit words
  233.    being checksummed. If a packet to be transferred has an odd number of
  234.    bytes, it is padded with a final null byte (binary 0's) to make the
  235.    number of bytes even for the purpose of checksum calculation.  The
  236.    extra byte is not transmitted as part of the packet, but its
  237.    existence is assumed at the receiving end for checksum verification.
  238.  
  239. 3.  NETBLT detailed operation
  240.  
  241.    Each NETBLT transfer has three stages: connection setup, data
  242.    transfer, and connection close.  The stages are described in detail
  243.    below, along with methods for insuring that each stage completes
  244.    reliably.  State diagrams are provided at the end of the description
  245.    for each stage of the transfer.  Each transition in the diagrams is
  246.    labelled with the event that causes the transition, and optionally,
  247.    in parentheses, actions that occur at the time of the transition.
  248.  
  249. 3.1 Connection setup.
  250.  
  251.    A NETBLT connection is set up by an exchange of two packets between
  252.    the active NETBLT and the passive NETBLT. The active end sends an
  253.    OPEN packet; the passive end acknowledges the OPEN packet in one of
  254.    two ways: it either sends a REFUSED packet, indicating that the
  255.    connection cannot be completed for some reason, or it completes the
  256.    connection setup by sending a RESPONSE packet.  After a successful
  257.    connection setup, the transfer can begin.  Figure 1 illustrates the
  258.    opening of a connection by the active end, and figure 2 shows the
  259.    same process for the passive end.
  260.  
  261.    Each side of the connection transmits its death-timeout value in
  262.    seconds in the OPEN or the RESPONSE packet.  The death-timeout value
  263.    is used to determine the frequency with which to send keepalive
  264.    packets during idle periods of an opened connection (death timers and
  265.    keepalive packets are discussed later).
  266.  
  267.    The sending NETBLT specifies a passive client through a client-
  268.    specific "well-known" 16 bit logical port number on which the
  269.    receiving end listens. The sending client identifies itself through a
  270.    32 bit Internet address and a unique 16 bit port number.
  271.  
  272.    An unstructured, variable-length client message field is provided in
  273.    OPEN and RESPONSE packets for any client-specific information that
  274.    may be required. In addition, a "reason for refusal" field is
  275.    provided in REFUSED packets.
  276.  
  277.    Recovery for lost OPEN and RESPONSE packets is provided by the use of
  278.    timers.  The sending end sets a timer when it sends an OPEN packet.
  279.  
  280.  
  281.  
  282. White                                                           [Page 5]
  283.  
  284. INTERNET DRAFT                   NETBLT                       April 1997
  285.  
  286.  
  287.    When the timer expires, another OPEN packet is sent, until some
  288.    predetermined maximum number (at least five) of OPEN packets have
  289.    been sent.  The timer is cleared upon receipt of a RESPONSE or
  290.    REFUSED packet.
  291.  
  292.    To prevent duplication of OPEN and RESPONSE packets, the OPEN packet
  293.    contains a 32 bit connection unique ID (UID) that must be returned in
  294.    the RESPONSE packet.  This unique ID prevents the initiator from
  295.    confusing the response to the current request with the response to an
  296.    earlier connection request (there can only be one connection open
  297.    between any pair of logical ports).  Any OPEN or RESPONSE packet with
  298.    a port pair matching that of an open connection will have its unique
  299.    ID checked.  If the unique ID of the packet matches the unique ID of
  300.    the connection, then the packet type is checked.  If it is a RESPONSE
  301.    packet, it is treated as a duplicate and ignored.  If it is an OPEN
  302.    packet, the passive NETBLT will send another RESPONSE  (on the
  303.    assumption that a previous RESPONSE packet was sent and lost, causing
  304.    the initiating NETBLT to retransmit its OPEN packet).  A non-matching
  305.    unique ID is treated as an attempt to open a second connection
  306.    between the port pair and is rejected by sending a REFUSED message.
  307.  
  308.  
  309.      +------------+
  310.      |            |--------<-----------------------------+
  311.      |  Inactive  |-->-+                                 |
  312.      |            |    |                                 |
  313.      +------------+    |                                 |
  314.        ^        Connect request from client              |
  315.        |        (Send OPEN, start Open Timer)            |
  316.     REFUSED received   |                         <=max # OPENs sent
  317.        |               |                                 |
  318.      +------------+    |                                 |
  319.      |  Opening   |-<--+---<---------+                   ^
  320.      |            |                  |                   |
  321.      |            |->-+      <max # OPENs sent           |
  322.      +------------+   |   (send OPEN, start Open Timer)  |
  323.            |          |              |                   |
  324.            |  Open Timer timeout     |                   |
  325.            |          +------>-------+-------------------+
  326.      RESPONSE received
  327.      (clear Open Timer)
  328.            |       +------------+
  329.            |       |            |
  330.            +-->----| Connected  |
  331.                    |            |
  332.                    +------------+
  333.  
  334.    Figure 1. Active side open state diagram
  335.  
  336.  
  337.  
  338. White                                                           [Page 6]
  339.  
  340. INTERNET DRAFT                   NETBLT                       April 1997
  341.  
  342.  
  343.              +------------+
  344.              |            |--->----------+
  345.         +-<--|  Inactive  |     Unacceptable OPEN received
  346.         |    |            |        (send REFUSED)
  347.         |    |            |---<----------+
  348.         |    +------------+
  349.      Acceptable OPEN received
  350.      (send RESPONSE)             +-------+--------->-----------+
  351.         |    +------------+      |       |                     |
  352.         |    |            |--->--+ Acceptable OPEN    Unacceptable OPEN
  353.         +->--| Connected  |         received            received
  354.              |            |        (send RESPONSE)     (send REFUSED)
  355.              |            |--<---+       |                     |
  356.              +------------+      +-------+---------<-----------+
  357.  
  358.    Figure 2. Passive side open state diagram
  359.  
  360. 3.2 Data transfer
  361.  
  362.    The simplest full-duplex mode of data transfer proceeds as follows.
  363.    The sending client sets up a buffer full of data.  The receiving
  364.    NETBLT sends a GO message inside a CONTROL packet to the sender,
  365.    signifying that it too has set up a buffer and is ready to receive
  366.    data.  Once the GO message is received, the sender transmits the
  367.    buffer as a series of DATA packets followed by an LDATA packet. When
  368.    the last packet in the buffer should have been received (as
  369.    determined by a timer), if any packets in the buffer have not been
  370.    received the receiver sends a RESEND message inside a CONTROL packet
  371.    containing a list of packets that were not received.  The sender will
  372.    resend these packets.  This process continues until there are no
  373.    missing packets.  At that time the receiver sends an OK message
  374.    inside a CONTROL packet, sets up another buffer to receive data, and
  375.    sends another GO message.  The sender, having received the OK
  376.    message, will set up another buffer, wait for the GO message, and
  377.    repeat the process.
  378.  
  379.    A more efficient full-duplex transfer mode uses multiple buffering,
  380.    in which the sender and receiver allocate and transfer buffers in a
  381.    manner that allows error recovery or successful transmission
  382.    confirmation of previous buffers to be concurrent with transmission
  383.    of the current buffer. During the connection setup phase, one of the
  384.    negotiated parameters is the number of concurrent buffers permitted
  385.    during the transfer. If there is more than one buffer available,
  386.    transfer of the next buffer will start right after the current buffer
  387.    finishes, and the receiver is ready to receive the buffer.  The
  388.    receiver signals that it is ready for the next buffer by sending a GO
  389.    message.  This is illustrated in the following example: Assume the
  390.    sender has available two buffers A and B in a multiple-buffer
  391.  
  392.  
  393.  
  394. White                                                           [Page 7]
  395.  
  396. INTERNET DRAFT                   NETBLT                       April 1997
  397.  
  398.  
  399.    transfer, with A preceding B. When A has been transferred and the
  400.    sending NETBLT is waiting for either an OK or a RESEND message for
  401.    it, the sending NETBLT can start sending B immediately.  If the
  402.    receiver of data sends an OK for A, all is well; if it sends a
  403.    RESEND, the missing packets specified in the RESEND message are
  404.    retransmitted. In the multiple-buffer transfer mode, all packets to
  405.    be sent are ordered by buffer number (lowest number first).  Since
  406.    buffer numbers increase monotonically, packets from an earlier buffer
  407.    will precede packets from a later buffer.
  408.  
  409. 3.2.1 Control Messages.
  410.  
  411.    NETBLT uses a single long-lived control packet; the packet is treated
  412.    like a FIFO queue, with new control messages added on at the end and
  413.    acknowledged control messages removed from the front.  The
  414.    implementation places control messages in the control packet and
  415.    transmits the entire control packet, consisting of any unacknowledged
  416.    control messages plus new messages just added. Since control packet
  417.    transmissions are fairly frequent, unacknowledged messages may be
  418.    transmitted several times before they are finally acknowledged.  The
  419.    receiver may send zero or more control messages (OK, GO, or RESEND)
  420.    within a single CONTROL packet. In order to limit the size of the
  421.    control packet, it is permissible to send fewer than the full set of
  422.    unacknowledged control messages in a control packet; it is however
  423.    required that the control messages in a control packet be
  424.    consecutive, starting with the lowest-numbered unacknowledged control
  425.    message.
  426.  
  427.    Each control message includes a sequence number, which starts at one
  428.    and increases by one for each control message generated.  The sending
  429.    NETBLT checks the sequence number of every incoming control and
  430.    stores the highest sequence number below which all other sequence
  431.    numbers have been received (in following paragraphs this is called
  432.    the high-acknowledged- sequence-number). It returns this number in
  433.    every packet flowing back to the receiver.  The receiver removes
  434.    control messages with sequence numbers less than or equal to the
  435.    high-acknowledged-sequence-number from the control packet.
  436.  
  437.    Whenever the receiver sends a control packet, it starts a control
  438.    timer. When the control timer expires, the receiving NETBLT will
  439.    resend the control packet and reset the timer.  The receiving NETBLT
  440.    will continue to resend control packets in response to control timer
  441.    expiration until either the control timer is cleared or the receiving
  442.    NETBLT's death timer (described later) expires (at which time it will
  443.    shut down the connection). The control timer may have as its initial
  444.    value an arbitrary number.  Subsequent control timer values are based
  445.    on the network round-trip transit time (the time between sending the
  446.    control packet and receiving the acknowledgment of all messages in
  447.  
  448.  
  449.  
  450. White                                                           [Page 8]
  451.  
  452. INTERNET DRAFT                   NETBLT                       April 1997
  453.  
  454.  
  455.    the control packet) plus a variance factor.  The timer value is
  456.    regularly updated, based on a smoothed average of collected round-
  457.    trip transit times.  The control timer is set to the keepalive value
  458.    when a packet is received from the sender with high-acknowledged-
  459.    sequence-number equal to the highest sequence number in the control
  460.    packet most recently sent.
  461.  
  462.    The exact algorithm for control timer calculation is not mandated.
  463.    The suggested algorithm, similar to that [Jacobsen] now used in TCP,
  464.    is as follows:
  465.  
  466.    Initially, the round trip time is set to one-half the keepalive value
  467.    and the deviation is set to zero. When a control packet is sent, if
  468.    the round-trip-delay (RTD) timer is not running, its highest sequence
  469.    number is stored and the RTD timer is started. When acknowledgement
  470.    of that sequence number is received, the RTD timer value is used to
  471.    calculate a new RTD estimate. However, if a control packet is
  472.    retransmitted, the RTD timer is zeroed, its value is not used (to
  473.    avoid ambiguous RTD measurements), and the estimated RTD is increased
  474.    by 1/2 of its value (to allow recovery from too low an RTD estimate).
  475.    To calculate the new RTD estimate,
  476.  
  477.    New smoothed round trip time = (1-a) * old smoothed round trip time +
  478.    a * latest round trip measurement
  479.  
  480.    New deviation = (1-b) * old deviation + b * |latest round trip
  481.    measurement - old smoothed round trip time|
  482.  
  483.    where a = 1/8 and b = 1/4, allowing computations to be done with add
  484.    and shift operations.  The control timer is set equal to the new
  485.    smoothed round trip time plus twice the new deviation, or to the
  486.    keepalive value, whichever is less, if the control packet is not
  487.    empty.  If the control packet is empty, the control timer is set to
  488.    the keepalive value.
  489.  
  490.    The sending NETBLT, upon receiving a previously unseen control
  491.    message, will either set up a new buffer (upon receipt of an OK
  492.    message for a previous buffer), mark data for resending (upon receipt
  493.    of a RESEND message), or prepare a buffer for sending (upon receipt
  494.    of a GO message).  If the sending NETBLT is not in a position to send
  495.    data, it sends a NULL-ACK packet, which contains its high-
  496.    acknowledged-sequence- number (this permits the receiving NETBLT to
  497.    resend any outstanding control messages or to clear its control
  498.    timer), and waits until it can send more data.
  499.  
  500. 3.2.2 Send buffer state sequence.
  501.  
  502.    The state sequence for a sending buffer is as follows: when a GO
  503.  
  504.  
  505.  
  506. White                                                           [Page 9]
  507.  
  508. INTERNET DRAFT                   NETBLT                       April 1997
  509.  
  510.  
  511.    message for the buffer is received, the buffer is created, filled
  512.    with data, and placed in a SENDING state.  When an OK for that buffer
  513.    has been received, it goes into a SENT state and may be released.
  514.    Figure 3 illustrates this sequence.
  515.  
  516.  
  517.                                      +-----------+
  518.                                      |           |
  519.      GO for buffer n received --->---|   Ready   |-->-------+
  520.      (create and fill buffer n)      |           |          |
  521.                                      +-----------+          |
  522.                                                 Start sending buffer n
  523.                                           (set last-buffer-touched to n)
  524.                                      +-----------+          |
  525.                                      |           |          |
  526.                        +------<------|  Sending  |--<-------+
  527.                        |             |           |
  528.       OK for buffer n received       +-----------+
  529.                        |             +-----------+
  530.                        +------>------|           |
  531.                                      |   Sent    |-->- (remove buffer n)
  532.                                      |           |
  533.                                      +-----------+
  534.  
  535.    Figure 3. Sending buffer state diagram
  536.  
  537. 3.2.3 Receive buffer state sequence.
  538.  
  539.    The state sequence for a receiving buffer is more complicated.
  540.    Assume existence of a Buffer A. When a control message for Buffer A
  541.    is sent, the buffer will move into state ACK-WAIT (it is waiting for
  542.    acknowledgement of the control message).  As soon as the control
  543.    message has been acknowledged, Buffer A will move from the ACK-WAIT
  544.    state into the ACKED state (it is now waiting for DATA packets to
  545.    arrive).  At this point, the control message is removed from the
  546.    control packet.  Buffer A will stay in the ACKED state until a DATA,
  547.    LDATA, or NULL-ACK packet arrives with its "Last Buffer Touched"
  548.    number greater than or equal to Buffer A's number.  At this time,
  549.    Buffer A's data timer is set to the time expected for the remaining
  550.    packets in the buffer to be received plus a variance, and Buffer A
  551.    will move to the RECEIVING state.  (Note: This mechanism is different
  552.    from, and simpler than, the "loose/tight" timer mechanism described
  553.    in RFC 998).  When all DATA packets for A have been received, it will
  554.    move from the RECEIVING state to the RECEIVED state and may be passed
  555.    to the receiving client.  Had any packets been missing, Buffer A's
  556.    data timer would have expired; in that case, Buffer A will move into
  557.    the ACK-WAIT state after sending a RESEND message. The sending of a
  558.    RESEND message will cause the data timers of all buffers currently in
  559.  
  560.  
  561.  
  562. White                                                          [Page 10]
  563.  
  564. INTERNET DRAFT                   NETBLT                       April 1997
  565.  
  566.  
  567.    the RECEIVING state to be recalculated, since the presence of re-sent
  568.    packets will change the expected completion time for later buffers.
  569.    The state progression would then move as in the above example. Figure
  570.    4 illustrates this sequence.
  571.  
  572.  
  573.      < maximum # buffers exist &
  574.       last buffer not detected --->---------------------+
  575.      (create buffer n; send GO n)                       |
  576.                                                 +--------------+
  577.                                                 |              |
  578.               +--<--ACK for buffer n GO or --<--|  ACK-wait    |
  579.               |     RESEND message received     |              |
  580.               |                                 +--------------+
  581.         +------------+                                  |
  582.         |            |                                  ^
  583.         |   ACKed    |                                  |
  584.         |            |-->---+                   RESEND sent
  585.         +------------+      |                   (set all receiving
  586.                             |                   buffer data timers)
  587.           DATA/LDATA/NULL-ACK with                      |
  588.          last-buffer-touched >= n received              |
  589.           (set buffer n data timer)             +-------------+
  590.                             |                   |             |
  591.                             |                   | Resend-wait |
  592.                             |                   |             |
  593.                             |                   +-------------+
  594.        +-------------+      |                           |
  595.        |             |---<--+                           |
  596.        |  Receiving  |                                  |
  597.        |             |-->-- Buffer n data timeout & ->--+
  598.        +-------------+      buffer n not complete
  599.               |            (add RESEND to control packet)
  600.               |
  601.        Buffer n complete    +------------+
  602.               |             |            |
  603.               +---->--------|  Received  |--->--- Buffer n flushed
  604.                             |            |        (remove buffer n)
  605.                             +------------+
  606.  
  607.    Figure 4. Receiving buffer state diagram
  608.  
  609. 3.2.4 Data Timers.
  610.  
  611.    NETBLT solves the problem of DATA and LDATA packet loss by using a
  612.    data timer for each buffer at the receiving end.  The simplest data
  613.    timer model has a data timer set when a buffer is ready to be
  614.    received; if the data timer expires, the receiving NETBLT will send a
  615.  
  616.  
  617.  
  618. White                                                          [Page 11]
  619.  
  620. INTERNET DRAFT                   NETBLT                       April 1997
  621.  
  622.  
  623.    RESEND message requesting all missing DATA/LDATA packets in the
  624.    buffer.  When all packets have been received, the timer is cleared.
  625.    Data timer values are based on the amount of time taken to transfer a
  626.    buffer plus a variance factor.
  627.  
  628.    The exact algorithm for data timer estimation is not mandated.  The
  629.    suggested algorithm is to compute the number of packets expected
  630.    before the buffer is complete, multiply that by the time required to
  631.    transmit a packet, and add a variance. The receiver uses both the
  632.    minimum time per packet established by the burst size/burst interval,
  633.    and the measured time per packet with mean deviation, to establish
  634.    two estimates of the expected time per packet. These two estimates
  635.    are then used to calculate data timer settings for each buffer, and
  636.    the maximum value is used for that buffer's data timer. This
  637.    combination allows the demand placed on the net capacity by a given
  638.    transfer to be limited, while still avoiding unnecessary
  639.    retransmissions if the available net capacity is less than that
  640.    requested. The algorithm is as follows:
  641.  
  642.    The average time-per-packet A and the mean deviation D are
  643.    initialized. The first-packet time and packet number are stored when
  644.    the first packet from a given buffer arrives, and the latest-packet
  645.    time and packet number are stored or updated as each packet from that
  646.    same buffer arrives.
  647.  
  648.    When a packet from a different buffer or a NULL-ACK arrives, or a
  649.    RESEND is sent  for the given buffer, the difference between the
  650.    first-packet time and the latest-packet time is divided by the
  651.    difference between the first-packet number and the latest-packet
  652.    number, to provide a sample time-per-packet. Then,
  653.  
  654.    New smoothed time-per-packet = (1-a) * old smoothed time-per-packet +
  655.    a * latest time-per-packet measurement
  656.  
  657.    New time-per-packet deviation = (1-b) * old time-per-packet deviation
  658.    + b * |latest time-per-packet measurement - old smoothed time-per-
  659.    packet |
  660.  
  661.    where a = 1/8 and b = 1/4, allowing computations to be done with add
  662.    and shift operations, as with the control timer.  When the data timer
  663.    for a buffer must be set, two times are calculated using N, the
  664.    number of packets which must be received before the buffer is
  665.    completely filled:
  666.  
  667.     T1 = 1.25 * N * smoothed time-per-packet + 2 * time-per-packet
  668.    deviation
  669.  
  670.     T2 = 1.5 * N * burst interval / burst size.
  671.  
  672.  
  673.  
  674. White                                                          [Page 12]
  675.  
  676. INTERNET DRAFT                   NETBLT                       April 1997
  677.  
  678.  
  679.    The data timer is then set to the maximum of (T1, T2).
  680.  
  681. 3.2.5 Death timers.
  682.  
  683.    At connection startup, each NETBLT sends its death value to the other
  684.    end in either the OPEN or the RESPONSE packet. As soon as the
  685.    connection is opened, each end sets its death timer to its chosen
  686.    value; this timer is reset every time a packet is received.  When a
  687.    NETBLT's death timer expires, it will close the connection without
  688.    sending any more packets.
  689.  
  690. 3.2.6 Keepalive packets.
  691.  
  692.    NETBLT includes a keepalive function, which sends packets repeatedly
  693.    at fixed intervals when a NETBLT has no other reason to send packets.
  694.    The sender uses NULL-ACKs as keepalive packets; the receiver uses
  695.    empty CONTROL packets. If the sending NETBLT is not ready to send
  696.    upon receipt of a control packet, it sends a single NULL-ACK packet
  697.    to clear any outstanding control timers at the receiving end.  Each
  698.    end uses the other end's death-timeout value to compute a frequency
  699.    with which to send keepalive packets. The keepalive frequency should
  700.    be high enough that several keepalive packets can be lost before the
  701.    other end's death timer expires; suitable values are the sender's
  702.    death timer value divided by seven for the receiver, and the
  703.    receiver's death timer value divided by eight for the sender
  704.    (keepalive intervals should be different to avoid repeated collisions
  705.    in half-duplex operations).
  706.  
  707. 3.3 Connection termination.
  708.  
  709.    There are four conditions under which a connection is terminated:  a
  710.    successful transfer, a client quit, a NETBLT abort, and a death timer
  711.    timeout.
  712.  
  713. 3.3.1 Successful transfer.
  714.  
  715.    After a successful data transfer, NETBLT closes the connection.
  716.  
  717.    When the sender is transmitting the last buffer of data, it sets a
  718.    "last-buffer" flag on every DATA packet in the buffer. The receiver
  719.    will recognize that the transfer has completed successfully when all
  720.    of the following are true: (1) it has received DATA packets with a
  721.    "last- buffer" flag set, (2) all its control messages have been
  722.    acknowledged, and (3) it has no outstanding buffers with missing
  723.    packets.  The DONE packet is transmitted when the receiver recognizes
  724.    that the transfer has been successfully completed.  At that point,
  725.    the receiver closes its half of the connection.  Figure 5 illustrates
  726.    this sequence.
  727.  
  728.  
  729.  
  730. White                                                          [Page 13]
  731.  
  732. INTERNET DRAFT                   NETBLT                       April 1997
  733.  
  734.  
  735.  
  736.     +-------------+                                    +------------+
  737.     |             |                                    |            |
  738.     |  Connected  |-->-- Last buffer received & --->---|  Inactive  |
  739.     |             |      all buffers disposed of &     |            |
  740.     +-------------+      all messages acked            +------------+
  741.                              (send DONE)
  742.  
  743.    Figure 5. Receiver successful close state diagram
  744.  
  745.    The sender will recognize that the transfer has completed when the
  746.    following are true: (1) it has transmitted DATA packets with a "last-
  747.    buffer" flag set and (2) it has received OK messages for all its
  748.    buffers.  At that point, it will "dally" for a predetermined period
  749.    of time before closing its half of the connection.  If the NULL-ACK
  750.    packet acknowledging the receiver's last OK message was lost, the
  751.    receiver has time to retransmit the OK message, receive a new NULL-
  752.    ACK, and recognize a successful transfer.  The dally timer value is
  753.    based on the receiver's control timer value; it should be long enough
  754.    to allow the receiver's control timer to expire so that the OK
  755.    message can be re-sent. A value of twice the receiver's control timer
  756.    value is suitable for the dally timer.  When the sender receives a
  757.    DONE packet, it clears its dally timer and close its half of the
  758.    connection.  Figure 6 illustrates this sequence.
  759.  
  760.  
  761.           +-----------+
  762.           |           |
  763.           | Connected |--->---+
  764.           |           |       |
  765.           +-----------+  All buffers flushed
  766.                          (send NULL-ACK;
  767.                           set dally timer)
  768.           +-----------+       |
  769.           |           |---<---+-------<-----------------+
  770.           | Dallying  |                                 |
  771.           |           |----->--- OK message received ->-+
  772.           +-----------+          (send NULL-ACK;
  773.                 |                 set dally timer)        +----------+
  774.                 |                                         |          |
  775.                 +-->-- DONE received or dally timeout ->--| Inactive |
  776.                                                           |          |
  777.                                                           +----------+
  778.  
  779.    Figure 6. Sender successful close state diagram
  780.  
  781. 3.3.2 Client QUIT.
  782.  
  783.  
  784.  
  785.  
  786. White                                                          [Page 14]
  787.  
  788. INTERNET DRAFT                   NETBLT                       April 1997
  789.  
  790.  
  791.    During a NETBLT transfer, one client may send a QUIT packet to the
  792.    other, to terminate the transfer prematurely. The NETBLT receiving
  793.    the QUIT packet will take no action other than immediately notifying
  794.    its client and transmitting a QUITACK packet.  The QUIT sender will
  795.    time out and retransmit until a QUITACK has been received or its
  796.    death timer expires.  The sender of the QUITACK will dally before
  797.    quitting, so that it can respond to a retransmitted QUIT.  Figure 7
  798.    illustrates this sequence.
  799.  
  800.  
  801.        +-----------+
  802.        |           |
  803.    +---| Connected |--->--- Quit request from client ----->---+
  804.    |   |           |        (send QUIT; set quit timer)       |
  805.    |   +-----------+                                   +-----------+
  806.    |                          +- Quit timer timeout ->-|           |
  807.    +->- QUIT received -->--+  |    (send QUIT)         | Quit-sent |
  808.         (send QUIT-ACK;    |  +--------<---------------|           |
  809.          set dally timer)  |                           +-----------+
  810.        +------------+      |                                  |
  811.        |            |--<---+--------<-----------+             +->--+
  812.    +---| Ouit-rcvd  |                           |                  |
  813.    |   |            |---->----- QUIT received --+                  |
  814.    |   +------------+           (send QUIT-ACK;                    |
  815.    |                            set dally timer)                   |
  816.    |                          +------------+                       |
  817.    |                          |            |                       |
  818.    +-->-- Dally timeout -->---|  Inactive  |-<--QUIT-ACK received -+
  819.                               |            |     or death timeout
  820.                               +------------+
  821.  
  822.    Figure 7. Quit state diagram
  823.  
  824. 3.3.3 NETBLT ABORT.
  825.  
  826.    An ABORT will take place when an unrecoverable malfunction occurs.
  827.    Since the ABORT originates in the NETBLT layer, it may be sent at any
  828.    time.  The ABORT implies a malfunction, so no transmit reliability is
  829.    expected, and the sender will immediately close its connection.
  830.    Figure 8 illustrates this sequence.
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. White                                                          [Page 15]
  843.  
  844. INTERNET DRAFT                   NETBLT                       April 1997
  845.  
  846.  
  847.  
  848.                 +------------+
  849.                 |            |
  850.            +-<--| Connected  |-->---+
  851.            |    |            |      |
  852.            |    +------------+      |
  853.            |                        |
  854.       ABORT received            Internal malfunction
  855.            |                     (send ABORT)
  856.            |    +------------+      |
  857.            |    |            |      |
  858.            +->--|  Inactive  |--<---+
  859.                 |            |
  860.                 +------------+
  861.  
  862.    Figure 8. Abort state diagram
  863.  
  864.  
  865. 3.3.4 Death timer timeout.
  866.  
  867.    When a NETBLT's death timer expires, it closes the connection without
  868.    sending further packets.
  869.  
  870. 4. Protocol layering structure.
  871.  
  872.    NETBLT may be implemented directly on top of the Internet Protocol
  873.    (IP), in which case it has been assigned an official protocol number
  874.    of 30 (decimal), which is 0x1e (hexadecimal).  In other instances, it
  875.    has been implemented over UDP, for which an official protocol number
  876.    will be requested.
  877.  
  878. 5. Packet formats.
  879.  
  880.    NETBLT packets are divided into three categories, all of which share
  881.    a common 12-byte packet header.
  882.  
  883.      a.  There are three packet types that travel only from data sender
  884.    to receiver; these include the high-acknowledged-sequence-numbers
  885.    which the receiver uses for control of message transmission
  886.    reliability.  They are the NULL-ACK, DATA, and LDATA packets.
  887.  
  888.      b.  There are two packet types that travels only from receiver to
  889.    sender.  One is the CONTROL packet.  Each CONTROL packet can contain
  890.    an arbitrary number of control messages (GO, OK, or RESEND), each
  891.    with its own sequence number. The other is the unreliably-transmitted
  892.    DONE packet.
  893.  
  894.      c.  There are six packet types which can travel in either
  895.  
  896.  
  897.  
  898. White                                                          [Page 16]
  899.  
  900. INTERNET DRAFT                   NETBLT                       April 1997
  901.  
  902.  
  903.    direction. These packet types either have special ways of insuring
  904.    reliability, or are not transmitted reliably.  They are the OPEN,
  905.    RESPONSE, REFUSED, QUIT, QUITACK, and ABORT packets. The OPEN packet
  906.    travels from active side to passive side; the RESPONSE and REFUSED
  907.    packets travel from passive side to active side; and the QUIT,
  908.    QUITACK, and ABORT packets can be sent by either side.
  909.  
  910.    All packet headers are "longword-aligned," such that all packet
  911.    headers are a multiple of four bytes in length and all four-byte
  912.    fields start on a longword boundary. The content of the longword
  913.    alignment fields is zeros.  The Client String field is terminated
  914.    with at least one null byte, with extra null bytes added at the end
  915.    to create a field that is a multiple of four bytes long.  All numeric
  916.    values are coded as binary integers.
  917.  
  918.  
  919.    OPEN (type 0) and RESPONSE (type 1)
  920.  
  921.      0                   1                   2                   3
  922.      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
  923.     +---------------+---------------+---------------+---------------+
  924.     |           Checksum            |    Version    |     Type      |
  925.     +---------------+---------------+---------------+---------------+
  926.     |           Length              |           Local Port          |
  927.     +---------------+---------------+---------------+---------------+
  928.     |        Foreign Port           | Longword Alignment Padding    |
  929.     +---------------+---------------+---------------+---------------+
  930.     |                       Connection Unique ID                    |
  931.     +---------------+---------------+---------------+---------------+
  932.     |                         Buffer Size                           |
  933.     +---------------+---------------+---------------+---------------+
  934.     |        DATA packet size       |          Burst Size           |
  935.     +---------------+---------------+---------------+---------------+
  936.     |           Burst Interval      |       Death Timer Value       |
  937.     +---------------+---------------+---------------+---------------+
  938.     |  Reserved (must be zero)  |C|M| Maximum # Outstanding Buffers |
  939.     +---------------+---------------+---------------+---------------+
  940.     | Client String ...
  941.     +---------------+---------------+---------------
  942.                                       Longword Alignment Padding    |
  943.                      ---------------+-------------------------------+
  944.  
  945.    a. Checksum: to generate the checksum, the checksum field itself is
  946.     cleared, the 16-bit ones-complement sum is computed over the packet,
  947.     and the ones complement of this sum is placed in the checksum field.
  948.  
  949.    b. Version: the NETBLT protocol version number. This document describes
  950.    version 4 of NETBLT.
  951.  
  952.  
  953.  
  954. White                                                          [Page 17]
  955.  
  956. INTERNET DRAFT                   NETBLT                       April 1997
  957.  
  958.  
  959.  
  960.    c. Type: the NETBLT packet type number (OPEN = 0, RESPONSE = 1, etc.)
  961.  
  962.    d. Length: the total length (NETBLT header plus data, if present) of the
  963.    NETBLT  packet in bytes
  964.  
  965.    e. Local Port: the local NETBLT's 16-bit port number
  966.  
  967.    f. Foreign Port: the foreign NETBLT's 16-bit port number
  968.  
  969.    g. Connection UID: the 32 bit connection unique identifier. Connection
  970.    UID may be any randomly-selected value, which is unique in that if more
  971.    than one NETBLT connection is supported by a single host interface, it
  972.    will not be duplicated.
  973.  
  974.    h. Buffer size: the size in bytes of each NETBLT buffer (except the
  975.    last)
  976.  
  977.    i. Data packet size: length of each DATA packet in bytes
  978.  
  979.    j. Burst Size: Number of DATA packets in a burst
  980.  
  981.    k. Burst Interval: Transmit time in milliseconds of a single burst
  982.  
  983.    l. Death timer: Packet sender's death timer value in seconds
  984.  
  985.    m. "C": the DATA/LDATA packet data checksum flag (0 = do not checksum
  986.    DATA and LDATA packet data, 1 = do).
  987.  
  988.    n. "M": the transfer mode (0 = READ, 1 = WRITE).
  989.  
  990.    o. Maximum Outstanding Buffers: maximum number of buffers that can be
  991.    transferred  before waiting for an OK message from the receiving NETBLT.
  992.  
  993.    p. Client string: an arbitrary, null-terminated, longword-aligned string
  994.    for use by  NETBLT clients.
  995.  
  996.    QUITACK (type 3), and DONE (type 10)
  997.  
  998.      0                   1                   2                   3
  999.      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
  1000.     +---------------+---------------+---------------+---------------+
  1001.     |           Checksum            |    Version    |     Type      |
  1002.     +---------------+---------------+---------------+---------------+
  1003.     |           Length              |           Local Port          |
  1004.     +---------------+---------------+---------------+---------------+
  1005.     |        Foreign Port           | Longword Alignment Padding    |
  1006.     +---------------+---------------+---------------+---------------+
  1007.  
  1008.  
  1009.  
  1010. White                                                          [Page 18]
  1011.  
  1012. INTERNET DRAFT                   NETBLT                       April 1997
  1013.  
  1014.  
  1015.  
  1016.    QUIT (type 2), ABORT (type 4), and REFUSED (type 9)
  1017.  
  1018.      0                   1                   2                   3
  1019.      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
  1020.     +---------------+---------------+---------------+---------------+
  1021.     |           Checksum            |    Version    |     Type      |
  1022.     +---------------+---------------+---------------+---------------+
  1023.     |           Length              |           Local Port          |
  1024.     +---------------+---------------+---------------+---------------+
  1025.     |        Foreign Port           | Longword Alignment Padding    |
  1026.     +---------------+---------------+---------------+---------------+
  1027.     | Reason for QUIT/ABORT/REFUSE...
  1028.     +---------------+---------------+---------------
  1029.                                       Longword Alignment Padding    |
  1030.                      ---------------+-------------------------------+
  1031.  
  1032.  
  1033.    DATA (type 5) and LDATA (type 6)
  1034.  
  1035.      0                   1                   2                   3
  1036.      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
  1037.     +---------------+---------------+---------------+---------------+
  1038.     |           Checksum            |    Version    |     Type      |
  1039.     +---------------+---------------+---------------+---------------+
  1040.     |           Length              |           Local Port          |
  1041.     +---------------+---------------+---------------+---------------+
  1042.     |        Foreign Port           | Longword Alignment Padding    |
  1043.     +---------------+---------------+---------------+---------------+
  1044.     |                       Buffer Number                           |
  1045.     +---------------+---------------+---------------+---------------+
  1046.     |                     Last Buffer Touched                       |
  1047.     +---------------+---------------+---------------+---------------+
  1048.     | High Consecutive Seq Num Rcvd |         Packet Number         |
  1049.     +---------------+---------------+---------------+---------------+
  1050.     |    Data Area Checksum Value   |      Reserved (MBZ)         |L|
  1051.     +---------------+---------------+---------------+---------------+
  1052.     |      New Burst Size           |        New Burst Interval     |
  1053.     +---------------+---------------+---------------+---------------+
  1054.  
  1055.    a. Checksum: checksum of the packet header only, including the Data Area
  1056.    Checksum  Value.
  1057.  
  1058.    b. Buffer number: a 32 bit unique number assigned to every buffer.
  1059.    Buffers are sequentially numbered, starting with 1.
  1060.  
  1061.    c. Last Buffer Touched: the number of the highest buffer transmitted so
  1062.    far.
  1063.  
  1064.  
  1065.  
  1066. White                                                          [Page 19]
  1067.  
  1068. INTERNET DRAFT                   NETBLT                       April 1997
  1069.  
  1070.  
  1071.  
  1072.    d. High Consecutive Sequence Number Received: Highest control message
  1073.    sequence number below which all control messages have been received.
  1074.  
  1075.    e. Packet number: sequential, monotonically increasing DATA packet
  1076.    identifier, starting with 0 in each buffer.
  1077.  
  1078.    f. Data Area Checksum Value: Checksum of the DATA packet's data.
  1079.    Algorithm used  is the same as that used to compute checksums of other
  1080.    NETBLT packets.
  1081.  
  1082.    g. "L" is a bit that is set to 1 when the buffer that this DATA packet
  1083.    belongs to is the last  buffer in the transfer.
  1084.  
  1085.    h. New Burst Size:  Burst size as negotiated from value given by
  1086.    receiving NETBLT  in OK message.
  1087.  
  1088.    i. New Burst Interval: Burst interval as negotiated from value given by
  1089.    receiving  NETBLT in OK message.  Value is in milliseconds.
  1090.  
  1091.  
  1092.    NULL-ACK (type 7)
  1093.  
  1094.      0                   1                   2                   3
  1095.      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
  1096.     +---------------+---------------+---------------+---------------+
  1097.     |           Checksum            |    Version    |     Type      |
  1098.     +---------------+---------------+---------------+---------------+
  1099.     |           Length              |           Local Port          |
  1100.     +---------------+---------------+---------------+---------------+
  1101.     |        Foreign Port           | Longword Alignment Padding    |
  1102.     +---------------+---------------+---------------+---------------+
  1103.     |                    Last Buffer Touched                        |
  1104.     +---------------+---------------+---------------+---------------+
  1105.     | High Consecutive Seq Num Rcvd |        New Burst Size         |
  1106.     +---------------+---------------+---------------+---------------+
  1107.     |       New Burst Interval      |  Longword Alignment Padding |L|
  1108.     +---------------+---------------+---------------+---------------+
  1109.  
  1110.    a. Last Buffer Touched: the number of the highest buffer transmitted so
  1111.    far.
  1112.  
  1113.    b. High Consecutive Sequence Number Received: same as in DATA/LDATA
  1114.    packet.
  1115.  
  1116.    c. New Burst Size:  Burst size as negotiated (half- and full-duplex
  1117.    only) from value given by receiving NETBLT in OK message.
  1118.  
  1119.  
  1120.  
  1121.  
  1122. White                                                          [Page 20]
  1123.  
  1124. INTERNET DRAFT                   NETBLT                       April 1997
  1125.  
  1126.  
  1127.    d. New Burst Interval: Burst interval as negotiated (half- and full-
  1128.    duplex only) from value given by receiving  NETBLT in OK message.  Value
  1129.    is in milliseconds.
  1130.  
  1131.    e. "L" is a bit that is set to 1 when the buffer identified in the Last
  1132.    Buffer Touched field is the last buffer in the transfer.
  1133.  
  1134.    CONTROL (type 8)
  1135.  
  1136.      0                   1                   2                   3
  1137.      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
  1138.     +---------------+---------------+---------------+---------------+
  1139.     |           Checksum            |    Version    |     Type      |
  1140.     +---------------+---------------+---------------+---------------+
  1141.     |           Length              |           Local Port          |
  1142.     +---------------+---------------+---------------+---------------+
  1143.     |        Foreign Port           | Longword Alignment Padding    |
  1144.     +---------------+---------------+---------------+---------------+
  1145.  
  1146.    Followed by any number of messages, each of which is longword
  1147.    aligned, with the following formats:
  1148.  
  1149.    GO message (subtype 0)
  1150.  
  1151.      0                   1                   2                   3
  1152.      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
  1153.     +---------------+---------------+---------------+---------------+
  1154.     |   Subtype     | Word Padding  |       Sequence Number         |
  1155.     +---------------+---------------+---------------+---------------+
  1156.     |                        Buffer Number                          |
  1157.     +---------------+---------------+---------------+---------------+
  1158.  
  1159.    a. Subtype: message type (GO = 0, OK = 1, RESEND = 2)
  1160.  
  1161.    b. Sequence number: A 16 bit unique message number.  Sequence numbers
  1162.    must be  monotonically increasing, starting with 1.
  1163.  
  1164.    c. Buffer number: as in DATA/LDATA packet
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. White                                                          [Page 21]
  1179.  
  1180. INTERNET DRAFT                   NETBLT                       April 1997
  1181.  
  1182.  
  1183.    OK message (subtype 1).
  1184.  
  1185.      0                   1                   2                   3
  1186.      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
  1187.     +---------------+---------------+---------------+---------------+
  1188.     |   Subtype     | Word Padding  |       Sequence Number         |
  1189.     +---------------+---------------+---------------+---------------+
  1190.     |                        Buffer Number                          |
  1191.     +---------------+---------------+---------------+---------------+
  1192.     |    New Offered Burst Size     |   New Offered Burst Interval  |
  1193.     +---------------+---------------+---------------+---------------+
  1194.     | Current control timer value   | Longword Alignment Padding    |
  1195.     +---------------+---------------+---------------+---------------+
  1196.  
  1197.    a. New offered burst size: burst size for subsequent buffer transfers,
  1198.    possibly based  on performance information for previous buffer
  1199.    transfers.
  1200.  
  1201.    b. New offered burst interval: burst rate for subsequent buffer
  1202.    transfers, possibly  based on performance information for previous
  1203.    buffer transfers.  Rate is in  milliseconds.
  1204.  
  1205.    c. Current control timer value: Receiving NETBLT's control timer value
  1206.    in  milliseconds.
  1207.  
  1208.    RESEND message (subtype 2)
  1209.  
  1210.      0                   1                   2                   3
  1211.      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
  1212.     +---------------+---------------+---------------+---------------+
  1213.     |   Subtype     | Word Padding  |       Sequence Number         |
  1214.     +---------------+---------------+---------------+---------------+
  1215.     |                        Buffer Number                          |
  1216.     +---------------+---------------+---------------+---------------+
  1217.     |  Number of Missing Packets    |  New Offered Burst Size       |
  1218.     +---------------+---------------+---------------+---------------+
  1219.     |    New Offered Burst Interval |   Longword Alignment Padding  |
  1220.     +---------------+---------------+---------------+---------------+
  1221.     | Packet Number (2 bytes/packet)| ...
  1222.     +---------------+---------------+----------
  1223.                                     |    Padding (if necessary)     |
  1224.                          -----------+---------------+---------------+
  1225.  
  1226.    a. Packet number:  the 16 bit data packet identifier of a  DATA packet,
  1227.    from the buffer identified by Buffer Number, whose retransmission  is
  1228.    requested. Multiple packet numbers may occur in one RESEND message.
  1229.  
  1230. 6. NETBLT modes of operation.
  1231.  
  1232.  
  1233.  
  1234. White                                                          [Page 22]
  1235.  
  1236. INTERNET DRAFT                   NETBLT                       April 1997
  1237.  
  1238.  
  1239.    NETBLT supports three modes of operation; simplex, half-duplex, and
  1240.    full-duplex.  This section identifies the required components of
  1241.    NETBLT for simplex and half-duplex modes of operation. Across full-
  1242.    duplex connections the normal NETBLT as described above is used.
  1243.  
  1244. 6.1 Simplex.
  1245.  
  1246.    The only NETBLT packet types used in the simplex case are the
  1247.    following:
  1248.  
  1249.    a. OPEN
  1250.    b. QUIT
  1251.    c. ABORT
  1252.    d. DATA
  1253.    e. LDATA
  1254.    f. NULL-ACK
  1255.  
  1256. 6.1.1 Sender simplex operation.
  1257.  
  1258.    Operation of NETBLT in simplex send mode is as follows: the OPEN
  1259.    message is sent; DATA and LDATA packets are sent; and the connection
  1260.    is closed. Any packet may be sent more than once, for redundancy, but
  1261.    for all n, packets from buffer(n - 1) will not be sent after packets
  1262.    from buffer(n).  QUIT and ABORT packets may be sent at any time, and
  1263.    will have the same effect.  The Maximum Number of Outstanding Buffers
  1264.    (in the OPEN packet) is set to 2.
  1265.  
  1266. 6.1.2 Receiver simplex operation.
  1267.  
  1268.    Operation of NETBLT in simplex receive mode is as follows: when an
  1269.    OPEN packet is received, a connection is considered to be
  1270.    established. Packets received are stored into NETBLT buffers. The
  1271.    receiving NETBLT will pass a buffer to the client when the buffer is
  1272.    filled with correct packets or when good packets for a higher-
  1273.    numbered buffer are received. A list of packets which are possibly
  1274.    bad, or missing, is passed to the client. When the last buffer (L
  1275.    flag set in packet headers) has been passed to the client, or when
  1276.    the death timeout has expired, the receiving connection is
  1277.    terminated.
  1278.  
  1279.    The receiving NETBLT will discard redundant packets.  In the case of
  1280.    errors, the following rules apply at the receiving NETBLT:
  1281.  
  1282.    a. A NETBLT packet with a bad header checksum is discarded.
  1283.  
  1284.    b. A NETBLT DATA or LDATA packet with a good header checksum and a
  1285.    bad data area checksum may optionally be saved but flagged as
  1286.    possibly bad. Reasonableness checks may be used to insure that good
  1287.  
  1288.  
  1289.  
  1290. White                                                          [Page 23]
  1291.  
  1292. INTERNET DRAFT                   NETBLT                       April 1997
  1293.  
  1294.  
  1295.    data is not affected by the possibly bad packet data.  If a good
  1296.    NETBLT packet (redundantly transmitted) is received with the same
  1297.    buffer and packet number as a possibly bad  one, the possibly bad
  1298.    packet is replaced with the good one.
  1299.  
  1300. 6.2 Half-duplex.
  1301.  
  1302.    The normal, full-duplex version of NETBLT operates across half-duplex
  1303.    connections with the following modification: keepalive packets will
  1304.    not be sent by the receiver while it is in the process of receiving a
  1305.    packet.  The burst timer and burst size counter are reset at the
  1306.    start of each transmission period.  If the Maximum Number of
  1307.    Outstanding Buffers (in the OPEN packet) is set to 1, the sending and
  1308.    receiving NETBLTs will operate in lockstep.  If the Maximum Number of
  1309.    Outstanding Buffers is set to a value N greater than 1, the receiving
  1310.    NETBLT will wait until N buffers have been completely received or
  1311.    have had their data timers expire before sending a CONTROL packet.
  1312.    An exception occurs when the last buffer is sent; when all buffers up
  1313.    to and including the last buffer have been completely received or
  1314.    have had their data timers expire, the receiving NETBLT is permitted
  1315.    to send its CONTROL packet. The last buffer is identified by the
  1316.    receiver as the buffer for which the "L" bit is set in a DATA/LDATA
  1317.    packet, or as the Last Buffer Touched in a NULL-ACK packet with its
  1318.    "L" bit set to 1.
  1319.  
  1320. 7. Security Considerations
  1321.  
  1322.    Security considerations for NETBLT operation have not been addressed
  1323.    in this document.
  1324.  
  1325. 8. Possible Extensions
  1326.  
  1327.    Two forms of extension to NETBLT are being examined. The first would
  1328.    make it possible for NETBLT to operate as a unidirectional stream
  1329.    protocol, by allowing all buffers, not just the last one, to be of
  1330.    any size less than or equal to the negotiated size. The second would
  1331.    provide a "Transaction NETBLT", using an approach similar to
  1332.    Transaction TCP [RFC1379].
  1333.  
  1334. 9. References
  1335.  
  1336.    [Jacobsen]  Jacobsen, V. "Congestion Avoidance and Control", ACM
  1337.    SIGCOMM 88 Symposium Proceedings, August 1988
  1338.  
  1339.    [MIL-STD]  MIL-STD-2045-44500 "Tactical Communications Protocol 2
  1340.    (TACO2) for the National Imagery Transmission Format Standard", June
  1341.    1993
  1342.  
  1343.  
  1344.  
  1345.  
  1346. White                                                          [Page 24]
  1347.  
  1348. INTERNET DRAFT                   NETBLT                       April 1997
  1349.  
  1350.  
  1351.    [RFC998]  Clark, D., Lambert, M., and Zhang, L. "NETBLT: A Bulk Data
  1352.    Transfer Protocol", RFC 998, March 1987
  1353.  
  1354.    [RFC1379]  Braden, R., "Extending TCP for Transactions -- Concepts",
  1355.    RFC 1379, November 1992
  1356.  
  1357.  
  1358. 10. Author's Address
  1359.  
  1360.    John C. C. White
  1361.    The MITRE Corporation
  1362.    202 Burlington Road
  1363.    Bedford, MA 01730-1420
  1364.  
  1365.    Phone: 617-271-3284
  1366.    Fax:   617-271-2721
  1367.    Email: jccw@mitre.org
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. White                                                          [Page 25]
  1403.  
  1404.  
  1405.