FTP, TFTP, and NFS
LESSON 25
(December 1, 1995)
Daniel Z. Tabor Jr.
New Jersey Institute of Technology
File Sharing:
- Client / Server File Interaction:
- File sharing is used to reduce storage costs.
- Remote file access extends the reach of system resources, further leveraging these costs.
- Distributed file storage and remote access allows multiple users to work on and modify the same file from
anywhere on the network.
- There are two distinct forms of file sharing.
File Sharing:
On-line Access
- On-line access:
- Allows multiple programs to access a single file concurrently.
- This should be integrated with local files and access should be transparent.
- Advantage - no visible changes in the environment.
- Disadvantage - congested networks make file access slower.
File Sharing:
Whole-file Copying
- Whole-file copying:
- This transfer scheme requires a two-step process in which the user first obtains a local copy of a file and
then operates on it.
- This is not integrated with the local file-system and requires the use of a client program.
- Advantage - efficient manipulation operations.
- Disadvantage - applying updates to stored file on server.
File Sharing:
Requirements
- Both methods of file sharing are difficult with heterogeneous machines.
- They must agree on:
- Authorization.
- Notions of file ownership and access protections.
- Data formats.
File Sharing:
Version Control
- Another major concern when sharing files is version control:
- Each user may make changes either locally or shared remotely.
- The operating system must know which user’s changes to write first, and then notify all other users that
the file has now changed.
- This same issue plagues many different computer science areas.
File Transfer Protocol (FTP):
- File Transfer Protocol (FTP) - is a reliable file transfer protocol used within TCP/IP.
- It offers:
- Interactive access with a human friendly interface.
- File format specifications (ASCII, Binary)
- Authentication Control (including login names and passwords)
Control and Data Transfer Connections:
- FTP allows concurrent access by multiple clients, using the transmission control protocol.
- Slave processes are used in FTP to accept and handle the control connection from the client.
- However, they use an additional process (or processes) to handle the separate data transfer connection(s)
needed to send and receive files.
- Control processes and the control connection remain alive as long as the FTP "session" is going.
- A separate data transfer connection is setup and taken down for each file transfer.
- In addition to passing user commands to the server, FTP uses the control connection to allow the client
and server control processes to coordinate their use of:
- Dynamically assigned TCP protocol ports.
- The creation of data transfer processes that use those ports.
- FTP uses Telnet's Network Virtual Terminal specification when passing data across the control connection.
- The basic definition of service is only used, no option negotiation is allowed.
- Commonly, FTP is shown to conceptually reside above TELNET in a layered protocols stack, strictly for this
reason.
Interactive Transfer System:
- Interactive Transfer System (client performs operations repeatedly):
- Read a line of input.
- Parse the line to extract the command and arguments.
- Execute the command with it’s arguments.
Anonymous FTP:
- Anonymous FTP access means the user does not need an account or password, but can freely login to a remote
machine.
- Login name: Anonymous
- Password: Guest or full e-mail address.
Anonymous FTP:
Terminal-Based
- When anonymously logging into a remote site via an text-based connection, the user must explicitly
interact with the machine using a set of commands (? from prompt).
- To download a file, the user must:
- Login and send guest password
- Select the directory the file exists in.
- Change the transfer option based on file type.
- Explicitly get the file and then exit.
Anonymous FTP:
WWW-based
- When accessing a FTP server through a web client (Netscape), no interactive commands are needed.
- Differences between terminal and WWW access:
- No login required or file-type transfer option setting.
- Graphical traversal of subdirectories.
- No file uploading (PUT) allowed, only GET.
- Applications can be spawned locally based on file type transferred
.
Control and Error Information Messages:
- Control and error information messages between the FTP client and server begin with a 3-digit number followed by
text.
- The software interprets the number.
- The text is solely meant for humans.
- The PORT command, used by a client, reports that a new TCP port number has been obtained for use in a data
connection.
- The port number used for this connection increases each time a connection is made (by any client).
- To see more detailed interaction information, execute ftp with verbose mode on:
Trivial File Transfer Protocol (TFTP):
- Trivial File Transfer Protocol (TFTP) - This simple transfer protocol:
- Does not need a reliable stream transport service (uses UDP).
- Is intended for applications that do not need complex interactions between the client and server.
- TFTP:
- Restricts operations to small file transfers.
- Does not provide authentication.
- And is much smaller (software) than FTP.
TFTP:
Encoding and Transmission
- TFTP is commonly encoded in ROM (Read-Only Memory) on workstations and is used to obtain the
initial bootstrap memory image (BOOTP).
- A TFTP transmission is symmetric (implements a time-out and retransmission mechanism) which helps
ensure transfer will not fail after a single packet loss.
- Sorcerer’s Apprentice Bug:
- This anomaly arises when an ACK for data packet K is delayed, but not lost.
- It creates a cycle which continues indefinitely, with each packet transmitted at least twice.
- TFTP supports multiple file types and can be integrated with electronic mail.
Network File System (NFS):
- Network File System (Sun NFS):
- Provides on-line shared file access that is transparent and integrated within operating systems.
- NFS is usually embedded within the UNIX operating system and is commonly referred to NFS Mount.
- NFS refers to the complete family of products (Sun calls it Open Network Computing).
- NFS has been extended from UNIX to allow PCs to access other computers using PC-NFS.
- NFS provides a resource-sharing network system with similar features to Novell Netware or Microsoft LAN
Manager.
- The major difference is that NFS bases the major part of its functionality on the native O.S. available on the server
hosts.
- NFS is not proprietary, yet is just as if not more powerful than commercial resource-sharing systems.
- NFS is usually implemented over TCP/IP, but is not exclusive to it.
NFS Architecture:
- NFS is made up of three layers:
- RPC - which defines the format of messages used by remote procedure calls.
- XDR - the eXternal Data Representation is a consistent representation of data between different machine
architectures.
- NFS - the Network File System is an application interface for file transfer, access, and management.
Network File System (NFS):
| NFS |
| XDR |
| RPC |
| UDP | TCP |
| IP |
| Data Link |
| Physical |
- The functionality of the layers maps very closely to the OSI functionality available in its equivalent layers
(application, presentation, session).
- The operation of NFS is based on a stateless relationship between the client and server.
- NFS uses UDP and fixed retransmission time-outs to provide a low consistent delay over local area networks.
Remote Procedure Call (RPC):
- Remote Procedure Calls (RPC):
- These are general purpose remote execution mechanisms which hide all details of lower-level protocol use.
- They are used (in part) to implement NFS and other client / server programs.
- RPC is used in realizing distributed computing systems.
- RPC and distributed computing has the ability to reduce the amount of data transferred across a network,
especially where databases are concerned.
- The RPC protocol sends messages over the network to handle transactions, verification, and authorization.
RPC Message Specification:
- Transaction ID
- Call / Response
- RPC Protocol Version Number
- Program Number:
- Portmapper
- NFS
- Mountd
- Rstatd
|
- Program Version
Procedure Number
- Authorization
Information:
- User ID
- Group ID
- UNIX Machine Name
- Authorization Verification
- Procedure Call Parameters
|
External Data Representation (XDR):
- External Data Representation (XDR):
- Provides a way to pass data among heterogeneous machines without the need for conversion routines.
- A program using XDR must know (in advance) what type of data to expect and provision for it accordingly.
- In an OSI system, each value is labeled with its type and size.
- XDR defines data in multiples of four bytes (32-bits), which is a definition of how the data should formed
before network transmission.
- An NFS client formats data based on XDR so an NFS server will translate data into the form understood
by the destination computer.
- UNIX and PC operating systems use the combination of NFS, RPC, and XDR to provide distributed system
features.
All work was written, produced, and is copyrighted by Daniel Z. Tabor Jr.
Page created by Daniel Z. Tabor Jr.
Copyright ©1995 Illusion Industries Inc.