SlideShare uma empresa Scribd logo
1 de 12
File Transfer Protocol (FTP) 
File Transfer Protocol (FTP) is the standard mechanism 
provided by TCP/IP for copying a file from one host to 
another. 
Although transferring files from one system to another 
seems simple and straightforward, some problems must be 
dealt with first. For example, 
•Two systems may use different file name conventions. 
•Two systems may have different ways to represent text and 
data. 
•Two systems may have different directory structures. 
All these problems have been solved by FTP in a very 
simple and elegant approach.
FTP differs from other client/server applications in that it 
establishes two connections between the hosts. 
One connection is used for data transfer, the other for 
controlinformation (commands and responses). 
Separation of commands and data transfer makes FTP 
more efficient. 
The control connection uses very simple rules of 
communication. 
We need to transfer only a line of command or a line of 
response at a time.
The data connection, on the other hand, needs more 
complex rules due to the variety of data types transferred. 
However, the difference in complexity is at the FTP level, 
not TCP. 
For TCP, both connections are treated the same. 
FTP uses two well-known TCP ports: 
Port 21 is used for the control connection, 
port 20 is used for the data connection.
Figure shows the basic model of FTP. The client has 
three components: 
•User interface, 
•client control process, 
•client data transfer process. 
The server has two components: 
•the server control process 
•the server data transfer process. 
The control connection is made between the control 
processes. 
The data connection is made between the data transfer 
processes.
The control connection remains connected during the 
entire interactive FTP session. 
The data connection is opened and then closed for each 
file transferred. It opens each time commands that 
involve transferring files are used, and it closes when 
the file is transferred. 
In other words, when a user starts an FTP session, the 
control connection opens. While the control connection 
is open, the data connection can be opened and 
closed multiple times if several files are transferred.
Communication over Control Connection 
FTP uses the same approach as SMTP to communicate 
across the control connection. It uses the 7-bit ASCII 
character set (see Figure 26.22). Communication is 
achieved through commands and responses. This 
simple method is adequate for the control connection 
because we send one command (or response) at a time. 
Each command or response is only one short line, so 
we need not worry about file format or file structure. 
Each line is terminated with a end-of-line token.
Communication over Data Connection 
The purpose of the data connection is different from that of the 
control connection. We want to transfer files through the data 
connection. File transfer occurs over the data connection under 
the control of the commands sent over the control connection. 
However, file transfer in FTP means one of three things: 
•A file is to be copied from the server to the client. This is 
called retrieving a file. It is done under the supervision of 
the RETR command, 
• A file is to be copied from the client to the server. This is 
called storing a file. It is done under the supervision of the 
STOR command. 
•A list of directory or file names is to be sent from the 
server to the client. This is done under the supervision of 
the LIST command. FTP treats a list of directory or file names as a 
file. It is sent over the data connection.
Before sending the file through the data connection, we prepare for 
transmission through the control connection. The heterogeneity 
problem is resolved by defining three attributes of communication: 
file type, data structure, and transmission mode. 
File Type FTP can transfer one of the following file types across the 
data connection: an ASCII file, EBCDIC file, or image file. 
The ASCII file is the default format for transferring text files. Each 
character is encoded using 7-bit ASCII. The sender transforms the 
file from its own representation into ASCII characters, and the 
receiver transforms the ASCII characters to its own representation. If 
one or both ends of the connection use EBCDIC encoding, the file 
can be transferred using EBCDIC encoding. The image file is the 
default format for transferring binary files. The file is sent as 
continuous streams of bits without any interpretation or encoding. 
This is mostly used to transfer binary files such as compiled 
programs.
Data Structure : FTP can transfer a file across the 
data connection by using one of the following 
interpretations about the structure of the data: 
file structure, 
record structure, 
and page structure. 
In the file structure format, the file is a continuous 
stream of bytes. In the record structure, the file is 
divided into records. This can be used only with text 
files. In the page structure, the file is divided into 
pages, with each page having a page number and a 
page header. The pages can be stored and accessed 
randomly or sequentially.
Transmission Mode FTP can transfer a file across the data 
connection by using one of the following three 
transmission modes: stream mode, block mode, and 
compressed mode. 
The stream mode is the default mode. Data are delivered 
from FTP to TCP as a continuous stream of bytes. 
In block mode, data can be delivered from FTP to TCP in 
blocks. In this case, each block is preceded by a 3-byte 
header. The first byte is called the block descriptor; the 
next 2 bytes define the size of the block in bytes. 
In the compressed mode, if the file is big, the data can be 
compressed.
Anonymous FTP 
To use FTP, a user needs an account (user name) and a 
password on the remote server. 
Some sites have a set of files available for public access, 
to enable anonymous FTP. To access these files, a user 
does not need to have an account or password. Instead, 
the user can use anonymous as the user name and guest 
as the password. 
User access to the system is very limited. Some sites 
allow anonymous users only a subset of commands. For 
example, most sites allow the user to copy some files, but 
do not allow navigation through the directories.

