Presentation is loading. Please wait.

Presentation is loading. Please wait.

File Transfer And Access Chapter 26 Chapter 26 Group 3 Presentation Deepak Mittal Nishit Ranjan Venugopal Janapati Amit Palshikar Ref: Internetworking.

Similar presentations


Presentation on theme: "File Transfer And Access Chapter 26 Chapter 26 Group 3 Presentation Deepak Mittal Nishit Ranjan Venugopal Janapati Amit Palshikar Ref: Internetworking."— Presentation transcript:

1 File Transfer And Access Chapter 26 Chapter 26 Group 3 Presentation Deepak Mittal Nishit Ranjan Venugopal Janapati Amit Palshikar Ref: Internetworking with TCP/IP by D.E.Comer by D.E.Comer

2 Introduction FILE TRANSFER & FILE ACCESS are parts of TCP/IP suite. In this chapter -- Design and User Interface for these application protocols.

3 Designs for File Access and Transfer To lower overall cost - use - 'centralized file server' -- Users have inexpensive computers with no disk space, e.g.. hand-held devices, diskless computers.  To lower overall cost - use - 'centralized file server' -- Users have inexpensive computers with no disk space, e.g.. hand-held devices, diskless computers.  To archive data (backup facility) -- use -- 'centralized computer' - users have computers with disk storage. Users send periodically, copies of files to the backup computer. -- to recover files in case of loss at local computer.  Ability to share data across different programs, users, sites -- to share data of a single on-line database across organization.

4 On-line Shared Access file sharing : 2 types - 1. 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. 2. 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.

5 Online File Access & problems -- on-line file sharing does not require a client program as a database system does. a database system does. The operating system takes care of the remote file access The operating system takes care of the remote file access as for local files. Which means the remote file system is as for local files. Which means the remote file system is 'integrated' with local files and the file system provides 'integrated' with local files and the file system provides 'transparent access' to the remote files. '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 down or during network congestion the program on the local machine does not work even though the the local machine does not work even though the machine is working. The application becomes unreliable. machine is working. The application becomes unreliable.

6 Online File Access & problems... 2. Implementing transparent file access is difficult. -- This is because of heterogeneous environment file names available on one computer may not map into names available on one computer may not map into file namespace of another. file namespace of another. -- ownership, authorization, protection will be difficult to handle. handle. -- file operations and file representations vary from machine to machine and so difficult to implement all machine to machine and so difficult to implement all operations on all files operations on all files

7 Whole-file Sharing by file transfer Whole-file Sharing by file transfer -- user uses a client program to obtain a copy of the file and operate on it. and operate on it. -- operation outside the file system. -- user provides location of the file and authentication to the client program which contacts the remote machine the client program which contacts the remote machine to request a copy of the file. to request a copy of the file. -- the remote sends the copy of the file -- user terminates the client program -- an application program is used to open the file. -- many computations run faster with whole-file on the local machine than remote file access. local machine than remote file access.

8 Whole-file sharing by file transfer and problems Whole-file transfer between heterogeneous machines can be difficult. -- Client and server have to agree on authorizations/ permissions and data formats. permissions and data formats. -- Different data formats make inverse translations impossible. impossible. e.g.: A and B machines use different presentations for floating point numbers, text files. floating point numbers, text files. floating point numbers -- it is impossible to convert floating point numbers -- it is impossible to convert format without losing some precision. format without losing some precision. text-- Variable-length lines in one system and fixed line lengths in another system - when file is copied to lengths in another system - when file is copied to and from cause padding and lose the originality. and from cause padding and lose the originality. -- Problems like the above can be handled by FTP.

9 FTP - The major TCP/IP file transfer protocol FTP is the most frequently used of TCP/IP applications. Earlier forms of FTP existed for ARPANET before TCP/IP. Features:  Handles authorization, naming, representation among among heterogeneous machines. heterogeneous machines.  Interactive access: provides user-friendly interface with 'help'. with 'help'.  Format representation/specification: user can  specify format of the data in the remote file -- text or binary etc. -- text or binary etc. -- whether text files use ASCII character set etc. -- whether text files use ASCII character set etc.  Authentication control: user has to supply name/password to the server to request a file. name/password to the server to request a file.

10 FTP - Process Model Most FTP servers allow concurrent access by several clients. Clients use TCP to connect to server. - master process awaits connections - master process awaits connections - creates a slave process to handle each connection - creates a slave process to handle each connection - slave process accepts requests through this - slave process accepts requests through this "control connection". "control connection". - client’s control process and server's(slave) control - client’s control process and server's(slave) control process communicate using this connection. process communicate using this connection. - slave then creates another connection to transfer - slave then creates another connection to transfer data - This is "data transfer connection". data - This is "data transfer connection". - The data transfer process on server (slave) and - The data transfer process on server (slave) and client communicate through this connection. client communicate through this connection. Refer: Fig 26.1 shows FTP connection between client and server using TCP. using TCP.

