Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX IPFilter Version A.03.05.12 Administrator's Guide: HP-UX 11.0, HP-UX 11i version 1,HP-UX 11i version 2 > Chapter 6 IPFilter and FTP

FTP Basics

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The File Transfer Protocol (FTP) is a user-level protocol for transferring files between host computers.

An FTP session involves two separate connections:

  • Control connection

    1. The server listens for client connections on port 21.

    2. The client opens a connection to the server port 21 on a client port above 1023.

    3. The client uses this connection to send commands to, and receive replies from, the server.

      This connection lasts through the FTP session.

  • Data connection

    The data connection is used for transferring data between the client and server. A new data connection is opened for each FTP command. The way the data connection is created depends on the type of FTP session—active or passive.

In active FTP, the client actively opens a connection to the FTP server at port 21. It uses a port number > 1023 as its port for the control connection. The client then opens a new port (passive open) as its data port and sends this port number across to the server using the PORT command. The server then opens a data connection (active open) to the data port specified in the PORT command of the client. The server uses port 20 as its data connection port.

In passive FTP, the control connection is established the same as it is in active FTP. In passive FTP, to establish a data connection the server opens an arbitrary data port >1023. It uses the PASV command to send the data port number to the client. The client connects to the port specified by the PASV command and uses a different port >1023 as its data port.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2001-2005 Hewlett-Packard Development Company, L.P.