RFC 1639
FTP Operation Over Big Address Records (FOOBAR)
FOOBAR: FTP Over Big Address Records π
okay bestie, meet RFC 1639 π It's titled FTP Operation Over Big Address Records (FOOBAR) and it came from the Network Working Group πΈ David M. Piscitello of Core Competence, Inc. wrote it in June 1994 β¨ Its category is Experimental, so it's a trial run and not an Internet standard π§ͺ It obsoletes RFC 1545 π and the header doesn't list anything it updates.
Status of this Memo π
This memo defines an Experimental Protocol for the Internet community π§ͺ It does not specify an Internet standard of any kind. The authors want discussion and suggestions for improvement, and distribution of this memo is unlimited π
Abstract β¨
This paper describes a convention for specifying address families other than the default Internet address family in FTP commands and replies π¦
Introduction πΈ
okay so in the File Transfer Protocol (STD 9, RFC 959), the PORT command argument <host-port> picks the data port used to set up a data connection for FTP π That same argument also shows up in the PASV reply, where it asks the server-DTP to listen on a data port that isn't its default one π
This RFC gives addresses other than 32-bit IPv4 addresses a way to be assigned to data ports. It does that with a "long Port (LPRT)" command and a "Long Passive (LPSV)" reply, and each one takes a <long-host-port> argument π That argument allows extra address families, variable-length network addresses, and variable-length port numbers. It's giving flexibility π₯
This is a general solution for all "next generation" IP alternatives, and for network protocols that aren't IP too π§ This revision also extends FTP so it can run over transport interfaces other than TCP π
Acknowledgments π«Ά
Huge thanks to everyone at the IETF who casually mentioned how to do this but left it to the author to actually write the RFC π Special thanks to Rich Colella, Bob Ullmann, Steve Lunt, Jay Israel, Jon Postel, Shawn Ostermann, and Tae Kyong Song, who all contributed to this work β¨
1. Background π
The PORT command in File Transfer Protocol lets users pick an address other than the default data port for the transport connection that carries the data π¦ The PORT command syntax is:
PORT <SP> <host-port> <CRLF>
The <host-port> argument is a 32-bit internet <host-address> joined with a 16-bit TCP <port-address> π That address info gets split into 8-bit fields, and each field goes out as a decimal number in character string form. Commas separate the fields. So a PORT command looks like PORT h1,h2,h3,h4,p1,p2, where h1 is the high-order 8 bits of the internet host address π
The <host-port> argument also shows up in the PASV reply and in certain negative completion replies πΈ
Newer IP "next generation" options will need bigger network addresses, and FTP has to work over network and transport protocols besides IP. So FTP needs new commands and reply codes π
2. The LPRT Command π
The LPRT command lets users pick a "long" address for the transport connection that carries data β¨ The LPRT command syntax is:
LPRT <SP> <long-host-port> <CRLF>
The <long-host-port> argument is made by joining these fields together:
- an 8-bit
<address-family>argument (af) - an 8-bit
<host-address-length>argument (hal) - a
<host-address>of<host-address-length>(h1, h2, ...) - an 8-bit
<port-address-length>(pal) - a
<port-address>of<port-address-length>(p1, p2, ...)
The starting values for the <address-family> argument match the version number of IP (see Assigned Numbers, STD 2, RFC 1340) π So values from 0 to 15 decimal are reserved for IP and get assigned by IANA. Values from 16 to 255 are open for IANA to hand out to every other network layer protocol FTP might run over π§
Here are the relevant assigned <address-family> numbers for FOOBAR π
Decimal Keyword
------ -------
0 reserved
1-3 unassigned
4 Internet Protocol (IP)
5 ST Datagram Mode
6 SIP
7 TP/IX
8 PIP
9 TUBA
10-14 unassigned
15 reserved
16 Novell IPX
Each field's value is split into 8-bit fields, and each one goes out as an unsigned decimal number in character string form. Negative numbers are explicitly not permitted β οΈ Commas separate the fields π
A LPRT command is shaped like this, and yes, the order matters π
LPRT af,hal,h1,h2,h3,h4...,pal,p1,p2...
Here h1 is the high-order 8 bits of the internet host address, and p1 is the high-order 8 bits of the port number (transport address) π
3. The LPSV Command π¦
The L(ONG) PASSIVE command asks the server-DTP to listen on a data port other than its default one, and to wait for a connection instead of starting one when a transfer command arrives πΈ The reply carries the address family, the host address length indicator, the host address, the port address length, and the port address of the server's listener process β¨ The reply code for entering passive mode with a long address is 228. (By FTP's rules, that's a positive completion reply 2yz, connections x2z, passive mode entered using long address xy8) π₯
The suggested message that goes with this reply code is:
228 Entering Long Passive Mode
(af, hal, h1, h2, h3,..., pal, p1, p2...)
4. Permanent Negative Completion Reply Codes π
The negative completion reply codes already tied to syntax errors in the PORT and PASV commands also fit the LPRT and LPSV commands, which are 500 and 501 π But there's a gap: an extra negative completion reply code is needed to tell apart a host that supports LPRT or LPSV and still doesn't support the address family you asked for π
Out of the FTP reply code groupings (syntax, information, connections, authentication and accounting, and file system), "connections" seems like the most logical pick π§ So a new negative command completion reply code, 521, gets added, with this suggested text:
521 Supported address families are (af1, af2, ..., afn)
Here (af1, af2, ..., afn) are the version numbers of the "next generation" or other protocol families the host supports π (Side note: someone suggested the families could also be written as ASCII strings π)
5. Rationale π
An explicit address family argument in the LPRT command and LPSV reply lets the Internet community experiment with lots of "next generation IP" and other network layer protocols, all inside one common FTP implementation framework β¨ It also allows a different address family on the command connection than on the data connection π¦
An explicit length indicator for the host address is needed because some of the IPNG alternatives use variable-length addresses π§ An explicit host address is needed too, because FTP says it's necessary π
Adding a length indicator for the port number isn't as obvious, and it definitely goes past the bare requirement of supporting TCP port numbers π
Right now at least one IPng alternative (TP/IX) supports longer port addresses π With the Internet getting more and more "multi-protocol," it's reasonable that somebody, somewhere, might want FTP to run over Appletalk, IPX, and OSI networks as well as TCP/IP networks π (In theory, FTP should run over any transport protocol that offers the same service as TCP.) Some of those transport protocols might offer transport selectors or port numbers longer than 16 bits, so a length indicator could be useful π₯ If FTP really does have to change to handle bigger network addresses, it could be wise to check right then whether the same flexibility is useful or needed for transport addresses too π«Ά
6. Conclusions πΈ
The mechanism defined here is simple and extensible, and it covers both the IPNG and the multi-protocol internet needs πβ¨
7. References π
- STD 9, RFC 959: Postel, J., and J. Reynolds, "File Transfer Protocol", STD 9, RFC 959, USC/Information Sciences Institute, October 1985.
- STD 2, RFC 1340: Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC 1340, USC/Information Sciences Institute, July 1992. (Does not include recently assigned IPv7 numbers).
- STD 3, RFC 1123: Braden, R., Editor, "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, USC/Information Sciences Institute, October 1989.
8. Security Considerations π
Security issues are not discussed in this memo π So if you're building on this, go in knowing it's not covered here, bestie π
9. Author's Address π¦
David M. Piscitello
Core Competence, Inc.
1620 Tuckerstown Road
Dresher, PA 19025
EMail: dave@corecom.com
π¦ where this page comes from
- ietf: rfc1639 1994-06
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms