INTERNET-DRAFT M. Johnston expires: 103-Dec-1 Intel Corporation 103-Jun-1 TFTP Big Block Number Option Definition draft-johnston-tftp-bigblk-00.txt Status of This Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at: http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at: http://www.ietf.org/shadow.html Copyright Notice Copyright (C) The Internet Society (2002). All rights reserved. Abstract This document describes a mechanism that can be used by TFTP and multicast TFTP (MTFTP) clients and servers to reliably transfer very large files without embedding additional alignment information into the data stream and without experiencing dropped connections when the Block Number field in the DATA/ACK packets rolls over to zero. M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 1] Internet Draft TFTP Big Block Number Option 103-Jun-1 Table of Contents Status of This Memo......................................1 Copyright Notice.........................................1 Abstract.................................................1 Table of Contents........................................2 1 Introduction..........................................3 2 Packet Information....................................3 2.1 TFTP OpCodes......................................3 2.2 Read Request (RRQ) and Write Request (WRQ)........3 2.3 Normal Block Number Data Packet (DATA)............4 2.4 Option Acknowledgement Packet (OACK)..............4 2.5 Normal Block Number Acknowledgement Packet (ACK)..4 2.6 Big Block Number Data Packet (DATA8)..............5 2.7 Big Block Number Acknowledgement Packet (ACK8)....5 2.8 Error Packet (ERROR)..............................5 3 Examples..............................................5 3.1 Server Does Not Have Option Extension Support.....5 3.2 Server Does Not Have Big Block Number Support.....6 3.3 Server Has Big Block Number Support...............6 4 Security Considerations...............................7 5 References............................................7 6 Author's Address......................................7 7 Full Copyright Statement..............................7 M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 2] Internet Draft TFTP Big Block Number Option 103-Jun-1 1 Introduction TFTP [1] does not clearly define how clients or servers should operate when the Block# field rolls over to zero. Some clients and servers have been observed to continue downloading until an end of session is reached (a short packet is received) and others have been observed to just drop the session when an out of sequence packet is perceived (the Block# of the next DATA packet is not equal to, or one greater than, the Block# of the previous ACK packet). Also, multicast TFTP clients cannot easily determine where the received DATA packets are to be stored if they cannot determine if the Block# field has rolled over to zero, especially if this happens more than once in a download session, unless additional information is embedded into a proprietary protocol within the data stream. This draft defines a new TFTP option [2] and new TFTP DATA8 and ACK8 packet opcodes and formats that can be used to transfer very large files (2^64-1 packets) without experiencing the issues described above. 2 Packet Information This section describes the TFTP packet types used by clients and servers implementing the Big Block Number option. Detailed information about the packet fields not covered in this document can be found in [1] and [2]. 2.1 TFTP OpCodes RRQ 1 [1] WRQ 2 [1] DATA 3 [1] ACK 4 [1] ERROR 5 [1] OACK 6 [2] DIR 7 [4] DATA8 8 (Data packet with Big Block Number.) ACK8 9 (Acknowledgement packet with Big Block Number.) 2.2 Read Request (RRQ) and Write Request (WRQ) 2-bytes string string string string M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 3] Internet Draft TFTP Big Block Number Option 103-Jun-1 -------------------------------------------------------------- | OpCode | Filename | 0 | Mode | 0 | Option | 0 | Value | 0 | -------------------------------------------------------------- To request a Big Block Number option transfer the client creates a RRQ/WRQ packet that includes the Big Block Number option string "bigblk#" and value string "8" appended to the RRQ/WRQ packet, as defined in [2]. Value strings other than "8" are undefined and must be treated as an option error [2] by the server. 2.3 Normal Block Number Data Packet (DATA) 2-bytes 2-bytes n-bytes ----------------------------- | OpCode | Block# | Data | ----------------------------- If the server does not support TFTP options, the Big Block Number option or it determines that the requested file is not large enough to benefit from big block numbers, it may respond to the RRQ packet with a DATA packet, as defined in [2]. 2.4 Option Acknowledgement Packet (OACK) 2-bytes string string ----------------------------------- | OpCode | Option | 0 | Value | 0 | ----------------------------------- If the server does not support the Big Block Number option or it determines that the requested file is not large enough to benefit from big block numbers, it may respond to the RRQ or WRQ packet with an OACK packet that does not contain the Big Block Number option and value strings. An empty OACK packet (one that does not contain any option or value strings) is valid. If the server does decide to use Big Block Numbers it must copy the option string from the client's RRQ/WRQ packet into the OACK packet, as defined in [2]. The value string in the OACK packet must be "8". Any other value string is undefined and must be treated as an option error [2] by the client. 2.5 Normal Block Number Acknowledgement Packet (ACK) M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 4] Internet Draft TFTP Big Block Number Option 103-Jun-1 2-bytes 2-bytes ------------------- | OpCode | Block# | ------------------- If the server does not support TFTP options or the Big Block Number option, it may respond to the WRQ packet with an ACK packet, as defined in [2]. 2.6 Big Block Number Data Packet (DATA8) 2-bytes 8-bytes n-bytes -------------------------------- | OpCode | BigBlock# | Data | -------------------------------- When using Big Block Numbers the client/server must send DATA8 packets. In these packets the Block# field is an eight byte Block# instead of a two byte Block#, as defined in [1]. 2.7 Big Block Number Acknowledgement Packet (ACK8) 2-bytes 8-bytes ---------------------- | OpCode | BigBlock# | ---------------------- The client/server must respond with an ACK8 packet for each DATA8 packet received to continue the transfer. 2.8 Error Packet (ERROR) 2-bytes 2-bytes string ----------------------------------- | OpCode | ErrorCode | Message | 0 | ----------------------------------- At any point during the transfer the client or server can abort by sending an ERROR packet. ErrorCodes are defined in [1] and [2]. 3 Examples 3.1 Server Does Not Have Option Extension Support M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 5] Internet Draft TFTP Big Block Number Option 103-Jun-1 In this example the client sends a RRQ with the Big Block Number option and the server responds with a DATA packet. The client decides to continue the transfer by responding with ACK packets. client server ----------------------------------------------------------- |1|foofile|0|octet|0|bigblk#|0|8|0| --> RRQ <-- |3|1| n octets of data | DATA |4|1| --> ACK <-- |3|2| n octets of data | DATA |4|2| --> ACK <-- |3|3| ACK 3.2 Server Does Not Have Big Block Number Support In this example the client sends a RRQ with the Big Block Number option and some other 'options'. The server replies with an OACK that does not contain the Big Block Number option. The client decides to continue the transfer by responding with ACK packets. client server ----------------------------------------------------------- |1|foofile|0|octet|0|bigblk#|0|8|0|options|0| --> RRQ <-- |6|options|0| OACK |4|0| --> ACK <-- |3|1| n octets of data | DATA |4|1| --> ACK <-- |3|2| n octets of data | DATA |4|2| --> ACK <-- |3|3| ACK 3.3 Server Has Big Block Number Support In this example the client sends a RRQ with the Big Block Number option and some other 'options'. The server replies with an OACK that does contain the Big Block Number option. The client responds to the OACK and DATA8 packets with ACK8 packets to continue the transfer. client server ----------------------------------------------------------- |1|foofile|0|octet|0|bigblk#|0|8|0|options|0| --> RRQ <-- |6|bigblk#|0|8|options|0| OACK |9|0| --> ACK8 <-- |8|1| n octets of data | DATA8 M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 6] Internet Draft TFTP Big Block Number Option 103-Jun-1 |9|1| --> ACK8 <-- |8|2| n octets of data | DATA8 |9|2| --> ACK8 <-- |8|3| ACK8 4 Security Considerations The basic TFTP protocol has no security mechanism. This is why it has no rename, delete, or file overwrite capabilities. This document does not add any security to TFTP; however, the specified extensions do not add any additional security risks. 5 References [1] The TFTP Protocol (Revision 2) RFC 783 [2] TFTP Option Extension RFC 2347 [3] TFTP Blocksize Option RFC 2348 [4] Extensible Firmware Interface Specification PXE BaseCode Protocol http://www.intel.com/technology/efi/index.htm 6 Author's Address Michael Johnston Intel Corporation MS. JF1-239 2111 NE 25th Ave. Hillsboro, OR 97124 Phone: +1 503-264-9703 Email: michael.johnston@intel.com 7 Full Copyright Statement Copyright (C) The Internet Society (2002). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 7] Internet Draft TFTP Big Block Number Option 103-Jun-1 or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY, THE INTERNET ENGINEERING TASK FORCE, THE AUTHOR AND THE AUTHOR'S EMPLOYER DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. M. Johnston draft-johnston-tftp-bigblk-00.txt [Page 8]