1a2df389fSHajimu UMEMOTO.\" Copyright (c) 1990, 1993, 1994 29b50d902SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 39b50d902SRodney W. Grimes.\" 49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions 69b50d902SRodney W. Grimes.\" are met: 79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 89b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 109b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 119b50d902SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 129b50d902SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 139b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 149b50d902SRodney W. Grimes.\" without specific prior written permission. 159b50d902SRodney W. Grimes.\" 169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 199b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 269b50d902SRodney W. Grimes.\" SUCH DAMAGE. 279b50d902SRodney W. Grimes.\" 289b50d902SRodney W. Grimes.\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 29c3aac50fSPeter Wemm.\" $FreeBSD$ 309b50d902SRodney W. Grimes.\" 31b68628c8SCraig Rodrigues.Dd June 22, 2011 329b50d902SRodney W. Grimes.Dt TFTP 1 3362500372SRuslan Ermilov.Os 349b50d902SRodney W. Grimes.Sh NAME 359b50d902SRodney W. Grimes.Nm tftp 36752fa694SWarner Losh.Nd trivial file transfer program 379b50d902SRodney W. Grimes.Sh SYNOPSIS 38fd129a02SPhilippe Charnier.Nm 39891ca8cfSSimon L. B. Nielsen.Op Ar host Op Ar port 409b50d902SRodney W. Grimes.Sh DESCRIPTION 41e8937ba0SPhilippe CharnierThe 42e8937ba0SPhilippe Charnier.Nm 43e8937ba0SPhilippe Charnierutility is the user interface to the Internet 449b50d902SRodney W. Grimes.Tn TFTP 459b50d902SRodney W. Grimes(Trivial File Transfer Protocol), 469b50d902SRodney W. Grimeswhich allows users to transfer files to and from a remote machine. 479b50d902SRodney W. GrimesThe remote 489b50d902SRodney W. Grimes.Ar host 499b50d902SRodney W. Grimesmay be specified on the command line, in which case 50fd129a02SPhilippe Charnier.Nm 519b50d902SRodney W. Grimesuses 529b50d902SRodney W. Grimes.Ar host 539b50d902SRodney W. Grimesas the default host for future transfers (see the 54752fa694SWarner Losh.Cm connect 559b50d902SRodney W. Grimescommand below). 569b50d902SRodney W. Grimes.Sh COMMANDS 579b50d902SRodney W. GrimesOnce 58fd129a02SPhilippe Charnier.Nm 599b50d902SRodney W. Grimesis running, it issues the prompt 60752fa694SWarner Losh.Dq Li tftp> 619b50d902SRodney W. Grimesand recognizes the following commands: 629b50d902SRodney W. Grimes.Pp 63752fa694SWarner Losh.Bl -tag -width verbose -compact 64752fa694SWarner Losh.It Cm \&? Ar command-name ... 659b50d902SRodney W. GrimesPrint help information. 669b50d902SRodney W. Grimes.Pp 67752fa694SWarner Losh.It Cm ascii 68752fa694SWarner LoshShorthand for "mode ascii" 699b50d902SRodney W. Grimes.Pp 70752fa694SWarner Losh.It Cm binary 71752fa694SWarner LoshShorthand for "mode binary" 729b50d902SRodney W. Grimes.Pp 73b68628c8SCraig Rodrigues.It Cm blocksize Ar [size] 74b68628c8SCraig RodriguesSets the TFTP blksize option in TFTP Read Request or Write Request packets 75b68628c8SCraig Rodriguesto 76b68628c8SCraig Rodrigues.Ar [size] 77b68628c8SCraig Rodriguesas specified in RFC 2348. Valid values are between 8 and 65464. 78b68628c8SCraig RodriguesIf no blocksize is specified, then by default a blocksize of 512 bytes 79b68628c8SCraig Rodrigueswill be used. 80b68628c8SCraig Rodrigues.Pp 81b68628c8SCraig Rodrigues.It Cm blocksize2 Ar [size] 82b68628c8SCraig RodriguesSets the TFTP blksize2 option in TFTP Read Request or Write Request packets 83b68628c8SCraig Rodriguesto 84b68628c8SCraig Rodrigues.Ar [size] . 85b68628c8SCraig RodriguesValues are restricted to powers of 2 between 8 and 32768. This is a 86b68628c8SCraig Rodriguesnon-standard TFTP option. 87b68628c8SCraig Rodrigues.Pp 88752fa694SWarner Losh.It Cm connect Ar host Op Ar port 899b50d902SRodney W. GrimesSet the 909b50d902SRodney W. Grimes.Ar host 919b50d902SRodney W. Grimes(and optionally 929b50d902SRodney W. Grimes.Ar port ) 939b50d902SRodney W. Grimesfor transfers. 949b50d902SRodney W. GrimesNote that the 959b50d902SRodney W. Grimes.Tn TFTP 969b50d902SRodney W. Grimesprotocol, unlike the 979b50d902SRodney W. Grimes.Tn FTP 989b50d902SRodney W. Grimesprotocol, 999b50d902SRodney W. Grimesdoes not maintain connections between transfers; thus, the 100752fa694SWarner Losh.Cm connect 1019b50d902SRodney W. Grimescommand does not actually create a connection, 1029b50d902SRodney W. Grimesbut merely remembers what host is to be used for transfers. 1039b50d902SRodney W. GrimesYou do not have to use the 104752fa694SWarner Losh.Cm connect 1059b50d902SRodney W. Grimescommand; the remote host can be specified as part of the 106752fa694SWarner Losh.Cm get 1079b50d902SRodney W. Grimesor 108752fa694SWarner Losh.Cm put 1099b50d902SRodney W. Grimescommands. 1109b50d902SRodney W. Grimes.Pp 111b68628c8SCraig Rodrigues.It Cm debug Ar level 112b68628c8SCraig RodriguesEnable or disable debugging levels during verbose output. The value of 113b68628c8SCraig Rodrigues.Ar level 114b68628c8SCraig Rodriguescan be one of 115b68628c8SCraig Rodrigues.Cm packet, simple, options, 116b68628c8SCraig Rodriguesor 117b68628c8SCraig Rodrigues.Cm access. 118b68628c8SCraig Rodrigues.Pp 119752fa694SWarner Losh.It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname 120752fa694SWarner Losh.It Cm get Xo 121d7b64526SSimon L. B. Nielsen.Oo Ar host1 : Oc Ns Ar file1 122d7b64526SSimon L. B. Nielsen.Oo Ar host2 : Oc Ns Ar file2 ... 123d7b64526SSimon L. B. Nielsen.Oo Ar hostN : Oc Ns Ar fileN 124d7b64526SSimon L. B. Nielsen.Xc 125d7b64526SSimon L. B. NielsenGet one or more files from the remote host. 126d7b64526SSimon L. B. NielsenWhen using the 127d7b64526SSimon L. B. Nielsen.Ar host 128d7b64526SSimon L. B. Nielsenargument, the 129d7b64526SSimon L. B. Nielsen.Ar host 130d7b64526SSimon L. B. Nielsenwill be used as default host for future transfers. 131d7b64526SSimon L. B. NielsenIf 132d7b64526SSimon L. B. Nielsen.Ar localname 133d7b64526SSimon L. B. Nielsenis specified, the file is stored locally as 134d7b64526SSimon L. B. Nielsen.Ar localname , 135d7b64526SSimon L. B. Nielsenotherwise the original filename is used. 136d7b64526SSimon L. B. NielsenNote that it is not possible to download two files at a time, only 137d7b64526SSimon L. B. Nielsenone, three, or more than three files, at a time. 138d7b64526SSimon L. B. Nielsen.Pp 139d7b64526SSimon L. B. NielsenTo specify an IPv6 numeric address for a host, wrap it using square 140d7b64526SSimon L. B. Nielsenbrackets like 141d7b64526SSimon L. B. Nielsen.Dq Li [3ffe:2900:e00c:ffee::1234] : Ns Ar file 142d7b64526SSimon L. B. Nielsento disambiguate the 143d7b64526SSimon L. B. Nielsencolons used in the IPv6 address from the colon separating the host and 144d7b64526SSimon L. B. Nielsenthe filename. 1459b50d902SRodney W. Grimes.Pp 146752fa694SWarner Losh.It Cm mode Ar transfer-mode 1479b50d902SRodney W. GrimesSet the mode for transfers; 1489b50d902SRodney W. Grimes.Ar transfer-mode 1499b50d902SRodney W. Grimesmay be one of 150752fa694SWarner Losh.Em ascii 1519b50d902SRodney W. Grimesor 152752fa694SWarner Losh.Em binary . 1539b50d902SRodney W. GrimesThe default is 154752fa694SWarner Losh.Em ascii . 1559b50d902SRodney W. Grimes.Pp 156b68628c8SCraig Rodrigues.It Cm packetdrop [arg] 157b68628c8SCraig RodriguesRandomly drop 158b68628c8SCraig Rodrigues.Ar arg 159b68628c8SCraig Rodriguesout of 100 packets during a transfer. This is a debugging feature. 160b68628c8SCraig Rodrigues.Pp 161752fa694SWarner Losh.It Cm put Ar file Op Oo Ar host : Oc Ns Ar remotename 162752fa694SWarner Losh.It Cm put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory 163d7b64526SSimon L. B. NielsenPut a file or set of files to the remote host. 164d7b64526SSimon L. B. NielsenWhen 165d7b64526SSimon L. B. Nielsen.Ar remotename 166d7b64526SSimon L. B. Nielsenis specified, the file is stored remotely as 167d7b64526SSimon L. B. Nielsen.Ar remotename , 168d7b64526SSimon L. B. Nielsenotherwise the original filename is used. 169d7b64526SSimon L. B. NielsenIf the 170d7b64526SSimon L. B. Nielsen.Ar remote-directory 171d7b64526SSimon L. B. Nielsenargument is used, the remote host is assumed to be a 17206e482e6SRuslan Ermilov.Ux 1739b50d902SRodney W. Grimesmachine. 174d7b64526SSimon L. B. NielsenTo specify an IPv6 numeric address for a 175d7b64526SSimon L. B. Nielsen.Ar host , 176d7b64526SSimon L. B. Nielsensee the example under the 177752fa694SWarner Losh.Cm get 178d7b64526SSimon L. B. Nielsencommand. 1799b50d902SRodney W. Grimes.Pp 180b68628c8SCraig Rodrigues.It Cm options Ar [arg] 181b68628c8SCraig RodriguesEnable or disable support for TFTP options. The valid values of 182b68628c8SCraig Rodrigues.Ar arg 183b68628c8SCraig Rodriguesare 184b68628c8SCraig Rodrigues.Cm on 185b68628c8SCraig Rodrigues(enable RFC 2347 options), 186b68628c8SCraig Rodrigues.Cm off 187b68628c8SCraig Rodrigues(disable RFC 2347 options), and 188b68628c8SCraig Rodrigues.Cm extra 189b68628c8SCraig Rodrigues(toggle support for non-RFC defined options). 190b68628c8SCraig Rodrigues.Pp 191752fa694SWarner Losh.It Cm quit 1929b50d902SRodney W. GrimesExit 1938fe908efSRuslan Ermilov.Nm . 1949b50d902SRodney W. GrimesAn end of file also exits. 1959b50d902SRodney W. Grimes.Pp 196752fa694SWarner Losh.It Cm rexmt Ar retransmission-timeout 1979b50d902SRodney W. GrimesSet the per-packet retransmission timeout, in seconds. 1989b50d902SRodney W. Grimes.Pp 199b68628c8SCraig Rodrigues.It Cm rollover [arg] 200b68628c8SCraig RodriguesSpecify the rollover option in TFTP Read Request or Write 201b68628c8SCraig RodriguesRequest packets. After 65535 packets have been transmitted, set the block 202b68628c8SCraig Rodriguescounter to 203b68628c8SCraig Rodrigues.Ar arg . 204b68628c8SCraig RodriguesValid values of 205b68628c8SCraig Rodrigues.Ar arg 206b68628c8SCraig Rodriguesare 0 and 1. This is a non-standard TFTP option. 207b68628c8SCraig Rodrigues.Pp 208752fa694SWarner Losh.It Cm status 2099b50d902SRodney W. GrimesShow current status. 2109b50d902SRodney W. Grimes.Pp 211752fa694SWarner Losh.It Cm timeout Ar total-transmission-timeout 2129b50d902SRodney W. GrimesSet the total transmission timeout, in seconds. 2139b50d902SRodney W. Grimes.Pp 214752fa694SWarner Losh.It Cm trace 2159b50d902SRodney W. GrimesToggle packet tracing. 2169b50d902SRodney W. Grimes.Pp 217752fa694SWarner Losh.It Cm verbose 2189b50d902SRodney W. GrimesToggle verbose mode. 2199b50d902SRodney W. Grimes.El 220fcaab598SCraig Rodrigues.Sh SEE ALSO 221*f6c506d9SCraig Rodrigues.Xr tftpd 8 222fcaab598SCraig Rodrigues.Pp 223fcaab598SCraig RodriguesThe following RFC's are supported: 224fcaab598SCraig Rodrigues.Rs 225fcaab598SCraig RodriguesRFC 1350 226fcaab598SCraig Rodrigues.%T The TFTP Protocol (Revision 2) 227fcaab598SCraig Rodrigues.Re 228fcaab598SCraig Rodrigues.Rs 229fcaab598SCraig RodriguesRFC 2347 230fcaab598SCraig Rodrigues.%T TFTP Option Extension 231fcaab598SCraig Rodrigues.Re 232fcaab598SCraig Rodrigues.Rs 233fcaab598SCraig RodriguesRFC 2348 234fcaab598SCraig Rodrigues.%T TFTP Blocksize Option 235fcaab598SCraig Rodrigues.Re 236fcaab598SCraig Rodrigues.Rs 237fcaab598SCraig RodriguesRFC 2349 238fcaab598SCraig Rodrigues.%T TFTP Timeout Interval and Transfer Size Options 239fcaab598SCraig Rodrigues.Re 240fcaab598SCraig Rodrigues.Rs 241fcaab598SCraig RodriguesRFC 3617 242fcaab598SCraig Rodrigues.%T Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) 243fcaab598SCraig Rodrigues.Re 244fcaab598SCraig Rodrigues.Pp 245fcaab598SCraig RodriguesThe non-standard 246fcaab598SCraig Rodrigues.Cm rollover 247fcaab598SCraig Rodriguesand 248fcaab598SCraig Rodrigues.Cm blksize2 249fcaab598SCraig RodriguesTFTP options are mentioned here: 250fcaab598SCraig Rodrigues.Rs 251fcaab598SCraig Rodrigues.%T Extending TFTP 252fcaab598SCraig Rodrigues.%U http://www.compuphase.com/tftp.htm 253fcaab598SCraig Rodrigues.Re 2546c7216dfSRuslan Ermilov.Sh HISTORY 2556c7216dfSRuslan ErmilovThe 2566c7216dfSRuslan Ermilov.Nm 2576c7216dfSRuslan Ermilovcommand appeared in 2586c7216dfSRuslan Ermilov.Bx 4.3 . 259*f6c506d9SCraig Rodrigues.Pp 260*f6c506d9SCraig RodriguesEdwin Groothuis <edwin@FreeBSD.org> performed a major rewrite of the 261*f6c506d9SCraig Rodrigues.Xr tftpd 8 262*f6c506d9SCraig Rodriguesand 263*f6c506d9SCraig Rodrigues.Nm 264*f6c506d9SCraig Rodriguescode to support RFC2348. 265e5660633SCraig Rodrigues.Sh NOTES 2669b50d902SRodney W. GrimesBecause there is no user-login or validation within 2679b50d902SRodney W. Grimesthe 2689b50d902SRodney W. Grimes.Tn TFTP 2699b50d902SRodney W. Grimesprotocol, the remote site will probably have some 2706a3e8b0aSRuslan Ermilovsort of file-access restrictions in place. 2716a3e8b0aSRuslan ErmilovThe 2729b50d902SRodney W. Grimesexact methods are specific to each site and therefore 2739b50d902SRodney W. Grimesdifficult to document here. 27467034ac6SJeroen Ruigrok van der Werven.Pp 27567034ac6SJeroen Ruigrok van der WervenFiles larger than 33488896 octets (65535 blocks) cannot be transferred 276e5660633SCraig Rodrigueswithout client and server supporting the TFTP blocksize option (RFC2348), 277e5660633SCraig Rodriguesor the non-standard TFTP rollover option. 278