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

Read an EPRT endpoint without IPv4 assumptions

02

EPRT describes an address family, a network address and a listening TCP port, separated by one chosen printable delimiter.

RFC 2428 · § 2EXAMPLE
4 / 4
04
Stop at a missing delimiter

A separate command missing its final bar is malformed. The chosen server rejects it with 501 before accepting an endpoint.

Read an EPRT endpoint without IPv4 assumptionsA separate command missing its final bar is malformed. The chosen server rejects it with 501 before accepting an endpoint.Stop at a missing delimiterEPRT |2|2001:db8::10|5282Final delimiter is missingChosen reply: 501 syntax errorNo endpoint accepted from this malformed command

Key idea: The delimiter separates fields; colons inside an IPv6 address stay inside its address field.

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
  • EPRT MUST be followed by one ASCII space, then the chosen delimiter and the three fields, each followed by that delimiter: EPRT <d><net-prt><d><net-addr><d><tcp-port><d>. FTP commands end with CRLF (RFC 959 §4.1.3).
  • The delimiter MUST be ASCII 33–126 inclusive. The vertical bar | is RECOMMENDED unless it conflicts with a character needed in the network address. A delimiter must still permit the chosen fields to be read unambiguously.
  • The network protocol field MUST be an assigned address-family number. The shown families are 1 for IPv4 dotted decimal and 2 for IPv6 textual addresses. IPv6 colons are not PORT-style comma-separated IPv4 octets.
  • The port is the decimal TCP listening-port number. A well-formed supported endpoint is not proof of authorization, identity or reachability. The malformed example chooses standard negative reply 501; RFC 2428 also permits 500 for relevant errors.

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 ↗