File Transfer Protocol (FTPA
1 File Transfer Protocol (FTP)
CONTENTS · CONNECTIONS COMMUNICATION COMMAND PROCESSING · FILE TRANSFER SIMPLE FTP-Assignment
2 CONTENTS • CONNECTIONS • COMMUNICATION • COMMAND PROCESSING • FILE TRANSFER • SIMPLE FTP -- Assignment
File Transfer Protocols(FTP) o Transferring files from one computer to another o Using two connections between hosts OOne for data transfer OOne for control information o Three components for clients: user interface client control process and client data transfer process o Two components for servers: server control process and server data transter process
3 File Transfer Protocols (FTP) ⚫Transferring files from one computer to another ⚫Using two connections between hosts One for data transfer One for control information ⚫Three components for clients: user interface, client control process, and client data transfer process ⚫Two components for servers: server control process and server data transfer process
Note FTP uses the services of TCP It needs two TCP connections The well-known port 21 is used for the control connection and the well-known port 20 for the data connection
4 FTP uses the services of TCP. It needs two TCP connections. The well-known port 21 is used for the control connection and the well-known port 20 for the data connection
User interface Control connection Control Control process process TCP/IP Data transfer Data transfer process process Data connection Client Server The control connection remains connected during the entire interactive ftp session the data connection is opened and then closed for each file transferred Figure 20-1
5 Figure 20-1 The control connection remains connected during the entire interactive FTP session; the data connection is opened and then closed for each file transferred
CONNECTIONS
6 CONNECTIONS
Connections- Control Connection o Created in the same ways as other applications O Server issues a passive open on port 2 1 and waits O Clients uses an ephemeral port and issues an active open o Remains open during the entire process o Needs minimize delay for service
7 Connections – Control Connection ⚫Created in the same ways as other applications Server issues a passive open on port 21 and waits Clients uses an ephemeral port and issues an active open ⚫Remains open during the entire process ⚫Needs minimize delay for service
Passive open Control 21 Control process ocess Data transfer Data transfer process process Client Server a Passive open by server Active open Control 62010 21 Control process process Data transfer Data transfer rocess p rocess Client Server b. active open by clien Figure 20-2
8 Figure 20 - 2
Connection -Data Connection o Uses the port 20 usually at the server side o Creation of a data connection includes O Client issues a passive open using an ephemeral port O Client sends this port number to the server using PORT cOmmand O Server receives the port number and issues an active open using the well-known port
9 Connection – Data Connection ⚫Uses the port 20 usually at the server side ⚫Creation of a data connection includes Client issues a passive open using an ephemeral port Client sends this port number to the server using PORT command Server receives the port number and issues an active open using the well-known port
Control Control 62010 process process Data transfer Data transfer 63000 Passive proces open process Client rvel a. Passive open by client PORT 6300Q Control 62010 Control proces process Data transfer 63000Passive Data transfer process process Client erver b. Sending ephemeral port number to server Control Control 62010 process process Data transfer 63000 Data transfer process process Client S A ctive open by serv Figure 20-5
Figure 20-3