RFC 281

Suggested addition to File Transfer Protocol

πŸ“… published December 1971, from ietf

A suggested Addition to File Transfer Protocol ✨

okay bestie, let's do the paperwork first πŸ“„πŸŽ€

  • Network Working Group 🌸
  • Author: A. McKenzie, BBN πŸ’œ
  • NIC: 8163
  • Date: 8 December 1971 πŸ“…
  • Category: D.7 ⭐
  • References: RFC #264, RFC #265 πŸ”—
  • Obsoletes / Updates: the original doesn't list anything it obsoletes or updates, so there's nothing to report there 🫢

The meeting that started it all πŸ¦‹

so on November 16 there was an informal meeting at UCLA about a network standard Remote Job Service (RJS) protocol. the people there were from UCLA-CCN and UCSB (the only RJS sites on the network right now), plus UCLA-NMC and the BBN network project. a report on that meeting is coming out as its own RFC soon, so i'm not going to get into it here πŸ’…

while we were thinking about using the proposed File Transfer Protocol (RFC #265) for RJS, we realised that a "restart" procedure could be a seriously useful addition to FTP πŸ”₯

Why big files matter πŸ’–

okay so a lot of the people designing protocols right now are thinking about short data transmissions. the "typical" lengths people have in mind are a few characters, a print line, or maybe a page of text. but the current RJS sites have a different experience: single files are often way longer. a 400-page line-printer output file wouldn't be weird at all for them 😭

and it's reasonable to predict that remote job service use will lean toward large jobs (even though large jobs don't always mean large I/O files). plus, when other batch service sites (ILLIAC, UCSD) join in, there will be even more long-file transfers πŸš€

with all that in mind, FTP should probably include a method of "restarting" a long file transfer if some element in the transmission path fails after a large volume of data has already gone through. it could be an option, so interactive-user systems can just ignore it if they want 🧚

The key to restarting πŸ‘‘

the big thing with a "restart" procedure is getting both ends of the transmission path to agree on exactly where the retransmission should begin. good news: the proposed Data Transfer Protocol (RFC #264), which FTP sits on top of, already has two possible restart markers built in:

  • a) The "information separators" (transaction type B4), which are available in both "transparent block" transfers and "descriptor and counts" transfers, and
  • b) The "sequence numbers", which can be used with the "descriptor and counts" transfer mode.

