VMware ESXi and vSphere Cluster Management

Trivial File Transfer Protocol (TFTP)

Learn how TFTP transfers files over UDP, its limitations and security risks, and how Cisco devices use it for IOS images and configuration backups.

What Is TFTP?

Trivial File Transfer Protocol (TFTP) is a lightweight application-layer protocol for transferring files between network hosts. It operates over TCP/IP networks and supports simple file uploads and downloads.

TFTP is a simplified alternative to FTP. FTP provides a broader set of features, including authentication, directory navigation, file listings, and remote file-management commands. TFTP intentionally omits most of those features so that it remains small, simple, and low in resource usage.

TFTP is commonly used in controlled network-management workflows, such as moving Cisco IOS images and configuration files between a network device and a management host.

TFTP Clients and Servers

A TFTP client is the host or application that initiates a file transfer. A TFTP server stores files and responds to client requests according to its configured permissions and directory rules.

The client can request either of two fundamental operations:

  • Read request (RRQ): the client requests a file from the TFTP server. This is a download.
  • Write request (WRQ): the client sends a file to the TFTP server. This is an upload.

The client supplies information such as the server IP address, source file location, destination filename, and transfer direction. The server must be reachable and must permit the requested operation.

How TFTP Uses UDP

TFTP uses UDP, a connectionless transport protocol. Unlike TCP, UDP does not establish a connection with a handshake before sending application data.

The initial RRQ or WRQ is sent to the TFTP server's well-known UDP port 69. After the request is accepted, the actual transfer uses UDP communication negotiated for that transfer, rather than continuing all data on port 69. This allows separate transfers to be identified and handled independently.

Because UDP does not provide TCP's connection-oriented delivery mechanisms, TFTP must handle transfer reliability at the protocol level. TFTP uses blocks, acknowledgements, and retransmissions to move a file and detect when transfer data has been received. UDP's lack of connection setup keeps the protocol lightweight, but it does not remove the need for careful firewall and ACL rules.

RRQ and WRQ at a Glance

RequestDirectionMeaning
RRQServer to clientThe client reads or downloads a file from the server.
WRQClient to serverThe client writes or uploads a file to the server.

TFTP Characteristics

CharacteristicTFTP BehaviorOperational Impact
Transport protocolUDPNo TCP connection setup; TFTP handles transfer control itself.
Well-known initial portUDP port 69The initial request is directed to the TFTP service at port 69.
Primary operationsFile read and file writeTFTP is designed for downloads and uploads.
AuthenticationNone in standard TFTPThe service cannot verify a user's identity.
EncryptionNoneTransferred data is sent in clear text.
Directory and file managementUnsupportedTFTP cannot browse, list, delete, or rename remote files.
Resource useLowThe small command set and limited features reduce complexity and overhead.

What TFTP Cannot Do

TFTP is a transfer-only protocol. It does not provide remote directory browsing or file listing. A client generally needs to know the exact filename it wants to read or write.

TFTP also cannot delete, rename, or otherwise manage remote files and directories. Those operations require a richer protocol or separate administrative access to the server.

These restrictions are intentional. A small command set and the absence of authentication and directory-management features make TFTP easier to implement and suitable for devices with limited resources. The trade-off is that TFTP is not a general-purpose remote file-management system.

TFTP Compared with FTP

FeatureTFTPFTP
Transport protocolUDPTCP
Authentication supportNone in standard TFTPSupports user authentication.
Encryption by defaultNo; data is clear text.Traditional FTP is also not encrypted by default, although secure variants are available.
Directory listingUnsupportedSupported.
Delete and rename operationsUnsupportedSupported through FTP commands and permissions.
Complexity and resource useLow complexity and low resource use.Richer features require more protocol and service functionality.
Appropriate use casesSimple transfers in a trusted, controlled management environment.Interactive or managed file transfers that need sessions, authentication, and file-management features.

Security Characteristics and Risks

Standard TFTP does not provide authentication, which is the process of verifying a user's or device's identity. A TFTP server cannot use standard TFTP credentials to determine whether a requester is authorized.

TFTP also sends data in clear text. Clear text is data sent without encryption, so a network observer who can capture the traffic may be able to read the transferred file. Configuration files may contain sensitive information, and IOS images or other files may reveal useful information about a network.

Unauthorized reads or writes are possible when server permissions, network access, or ACLs are not restricted. A misconfigured service could expose files for download or allow unwanted uploads.

Reducing TFTP Exposure

  • Bind or expose the service only on a dedicated management network where possible.
  • Restrict clients with firewall rules and ACLs.
  • Allow only the required read or write permissions.
  • Limit the server's permitted directory or TFTP root.
  • Avoid storing sensitive files on a broadly reachable TFTP server.
  • Use SCP or SFTP when authentication and encryption are required.

TFTP's simplicity is also its principal security limitation. A protocol can be appropriate for a protected lab or management segment while being inappropriate across an untrusted network.

Why TFTP Is Lightweight

TFTP uses fewer resources than feature-rich file-transfer solutions because it has a small command set and does not include authentication, interactive sessions, directory management, or other advanced features.

This makes TFTP useful when a network device needs a straightforward way to read or write a known file. Common examples include transferring a configuration backup, exporting an IOS image, or retrieving an image during device recovery. The environment must provide the security controls that TFTP itself lacks.

Cisco Networking Use Cases

