Presentation is loading. Please wait.

Presentation is loading. Please wait.

File Transfer and access

Similar presentations


Presentation on theme: "File Transfer and access"— Presentation transcript:

1 File Transfer and access
FTP TFTP NFS

2 File Access and Transfer
To lower overall cost - centralized file server hand-held devices, diskless computers. To archive data (backup facility) Ability to share data across different programs, users, sites

3 Shared Access on-line access whole-file copying

4 On-line Shared Access on-line access
allowing multiple programs to access a single file concurrently. Changes to the file take immediate effect and available to all programs that access the file. -- on-line file sharing does not require a client program as a database system does. The operating system takes care of the remote file access as for local files. Which means the remote file system is 'integrated' with local files and the file system provides 'transparent access' to the remote files. Problems: 1. If the remote machine is not working or the network is down or during network congestion the program on the local machine does not work even though the machine is working. The application becomes unreliable. 2. Implementing transparent file access is difficult. -- This is because of heterogeneous environment file names available on one computer may not map into file namespace of another. -- ownership, authorization, protection will be difficult to handle. -- file operations and file representations vary from machine to machine and so difficult to implement all operations on all files

5 On-line Shared Access whole-file copying
a program gets only a local copy of the file, when accessed. If the program wants to modify, it makes changes and transfers the copy of the file to the original site. Whole-file transfer between heterogeneous machines can be difficult. -- Client and server have to agree on authorizations/ permissions and data formats. -- Different data formats make inverse translations impossible. e.g.: A and B machines use different presentations for floating point numbers , text files. floating point numbers -- it is impossible to convert format without losing some precision . text-- Variable-length lines in one system and fixed line lengths in another system - when file is copied to and from cause padding and lose the originality. -- Problems like the above can be handled by FTP.

6 Sharing By File Transfer
Whole file copying Client Contacts server Specifies file Specifies transfer direction Server Maintains set of files on local disk Waits for contact Honors request from client

7 File Transfer Protocol (FTP)
Major TCP/IP protocol for whole-file copying Uses TCP for transport Handles authorization, naming , representation among heterogeneous machines. Interactive access: provides user-friendly interface with 'help'. Format representation/specification: user can specify format of the data in the remote file -- text or binary etc. -- whether text files use ASCII character set etc. Authentication control: user has to supply name/password to the server to request a file.

8 File Transfer Protocol (FTP) - Features
Interactive access provides user-friendly interface with 'help'. Format representation/specification user can specify format of the data in the remote file text or binary etc. Authentication control name/password Handles authorization, naming , representation among heterogeneous machines.

9 FTP Process Model

10 FTP Process Model Control process uses control connection to request the data file. The data transfer process uses data transfer connection to receive the data. TCP is used in both connections on client and server side. Control connection is alive as long as user keeps FTP session open. Data transfer process is dynamic for each file request

11 FTP Process Model - Server
Most FTP servers allow concurrent access by several clients master process awaits connections creates a slave process to handle each connection

12 FTP Process Model - Server
slave process accepts requests through "control connection" . client’s control process and server's(slave) control process communicate using this connection. slave then creates data transfer connection to transfer data.

13 FTP Process Model - Client
Establish connection using control process FTP starts a new data transfer connection for each file transfer. When session is ended by client control connection, data transfer connection and the corresponding processes terminate.

14 FTP - TCP Port Number Assignment

15 Control Connection Vs. Data Connection
For data transfer, client side becomes server server side becomes client

16 Control Connection Vs. Data Connection
Client Creates process to handle data transfer Allocates port and sends number to server over control connection Process waits for contact

17 Control Connection Vs. Data Connection
Server Receives request Creates process to handle data transfer Process contacts client-side

18 Used for ‘‘open’’ FTP site (where all files are publicly available)
Anonymous FTP Login anonymous Password guest Used for ‘‘open’’ FTP site (where all files are publicly available) Typically used by browsers

19 TFTP (Trivial File Transfer Protocol )
Alternative to FTP Whole-file copying Reduced functionality from FTP Code is much smaller Can runs over UDP Diskless machine can use to obtain image at bootstrap

20 TFTP - Messages The mode field contains the
string "netascii", "octet", or "mail"

21 Data block is request for ACK ACK is request for next data block
TFTP Retransmission Symmetric both sides implement timeout and retransmission Data block is request for ACK ACK is request for next data block

22 Sorcerer’s Apprentice Bug
Consequence of symmetric retransmission Duplicate packet is perceived as second request, which generates another transmission Duplicate response triggers duplicate packets from the other end Cycle continue

23 Network File System (NFS)
Protocol for file access, not copying Developed by Sun Microsystems, now part of TCP/IP standards Transparent (application cannot tell that file is remote)

24 NFS Implementation NFS code in an operating system.
When an application program requests a file operation, the O.S. must pass the request to the local file system or to the NFS client software.


Download ppt "File Transfer and access"

Similar presentations


Ads by Google