Visual RFC.
ALL RFCs / RFC 2428
Read the RFC ↗
RFC 2428 / FTP DATA CONNECTIONS

Separate the control conversation from the file

01

An FTP client sends commands on one TCP connection. The file travels on another connection, whose opening direction matters.

RFC 2428 · § 1EXAMPLE
4 / 4
04
The client opens the data connection

The client connects to the same server address on port 6446. A separately authorized RETR then sends download bytes in the opposite direction.

Separate the control conversation from the fileThe client connects to the same server address on port 6446. A separately authorized RETR then sends download bytes in the opposite direction.The client opens the data connectionClientFTP serverclient → server: data TCPserver → client: download bytesA separately authorized RETR requests the file

Key idea: Opening the data connection and sending the file are different directions.

Terms
FTP
File Transfer Protocol. Its control connection carries commands; a separate data connection carries a file or directory listing.
Client / server
The client sends FTP commands. Which side opens the data TCP connection is a separate choice.
Address family
The network protocol number: 1 for IPv4 and 2 for IPv6 in these examples.
Passive mode
The server listens for a data TCP connection that the connecting peer opens.

Look up a term in the glossary ↗

Rules & examples
  • FTP uses a control connection and separate data connections. In the ordinary two-machine example, EPSV asks the server to listen; the client opens the data TCP connection.
  • RFC 2428 §4 says EPSV MUST be used when control and data connections are between the same two machines. This is the usage rule of this extension, not a claim that every deployed legacy FTP server supports it.
  • The 229 reply identifies a listening port, not a completed TCP handshake or a completed file transfer. A separately authorized RETR requests the illustrated download; FTP preliminary/final transfer replies are omitted.
  • Here the client opens the data connection toward the server, while downloaded file bytes move from server to client. Connection initiation does not fix the file-transfer direction.

Documentation addresses and chosen listening ports. Each chapter is a separate bounded example; FTP authentication, authorization, file commands and transfer replies are not a complete FTP implementation here. EPRT/EPSV provide no encryption or guaranteed reachability.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background
commandsfile bytes

Commands arrange a separate file connection

Imagine arranging a delivery by phone, then opening a separate delivery entrance. EPSV asks the server to listen; EPRT can describe another receiving endpoint in a proxy setup. The analogy separates arranging a connection from moving the file and does not promise access through a firewall.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 2428

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