File Transfer Protocol (FTP)
In Internet terms, The File Transfer Protocol, or FTP, has been around for a long time. First defined in RFC 172 written in June 1971, the protocol has been through several changes through to the current specification, which is defined in RFC 959. Again, while it's not the purpose of this book to describe every detail about FTP, it's worth looking at its basic operation to get a better understanding of how content switching can improve performance and reliability in FTP environments.
FTP exists primarily for the transfer of data between two end points. The RFC itself actually states that two of the objectives of the protocol are to "promote the sharing of files" and "transfer data reliably and
Using these two communication connections, two distinct modes of operation determine in which direction the connections are established: Active mode and Passive mode.
Active Mode FTP
Within an Active FTP session, the Control connection is established from the client to the server, with the Data connection established back from the server to the client. In order to do this, the client issues a PORT command to the server that contains the IP address and source and destination TCP ports that should be used during the Data connection. Figure 3-5 shows the lifecycle of an Active FTP session.
Figure 3-5. An active FTP session example.
As we can see from Figure 3-5, once the user has logged on with a valid username and password, the very first "data" that is passed ”in this case, a directory listing ”is carried using a separate data channel. The format for communicating the IP and TCP information of the data channel is as
PORT [Octet 1],[Octet 2],[Octet 3],[Octet 4], [TCP Port 8 Bytes],[TCP Port 8 Bytes]
Therfore, in the
In some instances, Active FTP can be
Passive Mode FTP
Passive mode FTP works similarly to Active mode FTP with one major exception: both the Control and Data connections within a Passive mode FTP session are established from the client to the server. To implement this, rather than use the PORT command, Passive mode FTP implements the PASV command, which instructs the server that it should listen for the incoming Data connection. Figure 3-6 shows the Passive mode FTP in more detail.
Figure 3-6. A Passive FTP session example.
In Figure 3-6, we can see that rather than the client dictating the parameters of the Data connection, it simply
RESPONSE 227 (10,10,10,10,41,38)
FTP ”Further Reading
For further information on the detailed workings of FTP, it's worth looking at RFC 959.