Mais conteúdo relacionado

Mais procurados (20)

Protocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol SuiteProtocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol Suite
 
Protocols
ProtocolsProtocols
Protocols
 
Using an FTP client - Client server computing
Using an FTP client -  Client server computingUsing an FTP client -  Client server computing
Using an FTP client - Client server computing
 
TCP/ IP
TCP/ IP TCP/ IP
TCP/ IP
 
Firewalls
FirewallsFirewalls
Firewalls
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 
Introduction to Application layer
Introduction to Application layerIntroduction to Application layer
Introduction to Application layer
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake
 
Ftp
FtpFtp
Ftp
 
TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer Description
 
Chapter 14 - Protection
Chapter 14 - ProtectionChapter 14 - Protection
Chapter 14 - Protection
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
TCP/IP Protocol Architeture
TCP/IP Protocol ArchitetureTCP/IP Protocol Architeture
TCP/IP Protocol Architeture
 
TCP/IP – Transmission Control Protocol/ Internet Protocol
TCP/IP – Transmission Control Protocol/ Internet ProtocolTCP/IP – Transmission Control Protocol/ Internet Protocol
TCP/IP – Transmission Control Protocol/ Internet Protocol
 
Simple Network Management Protocole
Simple Network Management ProtocoleSimple Network Management Protocole
Simple Network Management Protocole
 
TCP/IP Model
TCP/IP ModelTCP/IP Model
TCP/IP Model
 
Simple Network Management Protocol
Simple Network Management ProtocolSimple Network Management Protocol
Simple Network Management Protocol
 
FTP
FTPFTP
FTP
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 

Destaque

File transfer protocol (ftp)
File transfer protocol (ftp)File transfer protocol (ftp)
File transfer protocol (ftp)Cort1026
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer ProtocolPeter R. Egli
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocolguest029bcd
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)Raghu nath
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer ProtocolOm Prakash
 
Presentation on telnet
Presentation on telnetPresentation on telnet
Presentation on telnetAmandeep Kaur
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report SlidesBassam Kanber
 
Telnet & Secure Shell
Telnet & Secure ShellTelnet & Secure Shell
Telnet & Secure ShellWILLA REYES
 
09 telnet, remote dan ftp
09 telnet, remote dan ftp09 telnet, remote dan ftp
09 telnet, remote dan ftpNurul Hudin
 
TCP - IP Presentation
TCP - IP PresentationTCP - IP Presentation
TCP - IP PresentationHarish Chand
 
Instalación ftp, telnet y ssh sobre linux
Instalación ftp, telnet y ssh sobre linuxInstalación ftp, telnet y ssh sobre linux
Instalación ftp, telnet y ssh sobre linuxGer Hernandez
 
Protocols in computer network
Protocols in computer network   Protocols in computer network
Protocols in computer network priya sehgal
 
File Transfer protocols
File Transfer protocolsFile Transfer protocols
File Transfer protocolsAayushi Pareek
 

Destaque (20)

