To start the TFTP server from the command line, type the tftpd
command.
tftpd [-l] [-p port] [-t timeout] [-r maxretries] [-c concurrency_limit]
[-s maxsegsize] [-f file] [-a archive directory [-a ...]]
[-b IP address] [directory ...]
The following parameters are used for the tftpd command:
- -l
- Logs all incoming read and write requests and associated information
to the system log. Logged information includes the IP address of the
requestor, the file requested, and whether the request was successful.
- -p port
- Uses the specified port. The TFTP server usually receives requests
on well-known port 69. You can specify the port in which requests
are to be received.
- -t timeout
- Sets the packet timeout. The TFTP server usually waits 5 seconds
before assuming a transmitted packet has been lost. You can specify
a different timeout period in seconds.
- -r maxretries
- Sets the retry limit. The TFTP server usually limits the number
of retransmissions it performs due to lost packet to 5. You can specify
a different retry limit.
- -c concurrency_limit
- Sets the concurrency limit. The TFTP server creates both threads
and processes to handle incoming requests. You can specify the limit
for the number of threads that may be concurrently processing requests
under a single process. When the limit is exceeded, a new process
is created to handle requests. The default is 200 threads.
- -s maxsegsize
- Sets the maximum block size that can be negotiated by the TFTP
block size option. The default is 8192.
- -f file
- Specifies a cache file. You can specify a file containing information
on files to be preloaded and cached for transmission. A cache file
consists of one or more entries. For clarity, place each entry on
a separate line. An entry has the form:
a | b <pathname>
where:
- a indicates that the specified file is cached
in ASCII form. The file is preconverted to netascii format.
- b indicates that the specified file is cached
in binary form, with no conversion.
The following examples show cache file entries:
a /usr/local/textfile
b local/binaryfile
If a relative pathname
to the file is specified, the TFTP server searches the specified directories
for the file.
The cached version of a file is used only for
requests requiring the specified format. For example, the binary cached
version of a file is not used in satisfying a request for the file
in netascii format. If a file is to be retrieved in both binary and
ASCII formats, the user must specify that two copies of the file be
cached with one in binary format, and the other in netascii format.
Caching
is not dynamic. The cache files are read in when the TFTP server
is started and are not updated, even if the file on disk is updated.
To update or refresh the cache, the TFTP server must be recycled.
- -a archive directory
- Specifies an archive directory. The files in this directory and
its subdirectories are treated as binary files for downloading. This
option is useful on EBCDIC machines that act as file servers for ASCII
clients. Multiple -a options can be specified;
one directory per -a option. Directories
must be specified as absolute path names. You can specify no more
than 20 directories.
- -b IP address
- Uses the specified IP address. The TFTP server usually binds to
INADDR_ANY or the IPv6 unspecified address, in6addr_any. You can specify
the IP address on which requests are to be received. TFTP requests
that come in on other IP addresses will not be accepted by this instance
of TFTPD.
- directory
- Specifies an absolute path name for a directory. You may specify
no more than 20 directories on the tftpd command line.
If the TFTP
server is started without a list of directories, all mounted directories
are considered active.
If a list of directories is specified,
only those directories specified are active. That list is used as
a search path for incoming requests specifying a relative path name
for a file.
Activating a directory activates all of its subdirectories.
For
a file to be readable by the TFTP server, the file must be in an active
directory and have world ("other") read access enabled. For a file
to be writable by the TFTP server, the file must already exist in
an active directory and have world ("other") write access.