cc/td/doc/product/iaabu/cddm/cddm111
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Serving Files with the TFTP Service

Serving Files with the TFTP Service

This chapter describes how to configure the TFTP service. It contains the following sections:

For information on starting and stopping the TFTP service, controlling access, and modifying basic information and communication options, see Chapter 2, "Configuring Services with the Cisco Service Manager."

Overview

The TFTP service uses the Internet-standard Trivial File Transfer Protocol (TFTP) to perform file transfers. TFTP can transfer files between the local host and remote hosts, but cannot perform operations other than file transfers, such as directory listings, file deletions, and so on.

TFTP is typically used to load software and configuration files to a network device. For example, Cisco routers use TFTP to load new versions of Cisco IOS software and configuration files.

TFTP does not perform any authentication when transferring files, so a user name and password on the remote host are not required. In general, only those files with world-read access in certain directories on the remote host can be read, and only certain directories on the local host can be written to.

Specifying a Different TFTP Default Directory

The TFTP service normally requires full path names; however, systems that do not provide full path names can access files under the default TFTP directory. The default TFTP directory provided is MultiNet\tftp under Windows NT, and CSCOcddm/tftp under UNIX, in the directory in which you installed the CDDM or Cisco Server Suite 1000.

To specify a different default directory:

Step 1 Start the CSM.

Step 2 Choose TFTP from the Available Services list.

Step 3 Select the Config

tab.

Step 4 Enable the checkbox next to the Default-tftp-directory label.

Step 5 Enter the default directory in the Default-tftp-directory field.

Step 6 Choose Save Configuration from the File menu.

Your changes take effect after you restart the TFTP service.

Defining TFTP File Name Translation Rules

When the TFTP server receives a request to transfer a file, it can translate the file or directory name, so that it actually retrieves a file with a different filename or location than the file requested. To configure the server to translate file names, you define file name translation rules.

To define a file name translation rule, you provide the name of the file you will be requesting from a client, and provide the name you want to give that file at its destination. Some example translation rules are shown in Table 8-1 below:


Table  8-1: Sample File Name Translation Rules
Requested File Translation
/mydir/bootfile.txt /yourdir/bootfil2.txt
/transdir/* /multinet/tftp
/trans* /multi

The three examples above illustrate the three different methods the TFTP server uses to translate file names. In the first example, a file is explicitly specified. In that case, when the TFTP server recieves a request to transfer a file called /mydir/bootfile.txt, it will actually transfer the file called /yourdir/bootfil2.txt.

The second example shows a wildcard character (*) directly following a slash (/) indicating that all files in a specific directory should be translated. In that case any file being transferred from the directory /transdir will be retrieved from the /multinet/tftp directory. Note that in this case, the server automatically appends a slash (/) to the end of the destination directory name. For example, if the server received a request to transfer the file /transdir/bootfile.txt, it would transfer the file /multinet/tftp/bootfile.txt.

The third example shows a wildcard character (*) in the middle of a directory/file name. Any file or directory that starts with /trans will be translated to the string /multi. In this case, because either a directory name or a file name could match the requested file specification, a slash is not appended to the end of the of the file / directory name. For example, if a request was received to transfer the file /transdir/bootfile.txt, the file would be translated to /multidir/bootfile.txt.

To configure the TFTP service to translate file and directory names:

Step 1 Start the CSM.

Step 2 Choose TFTP from the Available Services list.

Step 3 Select the Config tab.

Step 4 Enter the file or directory specification you expect to receive from the client in the Match Spec field.

Step 5 Enter the corresponding file or directory specification on the local host in the Translate Spec field.

Step 6 Choose Save Configuration from the File menu.

Your changes take effect after you restart the TFTP service.

Restricting Access to Specific Files and Directories

You can also use name translations to restrict access to your system. If you select the Restrict-access option, the TFTP service grants access only to the files and directories listed in the Translation rules or to files in the default TFTP directory. The default is to not restrict access.

To restrict access for a file or directory that does not need translation, list the same specification in both the Match spec and the Translate spec.

Caution If Restrict-access is not enabled, all world-readable files are available to TFTP clients. If files are not read-only, they can be overwritten.

To restrict access to files and directories to those specified in the Translation specs and those in the default TFTP directory:

Step 1 Start the CSM.

Step 2 Choose TFTP from the Available Services list.

Step 3 Select the Config tab.

Step 4 Enable the Restrict-access checkbox.

Step 5 Choose Save Configuration from the File menu.

Your changes take effect after you restart the TFTP service.

Changing the TFTP Timeout

When the TFTP service receives a request to transfer a file, it responds to the request by sending an acknowledgment. If the remote host does not respond to the acknowledgment by sending a request for the first data block in a specified amount of time, the TFTP service times out and closes the connection. The default value is five seconds.

To specify the amount of time the TFTP service waits after sending an acknowledgment before it times out:

Step 1 Start the CSM.

Step 2 Choose TFTP from the Available Services list.

Step 3 Select the Config tab.

Step 4 Enable the checkbox next to the Tftp-ack-timeout label.

Step 5 Enter the number of seconds to wait before the service times out after sending an acknowledgment in the Tftp-ack-timeout field.

Step 6 Choose Save Configuration from the File menu.

Your changes take effect after you restart the TFTP service.

Changing the TFTP Buffer Size

The TFTP service uses a memory buffer to store data during a file transfer. The default buffer size is 4 KB.

Caution Do not change the value of this parameter unless instructed to do so by a Cisco customer support engineer.

To change the size of the TFTP buffer:

Step 1 Start the CSM.

Step 2 Choose TFTP from the Available Services list.

Step 3 Select the Config tab.

Step 4 Enable the checkbox next to the Tftp-buffer-size label.

Step 5 Enter the size of the TFTP buffer (in bytes) in the Tftp-buffer-size field.

Step 6 Choose Save Configuration from the File menu.

Your changes take effect after you restart the TFTP service.

Changing the TFTP Dead Transfer Timeout

If the TFTP service stops receiving data requests during a file transfer, it waits a specified length of time and then closes the connection. The length of time the service waits is called the dead-transfer timeout. The default is 30 seconds.

To specify the length of time to wait before a dead-transfer timeout:

Step 1 Start the CSM.

Step 2 Choose TFTP from the Available Services list.

Step 3 Select the Config tab.

Step 4 Enable the checkbox next to the Tftp-dead-transfer-timeout field.

Step 5 Enter the number of seconds to wait before the service times out during a file transfer in the Tftp-dead-transfer-timeout field.

Step 6 Choose Save Configuration from the File menu.

Your changes take effect after you restart the TFTP service.

hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1997 © Cisco Systems Inc.