world leader in high performance signal processing
Trace:

Differences

This shows you the differences between two versions of the page.

setting_up_a_tftp_server [2009/01/21 13:36]
rgetz update url
setting_up_a_tftp_server [2009/08/26 16:17] (current)
rgetz add blocksize info
Line 3: Line 3:
  
 <note important>Before a host (either Linux or Windows) can be used as a tftp server, whatever firewall you may be running must be set to allow the host to accept traffic on port 69. It will not work if port 69 is blocked.</note> <note important>Before a host (either Linux or Windows) can be used as a tftp server, whatever firewall you may be running must be set to allow the host to accept traffic on port 69. It will not work if port 69 is blocked.</note>
 +
 +==== Optimizing your tftp server ====
 +
 +TFTP supports an optional ''Blocksize'' option. (see [[http://www.faqs.org/rfcs/rfc2348.html|RFC 2348]]. This can help decrease download times on slow networks. To see how much, and experiment was run  to measure tftp throughput on a slow network (U-Boot client running in USA, tftp server in Germany).
 +
 +^  tftpblocksize    ^^  download   ^
 +^ (bytes)^           ^  (ms)     ^
 +|    512 |  default  | 48,246  |
 +|   1468 | ( 1MTU)   | 17,243  |
 +|   2948 | ( 2MTU)   |  8,912  |
 +|   4428 | ( 3MTU)   |  6,167  |
 +|   5908 | ( 4MTU)   |  4,840  |
 +|   7388 | ( 5MTU)   |  4,042  |
 +|   8868 | ( 6MTU)   |  3,425  |
 +|  10348 | ( 7MTU)   |  2,974  |
 +|  11828 | ( 8MTU)   |  2,736  |
 +|  13308 | ( 9MTU)   |  2,508  |
 +|  14788 | (10MTU)   |  2,281  |
 +|  16268 | (11MTU)   |  2,174  |
 +
 + So, that is 48-seconds (default, if your tftp server does not support RFC 2348), to either 17 (1 max packet size), or 2 seconds, if your U-Boot supports packet re-assembly or defragmentation. 
 +
 +However, it appears that some tftp servers (the older BSD version, Debian's "tftpd") doesn't support RFC 2348 (blksize), and always use a block size of 512, causing the traffic to slow down. :( You need to make sure that you install the the Peter Anvin version, which does  support RFC 2348, and blksize up to 65,464 bytes (Debian's "tftpd-hpa"). This can be found on this [[http://www.kernel.org/pub/software/network/tftp/|Web site]].
 + 
 +How to tell which you have? Check your man page: "''man tftpd''" or ask for the version:
 + 
 +Peter Anvin version:
 +<xterm> rgetz@imhotep:~> **/usr/sbin/in.tftpd -V**
 +tftp-hpa 0.48, with remap, with tcpwrappers
 +rgetz@imhotep:~>
 +</xterm>
 + 
 +non-RFC 2348 one:
 +<xterm>rgetz@imhotep:~> **/usr/sbin/in.tftpd -V**
 +rgetz@imhotep:~>
 +</xterm>
 + 
 +Even when using the Peter Anvin version, block size can still be reduced via two methods:
 +  ; ''-B'' : limits the maximum permitted block size (''-B 512'')
 +  ; ''-r'' : rejects RFC 2347 TFTP options (''-r blksize'')
 +Check your local ''/etc/xinetd.d/tftp'' or ''/etc/inetd.conf'' file to see how your tftpd server is being invoked.
  
 ===== System Specifics ===== ===== System Specifics =====
Line 8: Line 49:
 ====Debian Linux Instructions==== ====Debian Linux Instructions====
  
-  - Install tftpd and related packages.<code> +  - Install tftpd-hpa and related packages.<code> 
-$ sudo apt-get install xinetd tftpd tftp</code>+$ sudo apt-get install xinetd tftpd-hpa tftp</code>
   - Check you have things installed:<code>   - Check you have things installed:<code>
 user@machine:~ $ /usr/sbin/in.tftpd -V user@machine:~ $ /usr/sbin/in.tftpd -V