Week 9 · Lesson 6

FTP and TFTP

Two file-transfer protocols, two very different designs. FTP is the full-featured original: authenticated, directory-aware, and unusual in that it uses two TCP connections. TFTP strips all of that away to move a file with no login and no listing — which is exactly why it is the tool network engineers use to back up and restore router configurations.

CCNA 200-301 Application Layer Verified 2026-10-11
Part 1

FTP: the file-transfer workhorse

FTP (File Transfer Protocol) is a client–server protocol for moving files between a client and a server. It is one of the oldest Internet protocols and is standardised in RFC 959. The server offers a directory tree; the client logs in and can list, upload, download, rename, and delete files.

Definition — FTP. FTP is a client–server application protocol for transferring files. It uses the client–server model, supports authentication, and uses two separate TCP connections — one for control, one for data.

The single most examined fact about FTP is that it is not one connection but two. A firewall that only permits the control connection will let the session start but no file will ever transfer.

Part 2

The two connections

FTP separates talking from moving data.

ConnectionPurposePort (well-known)Lifetime
Control connectionCarries commands and replies (login, change directory, request a transfer).TCP 21Stays open for the whole session.
Data connectionCarries the actual file, or a directory listing.TCP 20 in active modeOpened and closed for each transfer.
Exam tip. Two numbers, two jobs: 21 = control, 20 = data (active mode). A question that says “the command channel” is 21; “the file transfer channel in active mode” is 20.

Because the control and data channels are independent, FTP can transfer a file while still receiving commands, and it can open a fresh data connection for each operation without tearing down the session.

Part 3

Active vs passive mode

The two connections create a direction problem: who opens the data connection? FTP has two answers, and the difference matters whenever NAT or a firewall is in the path.

Who opens the data connection? · select a mode
FTP client behind NAT / firewall FTP server on the public network

Definition — why passive works through firewalls. In passive mode the server never opens a connection back to the client. Both the control connection and the data connection are client-initiated outbound connections, which firewalls and NAT devices handle naturally. That is why FTP clients fall back to passive mode by default on modern networks.
Remember. Active = server connects from port 20 to the client. Passive = client connects to a server-chosen high port. The control connection is always TCP 21 in both modes.
Part 4

A typical FTP session

An FTP session is a conversation of commands over the control connection. Server replies are three-digit codes (220 = service ready, 331 = password required, 230 = logged in, 150 = opening data connection, 226 = transfer complete). Select a command to see what it does.

FTP commands · select one

      

CommandMeaning
USER / PASSSupply the username and password.
PASVEnter passive mode (client will open the data connection).
LISTList the directory contents (transferred over the data connection).
RETRRetrieve (download) a file from the server.
STORStore (upload) a file to the server.
QUITEnd the session and close the control connection.
Part 5

FTPS vs SFTP

Plain FTP sends the username, password, and file contents in cleartext, so it must be protected. Two different solutions are commonly confused. Pick one to see the detail.

Secure file transfer · select a protocol

Do not confuse them. FTPS is FTP wrapped in TLS (ports 21/990/989). SFTP is a function of SSH (port 22) and is a completely separate protocol. They are not names for the same thing.
Part 6

TFTP: the trivial one

TFTP (Trivial File Transfer Protocol) is defined in RFC 1350. It is a deliberately minimal file-transfer protocol designed to be simple enough to fit in a small amount of memory — for example in a device booting from the network.

Canonical port. TFTP uses UDP port 69 for its initial request. The transfer then continues on a negotiated port, but 69 is the port you must know. TFTP is the only protocol in this lesson that uses UDP, not TCP.

TFTP’s real home is network and device management. Cisco IOS uses it to back up and restore configurations and to load operating-system images, and many devices use it for network/PXE boot and firmware updates. Because it has no authentication, TFTP must be confined to a trusted management network.

! Back up the running configuration to a TFTP server
R1# copy running-config tftp:
Address or name of remote host []? 192.168.1.100
Destination filename [R1-confg]? R1-backup.cfg
! ...bytes copied, transfer complete

! Restore it later
R1# copy tftp: running-config
Feature by feature · select a protocol

Part 7 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Postel, J. & Reynolds, J. RFC 959: File Transfer Protocol (FTP) (1985). rfc-editor.org/rfc/rfc959.
  2. Sollins, K. RFC 1350: The TFTP Protocol (Revision 2) (1992). rfc-editor.org/rfc/rfc1350.
  3. Ford-Hutchinson, P. RFC 4217: Securing FTP with TLS (2005). rfc-editor.org/rfc/rfc4217.
  4. IANA. Service Name and Transport Protocol Port Number Registry (FTP 20/21, TFTP 69, FTPS 989/990). iana.org.
  5. Cisco. CCNA (200-301) Exam Topics, IP Services and device management. cisco.com.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.