home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2348.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  9.6 KB  |  284 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          G. Malkin
  8. Request for Commments: 2348                                 Bay Networks
  9. Updates: 1350                                                  A. Harkin
  10. Obsoletes: 1783                                      Hewlett Packard Co.
  11. Category: Standards Track                                       May 1998
  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. Copyright Notice
  25.  
  26.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  27.  
  28. Abstract
  29.  
  30.    The Trivial File Transfer Protocol [1] is a simple, lock-step, file
  31.    transfer protocol which allows a client to get or put a file onto a
  32.    remote host.  One of its primary uses is the booting of diskless
  33.    nodes on a Local Area Network.  TFTP is used because it is very
  34.    simple to implement in a small node's limited ROM space.  However,
  35.    the choice of a 512-octet blocksize is not the most efficient for use
  36.    on a LAN whose MTU may 1500 octets or greater.
  37.  
  38.    This document describes a TFTP option which allows the client and
  39.    server to negotiate a blocksize more applicable to the network
  40.    medium.  The TFTP Option Extension mechanism is described in [2].
  41.  
  42. Blocksize Option Specification
  43.  
  44.    The TFTP Read Request or Write Request packet is modified to include
  45.    the blocksize option as follows.  Note that all fields except "opc"
  46.    are NULL-terminated.
  47.  
  48.       +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
  49.       |  opc  |filename| 0 |  mode  | 0 | blksize| 0 | #octets| 0 |
  50.       +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
  51.  
  52.       opc
  53.          The opcode field contains either a 1, for Read Requests, or 2,
  54.          for Write Requests, as defined in [1].
  55.  
  56.  
  57.  
  58. Malkin & Harkin             Standards Track                     [Page 1]
  59.  
  60. RFC 2348                 TFTP Blocksize Option                  May 1998
  61.  
  62.  
  63.       filename
  64.          The name of the file to be read or written, as defined in [1].
  65.  
  66.       mode
  67.          The mode of the file transfer: "netascii", "octet", or "mail",
  68.          as defined in [1].
  69.  
  70.       blksize
  71.          The Blocksize option, "blksize" (case in-sensitive).
  72.  
  73.       #octets
  74.          The number of octets in a block, specified in ASCII.  Valid
  75.          values range between "8" and "65464" octets, inclusive.  The
  76.          blocksize refers to the number of data octets; it does not
  77.          include the four octets of TFTP header.
  78.  
  79.    For example:
  80.  
  81.       +-------+--------+---+--------+---+--------+---+--------+---+
  82.       |   1   | foobar | 0 | octet  | 0 | blksize| 0 |  1428  | 0 |
  83.       +-------+--------+---+--------+---+--------+---+--------+---+
  84.  
  85.    is a Read Request, for the file named "foobar", in octet (binary)
  86.    transfer mode, with a block size of 1428 octets (Ethernet MTU, less
  87.    the TFTP, UDP and IP header lengths).
  88.  
  89.    If the server is willing to accept the blocksize option, it sends an
  90.    Option Acknowledgment (OACK) to the client.  The specified value must
  91.    be less than or equal to the value specified by the client.  The
  92.    client must then either use the size specified in the OACK, or send
  93.    an ERROR packet, with error code 8, to terminate the transfer.
  94.  
  95.    The rules for determining the final packet are unchanged from [1].
  96.    The reception of a data packet with a data length less than the
  97.    negotiated blocksize is the final packet.  If the blocksize is
  98.    greater than the amount of data to be transfered, the first packet is
  99.    the final packet.  If the amount of data to be transfered is an
  100.    integral multiple of the blocksize, an extra data packet containing
  101.    no data is sent to end the transfer.
  102.  
  103. Proof of Concept
  104.  
  105.    Performance tests were run on the prototype implementation using a
  106.    variety of block sizes.  The tests were run on a lightly loaded
  107.    Ethernet, between two HP-UX 9000, in "octet" mode, on 2.25MB files.
  108.    The average (5x) transfer times for paths with (g-time) and without
  109.    (n-time) a intermediate gateway are graphed as follows:
  110.  
  111.  
  112.  
  113.  
  114. Malkin & Harkin             Standards Track                     [Page 2]
  115.  
  116. RFC 2348                 TFTP Blocksize Option                  May 1998
  117.  
  118.  
  119.            |
  120.         37 +      g
  121.            |
  122.         35 +
  123.            |
  124.         33 +
  125.            |
  126.         31 +
  127.            |
  128.         29 +
  129.            |
  130.         27 +
  131.            |             g              blocksize   n-time   g-time
  132.         25 +                            ---------   ------   ------
  133.       s    |       n                      512       23.85    37.05
  134.       e 23 +                g            1024       16.15    25.65
  135.       c    |                             1428       13.70    23.10
  136.       o 21 +                             2048       10.90    16.90
  137.       n    |                             4096        6.85     9.65
  138.       d 19 +                             8192        4.90     6.15
  139.       s    |
  140.         17 +                    g
  141.            |             n
  142.         15 +
  143.            |                n
  144.         13 +
  145.            |
  146.         11 +                    n
  147.            |                           g
  148.          9 +
  149.            |
  150.          7 +                           n
  151.            |                                  g
  152.          5 +                                  n
  153.            "
  154.          0 +------+------+--+---+------+------+---
  155.                  512    1K  |  2K     4K     8K
  156.                           1428
  157.                     blocksize (octets)
  158.  
  159.    The comparisons between transfer times (without a gateway) between
  160.    the standard 512-octet blocksize and the negotiated blocksizes are:
  161.  
  162.       1024     2x   -32%
  163.       1428   2.8x   -42%
  164.       2048     4x   -54%
  165.       4096     8x   -71%
  166.       8192    16x   -80%
  167.  
  168.  
  169.  
  170. Malkin & Harkin             Standards Track                     [Page 3]
  171.  
  172. RFC 2348                 TFTP Blocksize Option                  May 1998
  173.  
  174.  
  175.    As was anticipated, the transfer time decreases with an increase in
  176.    blocksize.  The reason for the reduction in time is the reduction in
  177.    the number of packets sent.  For example, by increasing the blocksize
  178.    from 512 octets to 1024 octets, not only are the number of data
  179.    packets halved, but the number of acknowledgement packets is also
  180.    halved (along with the number of times the data transmitter must wait
  181.    for an ACK).  A secondary effect is the efficiency gained by reducing
  182.    the per-packet framing and processing overhead.
  183.  
  184.    Of course, if the blocksize exceeds the path MTU, IP fragmentation
  185.    and reassembly will begin to add more overhead.  This will be more
  186.    noticable the greater the number of gateways in the path.
  187.  
  188. Security Considerations
  189.  
  190.    The basic TFTP protocol has no security mechanism.  This is why it
  191.    has no rename, delete, or file overwrite capabilities.  This document
  192.    does not add any security to TFTP; however, the specified extensions
  193.    do not add any additional security risks.
  194.  
  195. References
  196.  
  197.    [1] Sollins, K., "The TFTP Protocol (Revision 2)", STD 33, RFC 1350,
  198.        October 1992.
  199.  
  200.    [2] Malkin, G., and A. Harkin, "TFTP Option Extension", RFC 2347,
  201.        May 1998.
  202.  
  203. Authors' Addresses
  204.  
  205.    Gary Scott Malkin
  206.    Bay Networks
  207.    8 Federal Street
  208.    Billerica, MA  10821
  209.  
  210.    Phone:  (978) 916-4237
  211.    EMail:  gmalkin@baynetworks.com
  212.  
  213.  
  214.    Art Harkin
  215.    Networked Computing Division
  216.    Hewlett-Packard Company
  217.    19420 Homestead Road MS 43LN
  218.    Cupertino, CA  95014
  219.  
  220.    Phone: (408) 447-3755
  221.    EMail: ash@cup.hp.com
  222.  
  223.  
  224.  
  225.  
  226. Malkin & Harkin             Standards Track                     [Page 4]
  227.  
  228. RFC 2348                 TFTP Blocksize Option                  May 1998
  229.  
  230.  
  231. Full Copyright Statement
  232.  
  233.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  234.  
  235.    This document and translations of it may be copied and furnished to
  236.    others, and derivative works that comment on or otherwise explain it
  237.    or assist in its implementation may be prepared, copied, published
  238.    and distributed, in whole or in part, without restriction of any
  239.    kind, provided that the above copyright notice and this paragraph are
  240.    included on all such copies and derivative works.  However, this
  241.    document itself may not be modified in any way, such as by removing
  242.    the copyright notice or references to the Internet Society or other
  243.    Internet organizations, except as needed for the purpose of
  244.    developing Internet standards in which case the procedures for
  245.    copyrights defined in the Internet Standards process must be
  246.    followed, or as required to translate it into languages other than
  247.    English.
  248.  
  249.    The limited permissions granted above are perpetual and will not be
  250.    revoked by the Internet Society or its successors or assigns.
  251.  
  252.    This document and the information contained herein is provided on an
  253.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  254.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  255.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  256.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  257.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  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             Standards Track                     [Page 5]
  283.  
  284.