tftp
Syntax
tftp [-i
interface] [-l
port] [-r
port] [-c
retry count] [-t
timeout][-s
block size] host
remotefilepath [localfilepath]
Description
Downloads a file from TFTP server.
Options
-i interface
- Specifies an adapter name, such as eth0.
-l port
- Specifies the local port number. Default value is 0, and the port number is automatically assigned.
-r port
- Specifies the remote port number. Default value is 69.
-c retry count
- Specifies the number of times to transmit request packets and wait for a response. The default value is 6.
-t timeout
- Specifies the number of seconds to wait for a response after sending a request packet. Default value is 4.
-s block size
- Specifies the TFTP
blksize
option as defined in RFC 2348. Valid range is between 8 and 65464, and the default value is 512. host
- Specifies a TFTP server IPv4 address.
remotefilepath
- Specifies a TFTP server path of a file to download.
localfilepath
- Specifies a local destination file path.
Usage
When an optionallocalfilepath
is provided, the downloaded file is stored locally using the provided file path. When a local file path is not specified, the file is stored in the current directory using the file server's name.
Before using this command, the network interface intended to be used to retrieve the file must be configured. You can use the
ifconfig
command to do so.
When a network interface is defined with the
-i
option, only that interface is used to retrieve the remote file. Otherwise, all network interfaces are tried in the order they are discovered during the boot phase.
Example
To get the file
dir1/file1.dat
from the TFTP server at 192.168.1.1, and store it as
file2.dat
in the current directory:
fs0:\> tftp 192.168.1.1 dir1/file1.dat file2.dat