home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc1783 < prev    next >
Text File  |  1995-03-21  |  8KB  |  284 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          G. Malkin
  8. Request for Comments: 1783                                Xylogics, Inc.
  9. Updates: 1350                                                  A. Harkin
  10. Category: Standards Track                            Hewlett Packard Co.
  11.                                                               March 1995
  12.  
  13.  
  14.                          TFTP Blocksize Option
  15.  
  16. Status of this Memo
  17.  
  18.    This document specifies an Internet standards track protocol for the
  19.    Internet community, and requests discussion and suggestions for
  20.    improvements.  Please refer to the current edition of the "Internet
  21.    Official Protocol Standards" (STD 1) for the standardization state
  22.    and status of this protocol.  Distribution of this memo is unlimited.
  23.  
  24. Abstract
  25.  
  26.    The Trivial File Transfer Protocol [1] is a simple, lock-step, file
  27.    transfer protocol which allows a client to get or put a file onto a
  28.    remote host.  One of its primary uses is the booting of diskless
  29.    nodes on a Local Area Network.  TFTP is used because it is very
  30.    simple to implement in a small node's limited ROM space.  However,
  31.    the choice of a 512-byte blocksize is not the most efficient for use
  32.    on a LAN whose MTU may 1500 bytes or greater.
  33.  
  34.    This document describes a TFTP option which allows the client and
  35.    server to negotiate a blocksize more applicable to the network
  36.    medium.  The TFTP Option Extension mechanism is described in [2].
  37.  
  38. Blocksize Option Specification
  39.  
  40.    The TFTP Read Request or Write Request packet is modified to include
  41.    the blocksize option as follows:
  42.  
  43.       +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
  44.       |  opc  |filename| 0 |  mode  | 0 | blksize| 0 | #octets| 0 |
  45.       +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
  46.  
  47.       opc
  48.          The opcode field contains either a 1, for Read Requests, or 2,
  49.          for Write Requests, as defined in [1].
  50.  
  51.       filename
  52.          The name of the file to be read or written, as defined in [1].
  53.          This is a NULL-terminated field.
  54.  
  55.  
  56.  
  57.  
  58. Malkin & Harkin                                                 [Page 1]
  59.  
  60. RFC 1783                 TFTP Blocksize Option                March 1995
  61.  
  62.  
  63.       mode
  64.          The mode of the file transfer: "netascii", "octet", or "mail",
  65.          as defined in [1].  This is a NULL-terminated field.
  66.  
  67.       blksize
  68.          The Blocksize option, "blksize" (case insensitive).  This is a
  69.          NULL-terminated field.
  70.  
  71.       #octets
  72.          The number of octets in a block, specified in ASCII.  Valid
  73.          values range between "8" and "65464" octets, inclusive.  This
  74.          is a NULL-terminated field.
  75.  
  76.    For example:
  77.  
  78.       +-------+--------+---+--------+---+--------+---+--------+---+
  79.       |   1   | foobar | 0 | binary | 0 | blksize| 0 |  1432  | 0 |
  80.       +-------+--------+---+--------+---+--------+---+--------+---+
  81.  
  82.    is a Read Request, for the file named "foobar", in binary transfer
  83.    mode, with a block size of 1432 bytes (Ethernet MTU, less the UDP and
  84.    IP header lengths).
  85.  
  86.    If the server is willing to accept the blocksize option, it sends an
  87.    Option Acknowledgment (OACK) to the client.  The specified value must
  88.    be less than or equal to the value specified by the client.  The
  89.    client must then either use the size specified in the OACK, or send
  90.    an ERROR packet, with error code 8, to terminate the transfer.
  91.  
  92.    The rules for determining the final packet are unchanged from [1].
  93.    The reception of a data packet with a data length less than the
  94.    negotiated blocksize is the final packet.  If the blocksize is
  95.    greater than the size of the packet, the first packet is the final
  96.    packet.  If amount of data to be transfered is an integral multiple
  97.    of the blocksize, an extra data packet containing no data is sent to
  98.    end the transfer.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Malkin & Harkin                                                 [Page 2]
  115.  
  116. RFC 1783                 TFTP Blocksize Option                March 1995
  117.  
  118.  
  119. Proof of Concept
  120.  
  121.    Performance tests were run on the prototype implementation using a
  122.    variety of block sizes.  The tests were run on a lightly loaded
  123.    Ethernet, between two HP-UX 9000, in "octet" mode, on 2.25MB files.
  124.    The average (5x) transfer times for paths with (g-time) and without
  125.    (n-time) a intermediate gateway are graphed as follows:
  126.  
  127.            |
  128.         37 +      g
  129.            |
  130.         35 +
  131.            |
  132.         33 +
  133.            |
  134.         31 +
  135.            |
  136.         29 +
  137.            |
  138.         27 +
  139.            |             g              blocksize   n-time   g-time
  140.         25 +                            ---------   ------   ------
  141.       s    |       n                      512       23.85    37.05
  142.       e 23 +                g            1024       16.15    25.65
  143.       c    |                             1432       13.70    23.10
  144.       o 21 +                             2048       10.90    16.90
  145.       n    |                             4096        6.85     9.65
  146.       d 19 +                             8192        4.90     6.15
  147.       s    |
  148.         17 +                    g
  149.            |             n
  150.         15 +
  151.            |                n
  152.         13 +
  153.            |
  154.         11 +                    n
  155.            |                           g
  156.          9 +
  157.            |
  158.          7 +                           n
  159.            |                                  g
  160.          5 +                                  n
  161.            "
  162.          0 +------+------+--+---+------+------+---
  163.                  512    1K  |  2K     4K     8K
  164.                           1432
  165.                     blocksize (bytes)
  166.  
  167.  
  168.  
  169.  
  170. Malkin & Harkin                                                 [Page 3]
  171.  
  172. RFC 1783                 TFTP Blocksize Option                March 1995
  173.  
  174.  
  175.    The comparisons between transfer times (without a gateway) between
  176.    the standard 512-byte blocksize and the negotiated blocksizes are:
  177.  
  178.       1024     2x   -32%
  179.       1432   2.8x   -42%
  180.       2048     4x   -54%
  181.       4096     8x   -71%
  182.       8192    16x   -80%
  183.  
  184.    As was anticipated, the transfer time decreases with an increase in
  185.    blocksize.  The reason for the reduction in time is the reduction in
  186.    the number of packets sent.  For example, by increasing the blocksize
  187.    from 512 bytes to 1024 bytes, not only are the number of data packets
  188.    halved, but the number of acknowledgement packets is also halved
  189.    (along with the number of times the data transmitter must wait for an
  190.    ACK).  A secondary effect is the efficiency gained by reducing the
  191.    per-packet framing and processing overhead.
  192.  
  193.    Of course, if the blocksize exceeds the path MTU, IP fragmentation
  194.    and reassembly will begin to add more overhead.  This will be more
  195.    noticable the greater the number of gateways in the path.
  196.  
  197. Security Considerations
  198.  
  199.    Security issues are not discussed in this memo.
  200.  
  201. References
  202.  
  203.    [1] Sollins, K., "The TFTP Protocol (Revision 2)", STD 33, RFC 1350,
  204.        MIT, July 1992.
  205.  
  206.    [2] Malkin, G., and A. Harkin, "TFTP Option Extension", RFC 1782,
  207.        Xylogics, Inc., Hewlett Packard Co., March 1995.
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Malkin & Harkin                                                 [Page 4]
  227.  
  228. RFC 1783                 TFTP Blocksize Option                March 1995
  229.  
  230.  
  231. Authors' Addresses
  232.  
  233.        Gary Scott Malkin
  234.        Xylogics, Inc.
  235.        53 Third Avenue
  236.        Burlington, MA  01803
  237.  
  238.        Phone:  (617) 272-8140
  239.        EMail:  gmalkin@xylogics.com
  240.  
  241.  
  242.        Art Harkin
  243.        Internet Services Project
  244.        Information Networks Division
  245.        19420 Homestead Road MS 43LN
  246.        Cupertino, CA  95014
  247.  
  248.        Phone: (408) 447-3755
  249.        EMail: ash@cup.hp.com
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Malkin & Harkin                                                 [Page 5]
  283.  
  284.