File Transfer

The file transfer application allows users to send or receive a copy of a data file. Access to data on remote files takes two forms: whole-file copying and shared online access.

FTP is the major file transfer protocol in the TCP/IP suite. TFTP provides a small, simple alternative to FTP for applications that need only file transfer. NFS provides online shared file access.

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. The FTP protocol is defined in RFC959. It is further defined in RFC 2227, 2640, 2773 for updated documentation. In transferring files from one system to another, two systems may have different ways to represent text and data.

Two systems may have different directory structures. All of these problems have been solved by FTP in a very simple and elegant way. FTP differs from other client–server applications in that it establishes two connections between the hosts. One connection is used for data transfer (port 20), the other for control information (port 21).

The control connection port remains open during the entire FTP session and is used to send control messages and client commands between the client and server. A data connection is established using an ephemeral port. The data connection is created each time a file is transferred between the client and server.

Separation of commands and data transfer makes FTP more efficient. FTP allows the client to specify whether a file contains text (ASCII or EBCDIC character sets) or binary integers.

FTP requires clients to authorise themselves by sending a log name and password to the server before requesting file transfers. Since FTP is used only to send and receive files, it is very difficult for hackers to exploit.

Trivial File Transfer Protocol (TFTP)

Trivial File Transfer Protocol (TFTP) is designed to simply copy a file without the need for all of the functionalities of the FTP protocol. TFTP is a protocol that quickly copies files because it does not require all the sophistication provided in FTP.

TFTP can read or write a file for the client. Since TFTP restricts operations to simple file transfer and does not provide authentication, TFTP software is much smaller than FTP.

Network File System (NFS)

The Network File System (NFS), developed by Sun Microsystems, provides online shared file access that is transparent and integrated. The file access mechanism accepts the request and automatically passes it to either the local file system software or to the NFS client, depending on whether the file is on the local disk or on a remote machine.

When it receives a request, the client software uses the NFS protocol to contact the appropriate server on a remote machine and performs the requested operation. When the remote server replies, the client software returns the results to the application program.

Since Sun’s Remote Procedure Call (RPC) and eXternal Data Representation (XDR) are defined separately from NFS, programmers can use them to build distributed applications.