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. 12fbbd9655SWarner Losh.\" 3. 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.\" 31fdf929ffSJohn Baldwin.Dd March 2, 2020 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] 776d6d6c36SGordon Berglingas specified in RFC 2348. 786d6d6c36SGordon BerglingValid values are between 8 and 65464. 79b68628c8SCraig RodriguesIf no blocksize is specified, then by default a blocksize of 512 bytes 80b68628c8SCraig Rodrigueswill be used. 81b68628c8SCraig Rodrigues.Pp 82b68628c8SCraig Rodrigues.It Cm blocksize2 Ar [size] 83b68628c8SCraig RodriguesSets the TFTP blksize2 option in TFTP Read Request or Write Request packets 84b68628c8SCraig Rodriguesto 85b68628c8SCraig Rodrigues.Ar [size] . 866d6d6c36SGordon BerglingValues are restricted to powers of 2 between 8 and 32768. 876d6d6c36SGordon BerglingThis is a non-standard TFTP option. 88b68628c8SCraig Rodrigues.Pp 89752fa694SWarner Losh.It Cm connect Ar host Op Ar port 909b50d902SRodney W. GrimesSet the 919b50d902SRodney W. Grimes.Ar host 929b50d902SRodney W. Grimes(and optionally 939b50d902SRodney W. Grimes.Ar port ) 949b50d902SRodney W. Grimesfor transfers. 959b50d902SRodney W. GrimesNote that the 969b50d902SRodney W. Grimes.Tn TFTP 979b50d902SRodney W. Grimesprotocol, unlike the 989b50d902SRodney W. Grimes.Tn FTP 999b50d902SRodney W. Grimesprotocol, 1009b50d902SRodney W. Grimesdoes not maintain connections between transfers; thus, the 101752fa694SWarner Losh.Cm connect 1029b50d902SRodney W. Grimescommand does not actually create a connection, 1039b50d902SRodney W. Grimesbut merely remembers what host is to be used for transfers. 1049b50d902SRodney W. GrimesYou do not have to use the 105752fa694SWarner Losh.Cm connect 1069b50d902SRodney W. Grimescommand; the remote host can be specified as part of the 107752fa694SWarner Losh.Cm get 1089b50d902SRodney W. Grimesor 109752fa694SWarner Losh.Cm put 1109b50d902SRodney W. Grimescommands. 1119b50d902SRodney W. Grimes.Pp 112b68628c8SCraig Rodrigues.It Cm debug Ar level 1136d6d6c36SGordon BerglingEnable or disable debugging levels during verbose output. 1146d6d6c36SGordon BerglingThe value of 115b68628c8SCraig Rodrigues.Ar level 116b68628c8SCraig Rodriguescan be one of 117b68628c8SCraig Rodrigues.Cm packet , simple , options , 118b68628c8SCraig Rodriguesor 119b68628c8SCraig Rodrigues.Cm access . 120b68628c8SCraig Rodrigues.Pp 121752fa694SWarner Losh.It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname 122752fa694SWarner Losh.It Cm get Xo 123d7b64526SSimon L. B. Nielsen.Oo Ar host1 : Oc Ns Ar file1 124d7b64526SSimon L. B. Nielsen.Oo Ar host2 : Oc Ns Ar file2 ... 125d7b64526SSimon L. B. Nielsen.Oo Ar hostN : Oc Ns Ar fileN 126d7b64526SSimon L. B. Nielsen.Xc 127d7b64526SSimon L. B. NielsenGet one or more files from the remote host. 128d7b64526SSimon L. B. NielsenWhen using the 129d7b64526SSimon L. B. Nielsen.Ar host 130d7b64526SSimon L. B. Nielsenargument, the 131d7b64526SSimon L. B. Nielsen.Ar host 132d7b64526SSimon L. B. Nielsenwill be used as default host for future transfers. 133d7b64526SSimon L. B. NielsenIf 134d7b64526SSimon L. B. Nielsen.Ar localname 135d7b64526SSimon L. B. Nielsenis specified, the file is stored locally as 136d7b64526SSimon L. B. Nielsen.Ar localname , 137d7b64526SSimon L. B. Nielsenotherwise the original filename is used. 138d7b64526SSimon L. B. NielsenNote that it is not possible to download two files at a time, only 139d7b64526SSimon L. B. Nielsenone, three, or more than three files, at a time. 140d7b64526SSimon L. B. Nielsen.Pp 141d7b64526SSimon L. B. NielsenTo specify an IPv6 numeric address for a host, wrap it using square 142d7b64526SSimon L. B. Nielsenbrackets like 143d7b64526SSimon L. B. Nielsen.Dq Li [3ffe:2900:e00c:ffee::1234] : Ns Ar file 144d7b64526SSimon L. B. Nielsento disambiguate the 145d7b64526SSimon L. B. Nielsencolons used in the IPv6 address from the colon separating the host and 146d7b64526SSimon L. B. Nielsenthe filename. 1479b50d902SRodney W. Grimes.Pp 148752fa694SWarner Losh.It Cm mode Ar transfer-mode 1499b50d902SRodney W. GrimesSet the mode for transfers; 1509b50d902SRodney W. Grimes.Ar transfer-mode 1519b50d902SRodney W. Grimesmay be one of 152752fa694SWarner Losh.Em ascii 1539b50d902SRodney W. Grimesor 154752fa694SWarner Losh.Em binary . 1559b50d902SRodney W. GrimesThe default is 1567dbe228cSAlan Somers.Em binary . 1579b50d902SRodney W. Grimes.Pp 158b68628c8SCraig Rodrigues.It Cm packetdrop [arg] 159b68628c8SCraig RodriguesRandomly drop 160b68628c8SCraig Rodrigues.Ar arg 1616d6d6c36SGordon Berglingout of 100 packets during a transfer. 1626d6d6c36SGordon BerglingThis is a debugging feature. 163b68628c8SCraig Rodrigues.Pp 164752fa694SWarner Losh.It Cm put Ar file Op Oo Ar host : Oc Ns Ar remotename 165752fa694SWarner Losh.It Cm put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory 166d7b64526SSimon L. B. NielsenPut a file or set of files to the remote host. 167d7b64526SSimon L. B. NielsenWhen 168d7b64526SSimon L. B. Nielsen.Ar remotename 169d7b64526SSimon L. B. Nielsenis specified, the file is stored remotely as 170d7b64526SSimon L. B. Nielsen.Ar remotename , 171d7b64526SSimon L. B. Nielsenotherwise the original filename is used. 172d7b64526SSimon L. B. NielsenIf the 173d7b64526SSimon L. B. Nielsen.Ar remote-directory 174d7b64526SSimon L. B. Nielsenargument is used, the remote host is assumed to be a 17506e482e6SRuslan Ermilov.Ux 1769b50d902SRodney W. Grimesmachine. 177d7b64526SSimon L. B. NielsenTo specify an IPv6 numeric address for a 178d7b64526SSimon L. B. Nielsen.Ar host , 179d7b64526SSimon L. B. Nielsensee the example under the 180752fa694SWarner Losh.Cm get 181d7b64526SSimon L. B. Nielsencommand. 1829b50d902SRodney W. Grimes.Pp 183b68628c8SCraig Rodrigues.It Cm options Ar [arg] 1846d6d6c36SGordon BerglingEnable or disable support for TFTP options. 1856d6d6c36SGordon BerglingThe valid values of 186b68628c8SCraig Rodrigues.Ar arg 187b68628c8SCraig Rodriguesare 188b68628c8SCraig Rodrigues.Cm on 189b68628c8SCraig Rodrigues(enable RFC 2347 options), 190b68628c8SCraig Rodrigues.Cm off 191b68628c8SCraig Rodrigues(disable RFC 2347 options), and 192b68628c8SCraig Rodrigues.Cm extra 193b68628c8SCraig Rodrigues(toggle support for non-RFC defined options). 194b68628c8SCraig Rodrigues.Pp 195752fa694SWarner Losh.It Cm quit 1969b50d902SRodney W. GrimesExit 1978fe908efSRuslan Ermilov.Nm . 1989b50d902SRodney W. GrimesAn end of file also exits. 1999b50d902SRodney W. Grimes.Pp 200752fa694SWarner Losh.It Cm rexmt Ar retransmission-timeout 2019b50d902SRodney W. GrimesSet the per-packet retransmission timeout, in seconds. 2029b50d902SRodney W. Grimes.Pp 203b68628c8SCraig Rodrigues.It Cm rollover [arg] 204b68628c8SCraig RodriguesSpecify the rollover option in TFTP Read Request or Write 2056d6d6c36SGordon BerglingRequest packets. 2066d6d6c36SGordon BerglingAfter 65535 packets have been transmitted, set the block counter to 207b68628c8SCraig Rodrigues.Ar arg . 208b68628c8SCraig RodriguesValid values of 209b68628c8SCraig Rodrigues.Ar arg 210b68628c8SCraig Rodriguesare 0 and 1. This is a non-standard TFTP option. 211b68628c8SCraig Rodrigues.Pp 212752fa694SWarner Losh.It Cm status 2139b50d902SRodney W. GrimesShow current status. 2149b50d902SRodney W. Grimes.Pp 215752fa694SWarner Losh.It Cm timeout Ar total-transmission-timeout 2169b50d902SRodney W. GrimesSet the total transmission timeout, in seconds. 2179b50d902SRodney W. Grimes.Pp 218752fa694SWarner Losh.It Cm trace 2199b50d902SRodney W. GrimesToggle packet tracing. 2209b50d902SRodney W. Grimes.Pp 221752fa694SWarner Losh.It Cm verbose 2229b50d902SRodney W. GrimesToggle verbose mode. 223fdf929ffSJohn Baldwin.Pp 224fdf929ffSJohn Baldwin.It Cm windowsize Op Ar size 225fdf929ffSJohn BaldwinSets the TFTP windowsize option in TFTP Read Request or Write Request packets to 226fdf929ffSJohn Baldwin.Op Ar size 227fdf929ffSJohn Baldwinblocks as specified in RFC 7440. 228fdf929ffSJohn BaldwinValid values are between 1 and 65535. 229fdf929ffSJohn BaldwinIf no windowsize is specified, 230fdf929ffSJohn Baldwinthen the default windowsize of 1 block will be used. 2319b50d902SRodney W. Grimes.El 232fcaab598SCraig Rodrigues.Sh SEE ALSO 233f6c506d9SCraig Rodrigues.Xr tftpd 8 234fcaab598SCraig Rodrigues.Pp 235fcaab598SCraig RodriguesThe following RFC's are supported: 236fcaab598SCraig Rodrigues.Rs 237fb9c3835SJoel Dahl.%T RFC 1350: The TFTP Protocol (Revision 2) 238fcaab598SCraig Rodrigues.Re 239fcaab598SCraig Rodrigues.Rs 240fb9c3835SJoel Dahl.%T RFC 2347: TFTP Option Extension 241fcaab598SCraig Rodrigues.Re 242fcaab598SCraig Rodrigues.Rs 243fb9c3835SJoel Dahl.%T RFC 2348: TFTP Blocksize Option 244fcaab598SCraig Rodrigues.Re 245fcaab598SCraig Rodrigues.Rs 246fb9c3835SJoel Dahl.%T RFC 2349: TFTP Timeout Interval and Transfer Size Options 247fcaab598SCraig Rodrigues.Re 248fcaab598SCraig Rodrigues.Rs 249fb9c3835SJoel Dahl.%T RFC 3617: Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) 250fcaab598SCraig Rodrigues.Re 251fdf929ffSJohn Baldwin.Rs 252fdf929ffSJohn Baldwin.%T RFC 7440: TFTP Windowsize Option 253fdf929ffSJohn Baldwin.Re 254fcaab598SCraig Rodrigues.Pp 255fcaab598SCraig RodriguesThe non-standard 256fcaab598SCraig Rodrigues.Cm rollover 257fcaab598SCraig Rodriguesand 258fcaab598SCraig Rodrigues.Cm blksize2 259fcaab598SCraig RodriguesTFTP options are mentioned here: 260fcaab598SCraig Rodrigues.Rs 261fcaab598SCraig Rodrigues.%T Extending TFTP 262*1c7a40d2SWolfram Schneider.%U https://www.compuphase.com/tftp.htm 263fcaab598SCraig Rodrigues.Re 2646c7216dfSRuslan Ermilov.Sh HISTORY 2656c7216dfSRuslan ErmilovThe 2666c7216dfSRuslan Ermilov.Nm 2676c7216dfSRuslan Ermilovcommand appeared in 2686c7216dfSRuslan Ermilov.Bx 4.3 . 269f6c506d9SCraig Rodrigues.Pp 270f6c506d9SCraig RodriguesEdwin Groothuis <edwin@FreeBSD.org> performed a major rewrite of the 271f6c506d9SCraig Rodrigues.Xr tftpd 8 272f6c506d9SCraig Rodriguesand 273f6c506d9SCraig Rodrigues.Nm 274f6c506d9SCraig Rodriguescode to support RFC2348. 275e5660633SCraig Rodrigues.Sh NOTES 2769b50d902SRodney W. GrimesBecause there is no user-login or validation within 2779b50d902SRodney W. Grimesthe 2789b50d902SRodney W. Grimes.Tn TFTP 2799b50d902SRodney W. Grimesprotocol, the remote site will probably have some 2806a3e8b0aSRuslan Ermilovsort of file-access restrictions in place. 2816a3e8b0aSRuslan ErmilovThe 2829b50d902SRodney W. Grimesexact methods are specific to each site and therefore 2839b50d902SRodney W. Grimesdifficult to document here. 28467034ac6SJeroen Ruigrok van der Werven.Pp 28567034ac6SJeroen Ruigrok van der WervenFiles larger than 33488896 octets (65535 blocks) cannot be transferred 286e5660633SCraig Rodrigueswithout client and server supporting the TFTP blocksize option (RFC2348), 287e5660633SCraig Rodriguesor the non-standard TFTP rollover option. 288