Integrating Network File AccessUtilities such as ftp and tftp are standalone applications operating at the Application layer of the TCP/IP protocol stack. These utilities were a great advance at the time of their appearance, and they are still useful in some contexts, but since then, vendors and Internet visionaries have looked for more versatile solutions. Their goal is to seamlessly integrate remote file access with local file access, so that local and remote resources appear together within a common interface. (Consider, for instance, the browsable file shares available through the Network Explorer interface in Windows.) As you learned in Hour 7, "The Application Layer," part of this integrated network file access requires a redirector (or requester) on the client computer to interpret resource requests and route network-bound requests to the network. Another part of this solution is a general-purpose file-access protocol that forms a complete protocol layer through which GUI-based user interface tools and other applications can access the network. This file-access method is now the preferred approach for local area networks. In the following sections, I'll introduce a pair of protocols that provide integrated network file access:
These protocols demonstrate the power of the TCP/IP Application layer and the benefits of building a network system around a well-defined protocol stack, in which lower-level protocols form a foundation for more specialized protocols above. Network File SystemThe Network File System (NFS) was originally developed by Sun but is now supported on Unix, Linux, and many other systems. NFS allows users to access (read, write, create, and delete) directories and files located on a remote computer as if those directories and files were located on the local computer. Because NFS is designed to provide a transparent interface between local file systems and remote file systems, and because it is implemented within the operating system of both computers, it does not require any changes to application programs. Programs are capable of accessing both local files and remote files and directories via NFS without any recompilation or other changes. To the user, all files and directories appear and operate as if they existed only on the local file system. The original implementation of NFS used the UDP protocol for its transport and was intended for use on a LAN. However, later revisions allow use of the TCP protocol; the additional reliability of TCP allows for expanded capabilities of NFS, which can now operate in a WAN. NFS is designed to be independent of operating systems, transport protocols, and physical network architecture. This allows an NFS client to interoperate with any NFS server. This independence is achieved by using Remote Procedure Calls (RPCs) between the client and server computers. RPC is a process that enables a program running on one computer to make calls on code segments inside a program running on another computer. RPC has been around for many years and is supported on many operating systems. In the case of NFS, the operating system on the client issues a remote procedure call to the operating system on the server. Before remote files and directories can be used on the NFS system, they must first go through a process known as mounting. After they are mounted, the remote files and directories appear and operate as if they were located on the local file system. The latest version of the NFS protocol is version 4, which is covered in RFC 3010. For additional information on previous versions of NFS, see RFC 1094, which addresses NFS version 2, or RFC 1813, which covers NFS version 3. NFS implementations vary with the operating system. See the vendor documentation for more on how to configure NFS for your operating system. Server Message BlockServer Message Block (SMB) is the protocol that supports the network-integrated tools of the Windows user interface, such as Explorer, Network Neighborhood, and the Map Network Drive feature. SMB is designed to operate above a variety of different protocol systems, including IPX/SPX (the NetWare protocols stack), NetBEUI (an aging protocol for PC LANs), and TCP/IP. SMB resides above the NetBIOS layer, which interfaces to the Transport layer protocols and provides services related to resource naming and location (see Figure 14.3). Figure 14.3. SMB and the TCP/IP protocol stack.By the Way Note in Figure 14.3 that both SMB and NetBIOS occupy the Application layer of the TCP/IP protocol stack. It might seem confusing for two protocols to appear vertically on a protocol layer. This arrangement, however, is actually very sensible when viewed in the context of the alternative OSI protocol system. As you'll recall from Chapter 2, OSI divides the activities at TCP/IP's Application layer into three separate layers. In this case, NetBIOS occupies the Session layer of the OSI stack, and SMB occupies the Application and Presentation layers. Microsoft is preparing to eventually replace NetBIOS through initiatives such as the alternative LDAP-based Active Directory system, which first appeared in Windows 2000. However, Active Directory is still not in widespread use, and NetBIOS will undoubtedly survive, if only for its compatibility with other environments. See Hours 7 and 11 for more on conventions for naming and locating NetBIOS resources. Like other network protocols, SMB is designed around the concept of a client (a computer requesting services) and a server (a computer providing services). Every session begins with a preliminary exchange of information, in which an SMB dialect is negotiated and a client is authenticated and logged on to the server. The details of the authentication process vary depending on the operating system and the configuration, but as far as SMB is concerned, the logon is encapsulated in a sesssetupX SMB. (A protocol transmission under the SMB protocol is simply called an SMB.) If the logon is successful, the client sends an SMB specifying the name of the network share it wishes to access. If the share access is successful, the client may open, close, read from, or write to the network resource, and the server sends the necessary data to fulfill the request. SMB is generally considered a Windows protocol, and it is true that the primary importance of SMB is its tight integration with the Windows client user interface. But details of the SMB protocol are well known to developers, and other operating systems support servers that speak SMB to Windows clients. A popular open source server called Samba (which is, if you'll notice, SMB with two vowels to make a dance) provides SMB file services for Unix/Linux systems. |