11 FTP - Process Model… On client side 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 side. Control connection is alive as long as user keeps FTP session open. FTP session open. -- FTP starts a new data transfer connection for each file transfer. transfer. -- In most cases, data transfer connection and data transfer process are created whenever server needs transfer process are created whenever server needs to send information to client. to send information to client. -- When session is ended by client control connection, data transfer connection and the corresponding data transfer connection and the corresponding processes terminate. processes terminate.

12 TCP port number assignment When does the control process create new TCP connection for data transfer and what port is used ??? -- Client obtains an unused port on its machine to make connection with data transfer process on the server. connection with data transfer process on the server. -- It creates transfer process on the client machine to listen at that port listen at that port -- Communicates the port number to the server over the control connection and then waits for the server to control connection and then waits for the server to establish a TCP connection to the port. establish a TCP connection to the port. -- The data transfer process on the server uses well- known port reserved for FTP data transfer --port 20. known port reserved for FTP data transfer --port 20. -- When the server issues TCP ‘active open’ request it specifies the port that will be used on the client as specifies the port that will be used on the client as well as the local port well as the local port

13 FTP connection - properties Format of data on control connection TELNET network virtual terminal protocol. Why FTP connection is simpler to manage than TELNET connection :  FTP does not allow option negotiation  FTP uses only basic NVT definition.

14 Using FTP - Commands invoking FTP % ftp % ftpcommands ftp> ‘command' ftp> ‘command' help command -- description and usage of the command. -- description and usage of the command. ls -- lists the contents of remote directory cdup -- change remote working directory to parent directory parent directory bell -- beep when command completed Refer page 503 for more commands.

15 Trivial File Transfer Protocol (TFTP) n FTP, though most general file transfer protocol, is complex and difficult to program. n Many applications do not need the full functionality that FTP offers, neither can they afford complexity. n TFTP is the second file transfer protocol that offers inexpensive and unsophisticated service. n TFTP is intended for applications that do not need complex interaction between client and server.

16 Trivial File Transfer Protocol (TFTP) n TFTP restricts operations to simple file transfers and does not provide authentication. Consequently the TFTP software is much smaller than FTP. n TFTP does not need a reliable stream transport service. It uses UDP or other unreliable packet delivery system and uses timeout and retransmission to ensure that data arrives. n The sender transmits a file in fixed size blocks and awaits an acknowledgment for each block before sending the next one. The receiver acknowledges each block upon receipt.

17 TFTP - Process Model n The first packet being sent requests a file transfer and establishes interaction between client and server. n The first packet specifies a file name and whether the file will be read or written. Blocks of file are numbered consecutively starting from 1. n The header of each data packet specifies the number of block the packet carries and each acknowledgment specifies the number of blocks being acknowledged.

18 TFTP – Process Model n TFTP retransmission requires both sides to implement timeout and retransmission. n If the side sending data times out, it retransmits the last data block. If the receiver side times out, it retransmits the last acknowledgment. n Though this scheme guarantees robustness, it can lead to a problem known as Sorcerer’s Apprentice Bug. n When an acknowledgment is delayed, the sender retransmits the data packet. The receiver again

19 sends acknowledgment for the retransmitted packet. Eventually both acknowledgments reach the sender and for each acknowledgment, the sender transmits the next packet. sends acknowledgment for the retransmitted packet. Eventually both acknowledgments reach the sender and for each acknowledgment, the sender transmits the next packet. n Thus all the subsequent packets are transmitted twice and acknowledged twice. n n This cycle continues indefinitely with each packet being transmitted exactly twice. TFTP – Process Model

20 Network File System (NFS) n n NFS provides on-line shared file access that is transparent and integrated. n n When an application program executes, it calls the operating system to open a file, or to store and retrieve data in files. n n The operating system accepts the request and passes it to either the local file system software or to the NFS client. The client software uses NFS protocol to contact appropriate server on a remote machine and performs requested operation.

21 RPC and XDR n n NFS protocol consists three independent pieces. - the NFS protocol itself - RPC mechanism - eXternal Data Representation (XDR) n n RPC and XDR provide mechanisms that can be used to build distributed programs. n n XDR provides a way to pass data among heterogeneous machines without need for conversion among the hardware data representation.

22 Summary n Data on remote files can be accessed by - Whole-file copying. - Shared online access. n FTP uses whole file copying. n TFTP provides a small, simple alternative to FTP and so it can be used for bootstrapping diskless machines. n NFS provides online shared file access. It uses UDP for transport and RPC & XDR mechanisms. n As RPC and XDR are defined separately from NFS, they can be used to build distributed applications.


Download ppt "File Transfer And Access Chapter 26 Chapter 26 Group 3 Presentation Deepak Mittal Nishit Ranjan Venugopal Janapati Amit Palshikar Ref: Internetworking."

Similar presentations


Ads by Google