File Transfer Protocol

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 18

File Transfer Protocol

Vijay P

Objective
It is one of the most widely used application layer protocol. It was designed for reliable and efficient transfer of files between any devices on a TCP/IP network. It operates using the TCP transport service for reliability.

Agenda
In this session we are going to discuss how FTP works in two subsection First, we discuss the key concepts behind the FTP function and discuss the operation in general terms. Second, we will discuss the Commands and Replies.

FTP Development and standards


In the early stage the developers divide the methods of TCP/IP network application into two categories: Direct network application (Telnet) let a user access a remote host and use it as if it were local. Indirect network application (FTP) getting resources from remote host and using them on the local system, then transferring back.

STANDARD
The standard is defined as the set basic command used in protocol to send a data from one host to another host. In 1971, the first standard used for ftp is RFC 114, 172, 256, In 1972, the first major revision was RFC 354 In 1973, the ftp specification looks remarkably similar to the one we use today. RFC 542 In 1980, the formal standard for modern tcp was published in RFC 765. In 1985, in addition to the RFC 765 several new commands were added and published as base specification for FTP, RFC 959

Overview of FTP operation


The gaol of ftp is to create the indirect use of network application, for moving files easily from one place to another place. The FTP operation is based upon the client/server model, with an FTP client on user machine by creating a connection to the FTP server to send and receive the data from the server. The main objective of FTP were to make the file transfer simple. To sheild the user from implementation details of how these file are moved from one place to another. To ensure that files are sent and received without data loss, FTP uses the reliable TCP in transport layer.

The FTP describes its overall operation using a conceptual tool called FTP model. This FTP model describes the devices that participate in file transfer by using the two logical communication channel used between the client and the server due to flexibility. Control connection and data connection CC This is the main logical tcp connection, were only control information is passed throught the session such as FTP commands and replies not the files. DC A distinct TCP data connection is established between the client and server were data is transferred over this connection.

FTP Operation Model

The FTP model divides the software into two logical protocol that are responsible for each channel. The Protocol Interpreter (PI) is a piece of software that is a charged with managing control connection. The Data Transfer Process (DTP) is responsible sending and receiving the data between the client and the server.

Server - FTP Process Component


Server Protocol interpreter (Server PI): It listens on the main reserved FTP-Port for incoming connection request from client. Once a connection is established, it receives command from the user PI, sends back the replies and manage the server data transfer process. Server Data Transfer Process (Server DTP): The DTP on the server side used to send or receive data to or from the User DTP. The Server-DTP may either establish a data connection or listen for a data connection coming from the user.

User- FTP Process component


User Protocol Interpreter (User-PI): The PI is responsible for managing the control connection on the client. It initiates the FTP session by sending a request to server-PI. It process the commands received from the user interface , sends them to the server- PI and receives back the reply. It also manages the user data transfer Proces. User Data Transfer Process (User-DTP): The DTP on the user side, which sends or receives data to or from the server-DTP. The user-dtp either establish a connection or listen for a data connetion coming from the server. It interacts with the client's device local system. User Interface (UI): It allows simpler user oriented command for FTP function rather than cryptic intenal commands. It allows results and information conveyed back to the user.

FTP Control Connection establishment

The user-PI initiates a TCP-connection from the user device to the server on a sepcial well-known TCP port21. Once the TCP has been set up, the control connection between the devices is established, commands to be sent from the User-PI to the Server-PI, and reply codes to be sent back in response. The server checks the user name and password against its user database, to verify that the connecting user has valid authority to access the server. If the information is valid, the server sends back a greeting to the client to indicate that the session is opened. Assuming that the authentication succeeds, the server then sets up the connection to allow the type of access to which the user is authorized.

FTP Data connection (Active)

In active FTP data connection, the server initiates the transfer of data by opening the data connection to the client. In this case, the client first sends a PORT command to tell the server to use port 1742. The server then opens the data connection from its default port number of 20 to client port 1742. Data is then exchanged between the devices using these ports.

FTP Data connection (Passive)

In a passive FTP data connection, the client uses the PASV command to tell the server to wait for the client to establish the data connection. The server responds, telling the client what port it should use on the server for the data transmission, in this case port 2223. The client then opens the data connection using that port number on the server and a client port number of its own choosing, in this case 1742

FTP Data Types


The ASCII type is used for text files, and allows them to be moved between systems with line-end codes converted automatically. The Image type is used for generic binary files, such as graphical images, ZIP files and other data

You might also like