File transfer protocol (ftp)
File transfer protocol (ftp)File transfer protocol (ftp)
File transfer protocol (ftp)
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer Protocol
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
Presentation on telnet
Presentation on telnetPresentation on telnet
Presentation on telnet
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
 
Electronic Mail
Electronic MailElectronic Mail
Electronic Mail
 
7 5-94-101
7 5-94-1017 5-94-101
7 5-94-101
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report Slides
 
FTP & TFTP
FTP & TFTPFTP & TFTP
FTP & TFTP
 
Telnet & Secure Shell
Telnet & Secure ShellTelnet & Secure Shell
Telnet & Secure Shell
 
09 telnet, remote dan ftp
09 telnet, remote dan ftp09 telnet, remote dan ftp
09 telnet, remote dan ftp
 
Report on telnet
Report on telnetReport on telnet
Report on telnet
 
TCP - IP Presentation
TCP - IP PresentationTCP - IP Presentation
TCP - IP Presentation
 
Email
EmailEmail
Email
 
Instalación ftp, telnet y ssh sobre linux
Instalación ftp, telnet y ssh sobre linuxInstalación ftp, telnet y ssh sobre linux
Instalación ftp, telnet y ssh sobre linux
 
Protocols in computer network
Protocols in computer network   Protocols in computer network
Protocols in computer network
 
File Transfer protocols
File Transfer protocolsFile Transfer protocols
File Transfer protocols
 
Chap 19 ftp & tftp
Chap 19 ftp & tftpChap 19 ftp & tftp
Chap 19 ftp & tftp
 

Semelhante a Ftp

File tranfer protocol
File tranfer protocolFile tranfer protocol
File tranfer protocolKunalThorat9
 
File transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationFile transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationRochakSrivastava3
 
Computer network
Computer networkComputer network
Computer networkPihu Goel
 
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptx
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptxUnit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptx
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptxAdityaEM08
 
File Transfer Protocol (FTP)
File Transfer Protocol (FTP)File Transfer Protocol (FTP)
File Transfer Protocol (FTP)AxelXrest
 
filetranferprotocolseminarpresentation.pptx
filetranferprotocolseminarpresentation.pptxfiletranferprotocolseminarpresentation.pptx
filetranferprotocolseminarpresentation.pptxDSPL
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocolAmandeep Kaur
 
FILE TRANSFER PROTOCOL.pptx
FILE TRANSFER PROTOCOL.pptxFILE TRANSFER PROTOCOL.pptx
FILE TRANSFER PROTOCOL.pptxsatvikkushwaha1
 
Telnet and FTP.ppt
Telnet and FTP.pptTelnet and FTP.ppt
Telnet and FTP.pptssuser1774d3
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptxazmerawAnna1
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer ProtocolVinh Nguyen
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptxkebeAman
 
Group20 Dynamic Networks
Group20 Dynamic NetworksGroup20 Dynamic Networks
Group20 Dynamic Networkshariprasadnr
 
File transfer protocol- Gowdham
File transfer protocol- GowdhamFile transfer protocol- Gowdham
File transfer protocol- GowdhamGowdham P
 
W14webposter
W14webposterW14webposter
W14webposters1150245
 

Semelhante a Ftp (20)

File tranfer protocol
File tranfer protocolFile tranfer protocol
File tranfer protocol
 
FILE TRANSFER PROTOCOL (FTP)
FILE TRANSFER PROTOCOL (FTP)FILE TRANSFER PROTOCOL (FTP)
FILE TRANSFER PROTOCOL (FTP)
 
File transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationFile transfer protocol (ftp) in application
File transfer protocol (ftp) in application
 
Computer network
Computer networkComputer network
Computer network
 
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptx
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptxUnit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptx
Unit 5 Email FTP Rks.pps.ppt_20240425_112130_0000.pptx
 
File Transfer Protocol (FTP)
File Transfer Protocol (FTP)File Transfer Protocol (FTP)
File Transfer Protocol (FTP)
 
filetranferprotocolseminarpresentation.pptx
filetranferprotocolseminarpresentation.pptxfiletranferprotocolseminarpresentation.pptx
filetranferprotocolseminarpresentation.pptx
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocol
 