Cisco devices can use TFTP to transfer software images and configuration files. In many workflows, the Cisco device acts as the TFTP client and the management host acts as the TFTP server.

  • IOS image backup: copy an IOS image from router flash memory to a TFTP server.
  • IOS image restore: copy an IOS image from a TFTP server into router flash memory.
  • Configuration backup: copy a running or startup configuration to a TFTP server where supported.
  • Configuration restore: retrieve a saved configuration from a TFTP server, with care because applying it can change the live device.

A Cisco IOS image is the operating system software used by a Cisco network device. Flash memory is nonvolatile storage on the device and commonly holds IOS images and other files.

Checks Before a Cisco Transfer

  1. Verify IP connectivity and routing between the Cisco device and the TFTP server.
  2. Confirm the server IP address and the correct source and destination filenames.
  3. Check that the TFTP service is running.
  4. Confirm server read or write permissions and the configured TFTP root directory.
  5. Check available flash capacity before copying an image into the device.
  6. After the transfer, verify that the destination file exists, has the expected size, and is usable.

Cisco IOS Commands

Inspect Flash and Test Reachability

dir flash:
ping <tftp-server-ip-address>

dir flash: displays files in flash memory. Use the exact displayed IOS filename when prompted. Also check available space before copying an image into flash.

ping tests IP reachability, but a successful ping does not prove that the TFTP service is running or that the required UDP traffic is permitted.

Back Up an IOS Image

copy flash: tftp:

Typical prompts request the TFTP server IP address, the source filename in flash, and the destination filename on the TFTP server.

Restore an IOS Image

copy tftp: flash:

Typical prompts request the TFTP server IP address, the source filename on the server, and the destination filename in flash. Confirm that flash has enough free space and that the image is compatible with the device. Afterward, verify the image and configure the device to boot the intended image if necessary.

Back Up and Restore Configuration Files

copy running-config tftp:
copy tftp: running-config

The backup command prompts for the TFTP server IP address and a destination configuration filename. The restore command prompts for the server IP address and source filename.

Copying a saved configuration to running-config can merge commands into the active configuration. Review the file and understand the expected changes before applying it to a live device. A startup-configuration workflow may be supported separately depending on the device and IOS version.

End-to-End Transfer Workflow

Host Uploads to a TFTP Server

In one direction, Host A runs TFTP client software and a router or other host provides the TFTP server service where supported.

  1. Host A starts a TFTP client.
  2. The user selects a local source file, the server IP address, and a destination filename.
  3. The client initiates a WRQ.
  4. The server checks its write policy and permitted directory.
  5. The file is transferred in UDP data blocks with acknowledgements.
  6. The user verifies that the destination file exists and is usable.

TFTP supports sending the file, but it does not provide a command to browse the server, list its files, or rename the uploaded file.

Router Retrieves a File

In the reverse direction, a router acts as the TFTP client and retrieves a file from a TFTP server.

  1. Confirm routing and reachability to the TFTP server.
  2. Identify the exact server filename and confirm that the file is readable.
  3. Provide the server IP address and destination location on the router.
  4. The router initiates an RRQ.
  5. The server sends the file through the negotiated UDP transfer.
  6. Verify the file in the router's storage and validate it before use.

Cisco TFTP Transfer Directions

TaskSourceDestinationTypical Purpose
IOS backupRouter flashTFTP serverKeep a recovery copy of the device software image.
IOS restoreTFTP serverRouter flashRecover or replace an IOS image.
Configuration backupRunning or startup configurationTFTP serverPreserve a device configuration externally.
Configuration restoreTFTP serverRunning or startup configurationRecover or apply saved configuration data, with change-control precautions.

Troubleshooting TFTP Transfers

Transfer Times Out Immediately

Possible causes include missing IP connectivity, an incorrect server address, a stopped TFTP service, or a firewall or ACL blocking UDP port 69 or the UDP traffic used after the initial request.

  • Ping the server address.
  • Confirm that the TFTP service is running and listening.
  • Review ACL and firewall rules in both directions.
  • Confirm the device's source interface and routing path.

File Not Found During a Download

Check the exact filename and confirm that the file is inside the server's configured TFTP root directory. Verify that the TFTP service has read permission. Filename case behavior can differ by server platform, so use the server's exact spelling.

Access Violation or Write Failure

The server may not permit uploads, the destination directory may not be writable by the service, or the server may require the destination file to be created before an upload.

  • Review the server's write policy.
  • Verify destination directory permissions.
  • Check whether uploads require a pre-created destination file.

IOS Transfer Fails

Use dir flash: to check available storage and filenames. Verify the IOS image size, transfer stability, and image integrity. Confirm that the image is compatible with the target device. A completed network transfer is not sufficient if the image is incomplete, invalid, or too large for flash.

Lab Transfer Works but Production Use Is Unsafe

If the transfer crosses an untrusted network or exposes sensitive configurations without encryption, replace TFTP with an authenticated and encrypted method such as SCP or SFTP. Keep TFTP confined to a controlled management segment when it is necessary.

Exam-Ready Summary

  • TFTP is a lightweight application-layer file-transfer protocol.
  • It uses UDP, with UDP port 69 used for the initial request.
  • RRQ downloads a file; WRQ uploads a file.
  • The client initiates the transfer, and the server provides or accepts the file according to its permissions.
  • TFTP cannot list directories, browse remotely, delete files, or rename files.
  • Standard TFTP provides neither authentication nor encryption; transferred data is clear text.
  • Use TFTP mainly in trusted, controlled management environments.
  • Cisco devices commonly use TFTP to back up and restore IOS images and configuration files.
  • Always verify reachability, filenames, permissions, storage space, and the resulting file after a transfer.

For a concise reference to this lesson, see Trivial File Transfer Protocol (TFTP).