FTP 07f
FTP 07f
[email protected]
Overview
File Transfer Protocol (RFC 959)
• Why FTP?
• FTP’s connections
• FTP in action
• FTP commands/responses
Trivial File Transfer Protocol (RFC 1350)
• TFTP and TFTP’s message formats
• FTP and TFTP compared
Why do we need a FTP
Service?
Purpose: To Transfer files between two computers
Goals of FTP Service
• Promote sharing of files (programs and/or data)
• Encourage indirect/implicit use of remote computers
• Shield users from variations in file storage among hosts
• Transfer data reliably and efficiently
Problems of File Transfer
User Server
Protocol Control Protocol
Interpreter Connection Interpreter
User Server
Protocol Control Protocol
Interpreter Connection Interpreter
Passive open on
Port 5001
User Data Server
Data Transfer Data Transfer
Function Connection Function
Establish Data
FTP’s 2 Connections – Connection
Closing
bye
client
User
Interface
221
QUITService Closing
server
User Server
Protocol Control Protocol
Interpreter Connection Interpreter
ACK
220 Service Ready
ACK
ftp> USER lucasb
ACK
331 User OK,password?
ACK
ftp> PASS mypass
ACK
230 User login OK
ACK
FTP Data Transfer
Client Server
PORT 128,4,40,17,19,137 Eph
Command Description
get filename Retrieve file from server
Command Description
LIST [filelist ] List files or directories (ls / dir)
x4 z Unspecified
x5 z Filesystem status
Example FTP Responses
User Server
Protocol Control Protocol
Interpreter Connection Interpreter
Passive open on
Port 5125
User Data Server
Data Transfer Data Transfer
Function Connection Function
Establish Data
Trivial FTP (TFTP)
ACK 8
FTP vs. TFTP
FTP TFTP
2 connections: control 1 connection (69), stop
(21) and data (20) and wait flow
Reliable service using Uses UDP, handles own
TCP retransmissions
Many commands 5 message types, only
reads/writes files
Minimal security using No logon or security
logon procedure
Larger code size, full- Lightweight, designed to
featured fit on ROM