Appendix D. TFTP Command Reference

 

The MultiNet TFTP utility uses the Internet-standard Trivial File Transfer Protocol (TFTP) to transfer files between the local host and a remote host. This appendix describes the commands you can use during a TFTP session.

 

Command Summary

The below table lists the TFTP commands:

Command

Description

CONNECT

Specifies the name or address of the TFTP server.

GET

Transfers remote_file on the remote host to local_file on the local host.

PUT

Copies local_file on the local host to remote_file on the remote host.

QUIT

Terminates TFTP and returns to DCL.

REXMT

Specifies the amount of time TFTP waits for a response to arrive before retransmitting a request. The default value for the retransmission timer is five seconds.

STATUS

Displays the current TFTP status.

TIMEOUT

Sets the amount of time TFTP waits for a response from the server before aborting a transfer.

TRACE

Toggles TFTP packet tracing.

 


 

CONNECT

Specifies the name or address of the TFTP server. This value overrides the command line host specification. You may use either a symbolic host name or an Internet address.

This command does not cause any network action, but sets the destination address for the TFTP UDP packets. If the host cannot be reached, an error is not displayed until a GET or PUT command is attempted.

 

FORMAT

connect  host

 

PARAMETERS

host

Specifies a remote host.

 

EXAMPLE

This example connects to the host EXAMPLE.COM.

tftp>connect example.com


 

GET

Transfers remote_file on the remote host to local_file on the local host.

You must specify an absolute path name (device, directory, and file name) for remote_file, and typically the server requires the file to be world-readable. If you do not specify local_file, the default is the same name and directory as remote_file.

 

FORMAT

get remote_file [local_file]

 

PARAMETERS

remote_file

Specifies the name of the input file on the remote host.

local_file

Specifies the name of the output file on the local host.

 

EXAMPLE

This example retrieves the file USERS:[SMITH]LOGIN.COM and stores it in the file LOGIN.COM.

tftp>get users:[smith]login.com login.com
Received 2361 bytes in 1 seconds.
tftp>


 

PUT

Copies local_file on the local host to remote_file on the remote host.

You must use absolute pathnames on remote_file, and typically the server requires the file to already exist and be world-writable (W:W). If you do not specify remote_file, it defaults to the same name and directory as local_file.

 

FORMAT

put local_file [remote_file]

 

PARAMETERS

local_file

Specifies the name of the input file on the local host.

remote_file

Specifies the name of the output file on the remote host.

 

EXAMPLE

This example transfers SYS$LOGIN:LOGIN.COM to the remote file specification /tmp/foo.

tftp>put sys$login:login.com /tmp/foo
Sent 2361 bytes in 1 second.
tftp>


 

QUIT

Terminates TFTP and returns to DCL.

 

FORMAT

quit

 

EXAMPLE

tftp>quit
$


 

REXMT

Specifies the amount of time TFTP waits for a response to arrive before retransmitting a request. The default value for the retransmission timer is five seconds.

 

FORMAT

rexmt seconds

 

PARAMETERS

seconds

Sets the TFTP retransmission timer to the specified number of seconds.

 

EXAMPLE

This example sets the TFTP retransmission timer to 10 seconds.

tftp>rexmt 10


 

STATUS

Displays the current TFTP status.

 

FORMAT

STATUS

 

EXAMPLE

This example shows how to display TFTP status after a connection has been made to EXAMPLE.COM. All values shown are the defaults.

tftp>status
Connected to EXAMPLE.COM.
Mode: octet Tracing:  off
Rexmt-interval:  5 seconds, Max-timeout: 25 seconds
tftp>


 

TIMEOUT

Sets the amount of time TFTP waits for a response from the server before aborting a transfer.

The REXMT command controls how often the request is retransmitted. The default value for the maximum timeout is 25 seconds.

 

FORMAT

timeout seconds

 

PARAMETERS

seconds

Specifies the number of seconds for the maximum timeout allowed per TFTP packet.

 

EXAMPLE

This example shows how to set the maximum timeout to 50 seconds.

tftp> timeout 50
tftp>


 

TRACE

Toggles TFTP packet tracing.

 

FORMAT

trace

 

EXAMPLES

This example shows how to enable TFTP packet tracing. Issue the command a second time to disable packet tracing.

tftp>trace
Packet tracing on.
tftp>

This example shows a transfer with packet tracing enabled.

get use2s:[smith]login.com .com

sent LOCALHOST.69   RRQ <file=users:[smith]login.com, mode=octet>
received LOCALHOST.69       DATA <block=1, 512 bytes>
sent LOCALHOST.69   ACK <block=1>
received LOCALHOST.69       DATA <block=2, 512 bytes>
sent LOCALHOST.69   ACK <block=2>
received LOCALHOST.69       DATA <block=3, 512 bytes>
sent LOCALHOST.69   ACK <block=3>
received LOCALHOST.69       DATA <block=4, 512 bytes>
sent LOCALHOST.69   ACK <block=4>
received LOCALHOST.69       DATA <block=5, 313 bytes>
Received 2361 bytes in 2 seconds.
tftp>