FTP (File Transfer Protocol)
FTP stands for File Transfer Protocol. It is used to send/receive file from the remote computer. It is defined in RFC959. FTP establishes two connections between client system and server system, one for control information and the other for data to be transfered. Control information carry commands/response. Authentication need to be done initially by way of validating username and password. Once it is done files can be transferred between two systems. FTP handles both binary and text format files.
When a FTP client requests to connect to the FTP server, a TCP connection is being established to the FTP server's port 21 reserved for FTP. After authentication is done, another TCP connection is being established for the actual data transfer on port number 20.
get,put are popular FTP commands. In order to avoid use of commands there are GUI based FTP applications have been developed, one of the popular application I have come across is FTP commander PRO another and another application is FileZilla.
The command is used to start the FTP client program. we can type ftp alone or follow it with IP address or domain name.
It is used to change user ID and password information of current session. User is prompted to enter username and password when user types ftp command.
It displays ftp commands available on ftp client.
It displays contents of the directory.
It is used to switch ftp client to ascii transfer mode from binary mode
It is used to switch ftp client to binary transfer mode from default ascii mode
This command displays current mode of the file transfer set(either ascii or binary)
displays current set configurations on the FTP client
This command is used to retrieve a single file from ftp server to ftp client
helps retrieve multiple files from the server
The command is used to transfer a file from ftp client to the ftp server
helps transfer multiple files from client to the server
It allows to open new session with the server
It ends the current session running with the ftp server
Either of these command can be used to close the current session and terminates the client
Advantages of FTP:
Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest way to transfer the files from one computer to another computer.
Efficient: It is more efficient as we do not need to complete all the operations to get the entire file.
Security: To access the FTP server, we need to login with the username and password. Therefore, we can say that FTP is more secure.
Back & forth movement: FTP allows us to transfer the files back and forth. Suppose you are a manager of the company, you send some information to all the employees, and they all send information back on the same server.
Disadvantages of FTP:
The standard requirement of the industry is that all the FTP transmissions should be encrypted. However, not all the FTP providers are equal and not all the providers offer encryption. So, we will have to look out for the FTP providers that provides encryption.
FTP serves two operations, i.e., to send and receive large files on a network. However, the size limit of the file is 2GB that can be sent. It also doesn't allow you to run simultaneous transfers to multiple receivers.
Passwords and file contents are sent in clear text that allows unwanted eavesdropping. So, it is quite possible that attackers can carry out the brute force attack by trying to guess the FTP password.
It is not compatible with every system.
TFTP (Trivial File Transfer Protocol)
TFTP stands for Trivial File Transfer Protocol. It is defined in RFC783. It is simpler than FTP, does file transfer between client and server process but does not provide user authentication and other useful features supported by FTP. TFTP uses UDP while FTP uses TCP.
As TFTP is unreliable protocol due to UDP, it uses application layer recovery supported by UDP. This is done by embedding a small header between the UDP header and the data. This header incorporates codes for example read,write and acknowledgement along with numbering scheme which numbers 512 bytes of data. These block numbers provided are used to acknowledge the receipt and re-send the data in case of checksum failures. TFTP sends one block and waits on acknowledgement before sending another block.
Print help information
Shorthand for mode ascii.
Shorthand for mode binary.
Set the host (and optionally port) for transfers. Note that the TFTP protocol, unlike the FTP protocol, does not maintain connections between transfers; thus, the connect command does not actually create a connection, but merely remembers what host is to be used for transfers. You do not have to use the connect command; the remote host can be specified as part of the get or put commands.
Get remotefile localfile
Get file 1 file 2 file 3....
Get a file or set of files from the specified sources. A remote filename can be in one of two forms: a plain filename on the remote host, if the host has already been specified, or a string of the form host:filename to specify both a host and filename at the same time. If the latter form is used, the last hostname specified becomes the default for future transfers. Enable literal mode to prevent special treatment of the ’:’ character (e.g. C:\dir\file).
Toggle literal mode. When set, this mode prevents special treatment of ’:’ in filenames.
Specify the mode for transfers; transfer-mode may be one of ascii (or netascii) or binary (or octet.) The default is ascii.
Put localfile remotefile
Put file 1 file 2 file 3 ....
Put a file or set of files to the specified remote file or directory. The destination can be in one of two forms: a filename on the remote host, if the host has already been specified, or a string of the form host:filename to specify both a host and filename at the same time. If the latter form is used, the hostname specified becomes the default for future transfers. If the remote-directory form is used, the remote host is assumed to be a UNIX system or another system using / as directory separator. Enable literal mode to prevent special treatment of the ’:’ character (e.g. C:\dir\file).
Exit tftp. End-of-file will also exit.
Set the per-packet retransmission timeout, in seconds.
Show current status.
Set the total transmission timeout, in seconds.
Toggle packet tracing (a debugging feature.)
Toggle verbose mode.
It is fast File Transfer Protocol
Network device configuration files can be easily transferred with this protocol
It can be easily used with 3rd software on Windows and Linux Operating Systems
It is recommended to use this protocol
Uses UDP as the Transport protocol (Unlike FTP using TCP port 21).
Used to Read or Write files from the remote server
It supports three different transmission modes : "netascii", "octet" and "mail".
Its is an unsecured FTP
Does not provide file security compared to FTP
Performs file transfer and file transfer only
There is no authentication or encryption mechanism.
It does not list the contents of directories.
Difference Between FTP and TFTP
FTP (File Transfer Protocol) TFTP (Trivial Transfer Protocol)
It uses TCP port numbers 20 and 21.
It uses UDP port number 69.
It uses TCP as transport layer protocol.
It uses UDP as transport layer protocol.
FTP uses robust control commands.
TFTP uses simple control commands.
It sends data over a separate TCP connection from control commands
It uses no connections because UDP is connectionless protocol.
It requires more memory and programming effort.
It requires less memory and programming effort.
It is specified in RFC959 document.
It is specified in RFC783 document.
The Tech Platform