FILE TRANSFER PROTOCOL.pptx
FILE TRANSFER PROTOCOL.pptxFILE TRANSFER PROTOCOL.pptx
FILE TRANSFER PROTOCOL.pptx
 
Telnet and FTP.ppt
Telnet and FTP.pptTelnet and FTP.ppt
Telnet and FTP.ppt
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptx
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptx
 
Group20 Dynamic Networks
Group20 Dynamic NetworksGroup20 Dynamic Networks
Group20 Dynamic Networks
 
File transfer protocol- Gowdham
File transfer protocol- GowdhamFile transfer protocol- Gowdham
File transfer protocol- Gowdham
 
lecture 4.pptx
lecture 4.pptxlecture 4.pptx
lecture 4.pptx
 
Chapter#4
Chapter#4Chapter#4
Chapter#4
 
An Introduction to HTTP
An Introduction to HTTPAn Introduction to HTTP
An Introduction to HTTP
 
Tcp/Ip Model
Tcp/Ip ModelTcp/Ip Model
Tcp/Ip Model
 
W14webposter
W14webposterW14webposter
W14webposter
 

Mais de Nitesh Singh

Risk taking and emotions
Risk taking and emotionsRisk taking and emotions
Risk taking and emotionsNitesh Singh
 
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SADProject report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SADNitesh Singh
 
The real comedy behind comedy
The real comedy behind comedyThe real comedy behind comedy
The real comedy behind comedyNitesh Singh
 
Project report Rs Dry celaners
Project report Rs Dry celaners Project report Rs Dry celaners
Project report Rs Dry celaners Nitesh Singh
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layerNitesh Singh
 
Ta 104-topology (1)
Ta 104-topology (1)Ta 104-topology (1)
Ta 104-topology (1)Nitesh Singh
 

Mais de Nitesh Singh (20)

Risk taking and emotions
Risk taking and emotionsRisk taking and emotions
Risk taking and emotions
 
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SADProject report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
 
The real comedy behind comedy
The real comedy behind comedyThe real comedy behind comedy
The real comedy behind comedy
 
Project report Rs Dry celaners
Project report Rs Dry celaners Project report Rs Dry celaners
Project report Rs Dry celaners
 
BIG DATA ANALYSIS
BIG DATA ANALYSISBIG DATA ANALYSIS
BIG DATA ANALYSIS
 
Udp vs-tcp
Udp vs-tcpUdp vs-tcp
Udp vs-tcp
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layer
 
Routers vs-switch
Routers vs-switchRouters vs-switch
Routers vs-switch
 
New udp
New udpNew udp
New udp
 
I pv4 format
I pv4 formatI pv4 format
I pv4 format
 
I pv4 addressing
I pv4 addressingI pv4 addressing
I pv4 addressing
 
Hub vs-switch
Hub vs-switchHub vs-switch
Hub vs-switch
 
Email ftp
Email ftpEmail ftp
Email ftp
 
Www and http
Www and httpWww and http
Www and http
 
Transmission main
Transmission mainTransmission main
Transmission main
 
Ta 104-topology
Ta 104-topologyTa 104-topology
Ta 104-topology
 
Ta 104-topology (1)
Ta 104-topology (1)Ta 104-topology (1)
Ta 104-topology (1)
 
Ta 104-tcp
Ta 104-tcpTa 104-tcp
Ta 104-tcp
 
Ta 104-media-3
Ta 104-media-3Ta 104-media-3
Ta 104-media-3
 
Ta 104-media-2
Ta 104-media-2Ta 104-media-2
Ta 104-media-2
 

