Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

292 lines
12 KiB

  1. ftp://ds.internic.net/rfc/rfc2090.txt
  2. Network Working Group A. Emberson
  3. Request for Comments: 2090 Lanworks Technologies Inc.
  4. Category: Experimental February 1997
  5. TFTP Multicast Option
  6. Status of this Memo
  7. This memo defines an Experimental Protocol for the Internet
  8. community. This memo does not specify an Internet standard of any
  9. kind. Discussion and suggestions for improvement are requested.
  10. Distribution of this memo is unlimited.
  11. Abstract
  12. The Trivial File Transfer Protocol [1] is a simple, lock-step, file
  13. transfer protocol which allows a client to get or put a file onto a
  14. remote host.
  15. This document describes a new TFTP option. This new option will allow
  16. the multiple clients to receive the same file concurrently through
  17. the use of Multicast packets. The TFTP Option Extension mechanism is
  18. described in [2].
  19. Often when similar computers are booting remotely they will each
  20. download the same image file. By adding multicast into the TFTP
  21. option set, two or more computers can download a file
  22. concurrently, thus increasing network efficiency.
  23. This document assumes that the reader is familiar with the
  24. terminology and notation of both [1] and [2].
  25. Multicast Option Specification
  26. The TFTP Read Request packet is modified to include the multicast
  27. option as follows:
  28. +--------+----~~----+---+--~~--+---+-----------+---+---+
  29. | opc=1 | filename | 0 | mode | 0 | multicast | 0 | 0 |
  30. +--------+----~~----+---+--~~--+---+-----------+---+---+
  31. opc
  32. The opcode field contains a 1, for Read Requests, as defined
  33. in [1].
  34. Emberson Experimental [Page 1]
  35. RFC 2090 TFTP Multicast Option February 1997
  36. filename
  37. The name of the file to be read, as defined in [1]. This is a
  38. NULL-terminated field.
  39. mode
  40. The mode of the file transfer: "netascii", "octet", or
  41. "mail", as defined in [1]. This is a NULL-terminated field.
  42. multicast
  43. Request for multicast transmission of the file option,
  44. "multicast" (case insensitive). This is a NULL-terminated
  45. field. The value for this option request is a string of zero
  46. length.
  47. If the server is willing to accept the multicast option, it
  48. sends an Option Acknowledgment (OACK) to the client including
  49. the multicast option, as defined in [2]. The OACK to the client
  50. will specify the multicast address and flag to indicate whether
  51. that client should send block acknowledgments (ACK).
  52. +-------+-----------+---+-------~~-------+---+
  53. | opc | multicast | 0 | addr, port, mc | 0 |
  54. +-------+-----------+---+-------~~-------+---+
  55. opc
  56. The opcode field contains the number 6, for Option
  57. Acknowledgment, as defined in [2].
  58. multicast
  59. Acknowledges the multicast option. This is a NULL-terminated
  60. field.
  61. addr
  62. The addr field contains the multicast IP address. This field
  63. is terminated with a comma.
  64. port
  65. The port field contains the destination port of the multicast
  66. packets. The use of Registered Port number 1758 (tftp-mcast)
  67. is recommended. This field is terminated with a comma.
  68. mc
  69. This field will be either 0 or 1, to tell the client whether
  70. it is the master client, that is, it is responsible for
  71. sending ACKs to the server. This is NULL-terminated field.
  72. Emberson Experimental [Page 2]
  73. RFC 2090 TFTP Multicast Option February 1997
  74. Data Transfer
  75. After the OACK is received by the client it will send an ACK for
  76. packet zero, as in [2]. With the multicast option being accepted this
  77. ACK will indicate to the server that the client wants the first
  78. packet. In other words the ACKs may now be seen as a request for the
  79. n+1th block of data. This enables each a client to request any block
  80. within the file that it may be missing.
  81. To manage the data transfer the server will maintain a list of
  82. clients. Typically the oldest client on the list, from here on
  83. referred to as the Master Client, will be responsible for sending
  84. ACKs. When the master client is finished, the server will send
  85. another OACK to the next oldest client, telling it to start sending
  86. ACKs. Upon receipt of this OACK the new master client will send an
  87. ACK for the block immediately before the first block required to
  88. complete its download.
  89. Any subsequent clients can start receiving blocks of a file during a
  90. transfer and then request any missing blocks when that client becomes
  91. the master client. When the current master client is finished, the
  92. server will notify the next client with an OACK making it the new
  93. master client. The new master client can start requesting missed
  94. packets. Each client must terminate the transfer by sending an
  95. acknowledgment of the last packet or by sending an error message to
  96. server. This termination can occur even if the client is not the
  97. master client.
  98. Any subsequent OACKs to a client may have an empty multicast address
  99. and port fields, since this information will already be held by that
  100. client. In the event a client fails to respond in a timely manner to
  101. a OACK enabling it as the master client, the server shall select the
  102. next oldest client to be the master client. The server shall
  103. reattempt to send a OACK to the non- responding client when the new
  104. master client is finished. The server may cease communication with a
  105. client after a reasonable number of attempts.
  106. Each transfer will be given a multicast address for use to distribute
  107. the data packets. Since there can be multiple servers on a given
  108. network or a limited number of addresses available to a given server,
  109. it is possible that their might be more than one transfer using a
  110. multicast address. To ensure that a client only accepts the correct
  111. packets, each transfer must use a unique port on the server. The
  112. source IP address and port number will identify the data packets for
  113. the transfer. Thus the server must send the unicast OACK packet to
  114. the client using the same port as will be used for sending the
  115. multicast data packets.
  116. Emberson Experimental [Page 3]
  117. RFC 2090 TFTP Multicast Option February 1997
  118. At any point if a client, other than the master client, sends a ACK
  119. to the server, the server will respond with another OACK with the mc
  120. field holding a value of zero. If this client persists in sending
  121. erroneous ACKs, the server may send an error packet to the client,
  122. discontinuing the file transfer for that client.
  123. The server may also send unicast packets to a lone client to reduce
  124. adverse effects on other machines. As it is possible that machines
  125. may be forced to process many extraneous multicast packets when
  126. attempting to receive a single multicast address.
  127. Example
  128. clients server message
  129. ------------------------------------------------------------
  130. 1 C1 |1|afile|0|octet|0|multicast|0|0| -> RRQ
  131. 2 C1 <- |6|multicast|224.100.100.100,1758,1| OACK
  132. 3 C1 |4|0| -> ACK
  133. 4 M <- |3|1|1| 512 octets of data| DATA
  134. 5 C1 |4|1| -> ACK
  135. 6 M <- |3|2|1| 512 octets of data| DATA
  136. 7 C2 |1|afile|0|octet|0|multicast|0|0| -> RRQ
  137. 8 C2 <- |6|multicast|224.100.100.100,1758,0| OACK
  138. 9 C2 |4|0| -> ACK
  139. 10 C1 |4|2| -> ACK
  140. 11 M <- |3|3|1| 512 octets of data| DATA
  141. 12 C3 |1|afile|0|octet|0|multicast|0|0| -> RRQ
  142. 13 C3 <- |6|multicast|224.100.100.100,1758,0| OACK
  143. 14 C1 |4|3| -> ACK
  144. 15 C2 |4|0| -> ACK
  145. 16 M (except C2) <- |3|4|1| 512 octets of data| DATA
  146. 17 C1 |4|4| -> ACK
  147. 18 M <- |3|5|1| 512 octets of data| DATA
  148. 19 C1 |4|5| -> ACK
  149. 20 M <- |3|6|1| 100 octets of data| DATA
  150. 21 C1 |4|6| -> ACK
  151. 22 C2 <- |6|multicast|,,1| OACK
  152. 23 C2 |4|0| -> ACK
  153. 24 M <- |3|1|1| 512 octets of data| DATA
  154. 25 C2 |4|1| -> ACK
  155. 26 M <- |3|2|1| 512 octets of data| DATA
  156. 27 C2 |4|3| -> ACK
  157. 28 M <- |3|4|1| 512 octets of data| DATA
  158. 29 C2 |4|6| -> ACK
  159. 30 C3 <- |6|multicast|,,1| OACK
  160. 31 C3 |4|2| -> ACK
  161. 32 M <- |3|3|1| 512 octets of data| DATA
  162. 33 C3 |4|6| -> ACK
  163. Emberson Experimental [Page 4]
  164. RFC 2090 TFTP Multicast Option February 1997
  165. Comments:
  166. 1 request from client 1
  167. 2 option acknowledgment
  168. 3 acknowledgment for option acknowledgment,
  169. or request for first block of data
  170. 4 first data packet sent to the multicast address
  171. 7 request from client 2
  172. 8 option acknowledgment to client 2,
  173. send no acknowledgments
  174. 9 OACK acknowledgment from client 2
  175. 15 OACK acknowledgment from client 3
  176. 16 client 2 fails to receive a packet
  177. 21 client 1 acknowledges receipt of the last block,
  178. telling the server it is done
  179. 23 option acknowledgment to client 2,
  180. now the master client
  181. 25 client 2 acknowledging with request for first block
  182. 27 client 2 acknowledges with request for missed block
  183. 29 client 2 signals it is finished
  184. 31 client 3 is master client and asks for missing blocks
  185. 33 client 3 signals it is finished
  186. Conclusion
  187. With the use of the multicast and blocksize[3] options TFTP will be
  188. capable of fast and efficient downloads of data. Using TFTP with the
  189. multicast option will maintain backward compatibility for both
  190. clients and servers.
  191. Security Considerations
  192. Security issues are not discussed in this memo.
  193. References
  194. [1] Sollins, K., "The TFTP Protocol (Revision 2)", STD 33, RFC
  195. 1350, MIT, July 1992.
  196. [2] Malkin, G., and A. Harkin, "TFTP Option Extension", RFC
  197. 1782, Xylogics, Inc., Hewlett Packard Co., March 1995.
  198. [3] Malkin, G., and A. Harkin, "TFTP Blocksize Option", RFC
  199. 1783, Xylogics, Inc., Hewlett Packard Co., March 1995.
  200. Emberson Experimental [Page 5]
  201. RFC 2090 TFTP Multicast Option February 1997
  202. Author's Address
  203. A. Thomas Emberson
  204. Lanworks Technologies, Inc.
  205. 2425 Skymark Avenue
  206. Mississauga, Ontario
  207. Canada L4W 4Y6
  208. Phone: (905) 238-5528
  209. EMail: [email protected]
  210. Emberson Experimental [Page 6]