after some discussion, the group agreed that "information separators" (as they'd be used in "transparent block" transfer mode, i.e., without "sequence numbers") probably aren't an UNAMBIGUOUS restart location marker. so we suggest using "sequence numbers" as the markers instead 🎯

we know this choice might leave out TIPs and other Hosts that don't use sequence numbering from this kind of recovery. but we think our suggestion fixes at least some of that problem 🫢

The setup 🎬

imagine a site we'll call the "user site" or "user" has started a connection from its own file transfer process to a file transfer process at another site, which we'll call the "server site" or "server". after the right exchanges of information, a file transfer (using the File Transfer Protocol) begins over the path between the two sites. some information gets transferred, and then the path between user and server breaks πŸ’”

later, the user opens a new connection between the file transfer processes at user and server, sets up the relevant access privileges, and wants to pick up the transmission that was in progress when the path broke. so first, here are four new op-codes for the File Transfer Protocol:

Hex        Operation
---        ---------
10         Append at sequence number
11         Retrieve at sequence number
12         Resume Retrieve
13         Use the sequence number
  • 10 Append at sequence number: basically the same as any of the "Store" or "Append..." commands, except a 16-bit sequence number comes right after the op-code (before the pathname) ✨
  • 11 Retrieve at sequence number: the same as the "Retrieve" command, except a 16-bit sequence number comes right after the op-code (before the pathname) πŸŽ€
  • 12 Resume Retrieve: used when the user wants the server to choose the sequence number. otherwise it's identical to the "Retrieve" command 🌈
  • 13 Use the sequence number: only has the op-code and a 16-bit sequence number. it's basically a "no, I can't locate the sequence number you gave me in an 'Append at sequence number' or 'Retrieve at sequence number' command" and, at the same time, a suggestion of another number that can be located πŸ’…

there are a few possible cases, shown below. the user site is always the one on the left side of the page πŸ‘ˆ

Case A: the user is sending when the path breaks πŸ¦‹

   A.   User site sending at time path is broken:
       /
      /   Append at sequence number
     |    ------------------------------------------->
     |    Acknowledge
     |    <------------------------------------------
     |    Data
     |    ------------------------------------------->
     |
      \   The server site agrees to resume at the user-chosen point.
       \  The first data transaction is numbered with the chosen
        \ sequence number.

       /  Append at sequence number
      /   ------------------------------------------->
     |    Unsuccessful Terminate
     |    <-------------------------------------------
     |
      \   The server site will never permit restart for some reason
       \  (seq. #s were ignored or not used initially, seq #s were not
        \ stored with the file, the file was lost when the path was
         \broken, etc.)

       /  Append at sequence number
      /   ------------------------------------------->
     |    Use this sequence number
     |    <-------------------------------------------
     |       /       Data
     |      /        --------------------------------->
     |      \        The user site agrees to use the server-chosen number
     |       \       and the first data transaction is numbered with the
     |        \      chosen number.
     |
     |                       or
     |
     |         /      Unsuccessful Terminate
      \       /       ------------------------------->
       \      \       The user site cannot restart at this number for
        \      \     some reason.

Case B: the user is receiving, and doesn't care about the exact number πŸ“

this one's for when the user doesn't really care about the exact sequence number. for example, if the user site is sending the file to a printer, a few duplicate pages are probably fine, and the user site probably wouldn't want to remember sequence numbers anyway πŸ–¨οΈ

   B.  User site receiving at time path is broken, and the user site
   does not particularly care about the exact sequence number (for
   example, if the user site is sending the file to a printer, some
   duplicate pages are probably acceptable and the user site would
   probably not want to remember sequence numbers).

               /  Resume Retrieve
              /   ------------------------------------>
             |    Data
             |    <------------------------------------
             |    The server picks some point and begins transmission at
             |    that point.  If sequence numbers were used during the
             |    original transmission, then the first transaction of
             |    this transmission must exactly match (including
             |    sequence number) some transaction of the original
              \   transmission.

               /  Resume Retrieve
              /   ------------------------------------>
             |    Unsuccessful Terminate
              \   <------------------------------------
               \  The server site is unable or unwilling to restart the
                \ transmission.

Case C: the user is receiving, and does care about the number πŸŽ€

   C.  User site receiving at time path is broken, and does care about
   the value of the sequence number.

               /  Retrieve at sequence number
              /   ---------------------------------------->
             |    Data
             |    <----------------------------------------
              \   The server agrees to resume at the user-chosen
               \  point. The first data transaction is numbered
                \ with the chosen sequence number.

               /  Retrieve at sequence number
              /   ---------------------------------------->
             |    Unsuccessful Terminate
             |    <----------------------------------------
             |
             |    The server site will never permit restart for some
             |    reason.
             |    Retrieve at sequence number
             |    ---------------------------------------->
             |    Use this sequence number
             |    <-----------------------------------------
             |            /    Acknowledge
             |           /     ---------------------------->
             |          |      Data
             |          |      <----------------------------
             |           \     The user site agrees to use the
             |            \    server-chosen number.  The first data
             |             \   transaction is numbered with the chosen
             |              \  number.
             |
             |                               or
             |
             |             /   Unsuccessful Terminate
             |            /    ----------------------------->
             |           |
              \           \    The server cannot use the user-chosen
               \           \   number and the user cannot use the
                \           \  server-chosen number. Therefore the attempt
                 \           \ to restart must be abandoned.

Who's actually doing this? 🧚

some sites (like UCLA-CCN) have agreed, at least in principle, to implement these commands. more importantly, they've agreed to store sequence numbers (along with the files being transferred) on a non-volatile storage medium, so restarts can actually happen πŸ’œ

of course, that only happens if this proposal (or something similar) gets accepted by the NWG as part of the File Transfer Protocol 🌟 so if you're an interested party, send your comments or counter-proposals to the FTP committee and/or publish your ideas in the RFC series. we're hoping to hear from you 🫢

AAM/jm

[This RFC was put into machine readable form for entry] [into the online RFC archives by Kelly Tardif, Viaginie 10/99]
πŸ“¦ where this page comes from