Ftp

  • 1. File Transfer Protocol (FTP) File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another. Although transferring files from one system to another seems simple and straightforward, some problems must be dealt with first. For example, •Two systems may use different file name conventions. •Two systems may have different ways to represent text and data. •Two systems may have different directory structures. All these problems have been solved by FTP in a very simple and elegant approach.
  • 2. FTP differs from other client/server applications in that it establishes two connections between the hosts. One connection is used for data transfer, the other for controlinformation (commands and responses). Separation of commands and data transfer makes FTP more efficient. The control connection uses very simple rules of communication. We need to transfer only a line of command or a line of response at a time.
  • 3. The data connection, on the other hand, needs more complex rules due to the variety of data types transferred. However, the difference in complexity is at the FTP level, not TCP. For TCP, both connections are treated the same. FTP uses two well-known TCP ports: Port 21 is used for the control connection, port 20 is used for the data connection.
  • 4. Figure shows the basic model of FTP. The client has three components: •User interface, •client control process, •client data transfer process. The server has two components: •the server control process •the server data transfer process. The control connection is made between the control processes. The data connection is made between the data transfer processes.
  • 5.
  • 6. The control connection remains connected during the entire interactive FTP session. The data connection is opened and then closed for each file transferred. It opens each time commands that involve transferring files are used, and it closes when the file is transferred. In other words, when a user starts an FTP session, the control connection opens. While the control connection is open, the data connection can be opened and closed multiple times if several files are transferred.
  • 7. Communication over Control Connection FTP uses the same approach as SMTP to communicate across the control connection. It uses the 7-bit ASCII character set (see Figure 26.22). Communication is achieved through commands and responses. This simple method is adequate for the control connection because we send one command (or response) at a time. Each command or response is only one short line, so we need not worry about file format or file structure. Each line is terminated with a end-of-line token.
  • 8. Communication over Data Connection The purpose of the data connection is different from that of the control connection. We want to transfer files through the data connection. File transfer occurs over the data connection under the control of the commands sent over the control connection. However, file transfer in FTP means one of three things: •A file is to be copied from the server to the client. This is called retrieving a file. It is done under the supervision of the RETR command, • A file is to be copied from the client to the server. This is called storing a file. It is done under the supervision of the STOR command. •A list of directory or file names is to be sent from the server to the client. This is done under the supervision of the LIST command. FTP treats a list of directory or file names as a file. It is sent over the data connection.
  • 9. Before sending the file through the data connection, we prepare for transmission through the control connection. The heterogeneity problem is resolved by defining three attributes of communication: file type, data structure, and transmission mode. File Type FTP can transfer one of the following file types across the data connection: an ASCII file, EBCDIC file, or image file. The ASCII file is the default format for transferring text files. Each character is encoded using 7-bit ASCII. The sender transforms the file from its own representation into ASCII characters, and the receiver transforms the ASCII characters to its own representation. If one or both ends of the connection use EBCDIC encoding, the file can be transferred using EBCDIC encoding. The image file is the default format for transferring binary files. The file is sent as continuous streams of bits without any interpretation or encoding. This is mostly used to transfer binary files such as compiled programs.
  • 10. Data Structure : FTP can transfer a file across the data connection by using one of the following interpretations about the structure of the data: file structure, record structure, and page structure. In the file structure format, the file is a continuous stream of bytes. In the record structure, the file is divided into records. This can be used only with text files. In the page structure, the file is divided into pages, with each page having a page number and a page header. The pages can be stored and accessed randomly or sequentially.
  • 11. Transmission Mode FTP can transfer a file across the data connection by using one of the following three transmission modes: stream mode, block mode, and compressed mode. The stream mode is the default mode. Data are delivered from FTP to TCP as a continuous stream of bytes. In block mode, data can be delivered from FTP to TCP in blocks. In this case, each block is preceded by a 3-byte header. The first byte is called the block descriptor; the next 2 bytes define the size of the block in bytes. In the compressed mode, if the file is big, the data can be compressed.
  • 12. Anonymous FTP To use FTP, a user needs an account (user name) and a password on the remote server. Some sites have a set of files available for public access, to enable anonymous FTP. To access these files, a user does not need to have an account or password. Instead, the user can use anonymous as the user name and guest as the password. User access to the system is very limited. Some sites allow anonymous users only a subset of commands. For example, most sites allow the user to copy some files, but do not allow navigation through the directories.