Trivial file transfer protocol
TFTP is installed in the /usr/lpp/tcpip/sbin/ directory.
The TFTP server uses well-known port 69. The TFTP server has no user authentication. Any client that can connect to port 69 on the server has access to TFTP. If the TFTP server is started without a directory, it allows access to the entire z/OS® UNIX. To restrict access to the z/OS UNIX, start the TFTP server with a list of directories.
- -l
- Logs all the incoming read and write requests and associated information to the system log. Logged information includes the IP address of the requester, 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 on which requests are to be received.
- -t timeout
- Sets the packet timeout. The TFTP server usually waits 5 seconds before presuming that 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 because of lost packets to 5. You can specify a different retry limit.
- -c concurrency_limit
- Sets the concurrency limit. The TFTP server spawns both threads and processes to handle incoming requests. You can specify the limit for the number of threads that can be concurrently processing requests under a single process. When the limit is exceeded, a new process is spawned 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
about 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.
Following are examples of cache file entries:
a /usr/local/textfile
b local/binaryfileIf 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 only used 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 pathnames. You can specify no more than 20 directories.
- directory
- Specifies an absolute pathname for a directory. You can 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 specified directories are active. That list is used as a search path for incoming requests that specify a relative pathname 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.
- -b IP address
- Uses the specified IP address. The TFTP server usually binds to in6addr_any or inaddr_any. You can specify the IP address on which requests are to be received. TFTP requests that come in on other IP addresses are not accepted by this instance of TFTPD.
The TFTP server preforks a child process to handle incoming requests when the concurrency limit is exceeded. Consequently, immediately after starting the TFTP server, two TFTP processes exist.
In case of a flood of concurrent TFTP requests, the TFTP server might fork additional processes. When the number of concurrent requests being processed drops below the concurrency limit, the number of TFTP processes is decreased back to two.