#
Upgrading and Repairing Networks

# - 2 -

# Overview of Network Systems and Services

A network is an interconnected system of computing devices that provide shared, economical access to computer services. The task of managing the access to shared services is given to a specialized type of software known as a network operating system (NOS). There are many NOSs available in the marketplace today--the major players are covered in detail in part III, "Software Platforms: NOSs and Clients." This chapter provides a high-level view of the two main types of local area networks (LAN): client/server and peer-to-peer. It also examines the basic hardware structure that comprises the modern LAN, and looks at some of the features and services furnished by this combination of networking hardware and software. In the process, a good many of the basic networking terms and concepts used throughout this book will also be introduced.

## The Client/Server Network

Client/server computing is a buzzword that has been bandied about a great deal in the computer press, often without being specifically defined. Basically, the client/server concept describes a computing system in which the actual processing needed to complete a particular task is divided between a centralized host computer, the server, and a user's individual workstation, the client. The two are connected by cables (or infrared, radio, or microwaves) for communication (see fig. 2.1). (Note that the connecting lines in the figure represent the network's pattern of data traffic and not the physical cabling system).

Although they are both PCs with the same basic architecture, the client and server computers usually have very different hardware and software configurations. The primary function of each in relation to the other can be stated in simple terms: the client requests services from the server, and the server responds by providing those services. A few examples of client/server operations might make this distinction clear:

Figure 2.1
This is the logical architecture of a typical client/server network.

- A computer running DOS, requesting a file that is stored on a NetWare file server
- A PC running Windows 95, dialing out to a bulletin board using a modem connected to a RISC-based computer running Windows NT Advanced Server
- A Windows application on a user's PC, requesting data from a computer running Lotus Notes
- A PC running DOS and Sun's PC-NFS product, printing a large report using a high-speed printer attached to a SparcServer
- A computer running OS/2, connected to a mainframe, receiving up-to-the-minute data about commodity prices, and displaying a constantly updated chart reflecting the price changes
- An Apple Macintosh Performa being used for photo-retouching of a high- resolution scanned image from a Scitex publishing system
- A PC, connected to the Internet, running Netscape Navigator and viewing multimedia documents stored on a UNIX host on another continent

In each case, it is clear which system is the client and which is the server. It is also clear that the computer operating as the server is providing a service to the client that is essential to complete the task at hand. Indeed, the server could be providing these services to dozens or even hundreds of clients simultaneously. It is not surprising, therefore, that a server is generally a more powerful, complex, and expensive machine--running more powerful, complex, and expensive software--than the clients with which it interacts.

The differences in function and ability between the server and the client are in accordance with the reasons that PC networks were originally developed and have been so successful: to provide shared, economical access to services such as large disk drives, high-quality printers, high-speed modems, and other expensive items. Concentrating the most expensive and important pieces of the network at a server allows those items to be protected and maintained by trained professionals, while allowing many more people to use them.

This centralized location of shared equipment is, of course, nothing new to computing. It is the essence of the host-based system, in which a mainframe holds all of the data and runs all of the applications, and users interact with the host using terminals to input data and view results. Clearly, another aspect is necessary for a system to be considered a client/server network, and that is the distributed processing previously mentioned. In a host-based system, all the important processing happens on the mainframe. The application running on the mainframe even controls most of the functions of the users' terminals, telling them where to display certain characters, when to beep and for how long, and when to accept user input.

In a client/server relationship, the server does some of the necessary data processing, and the client does some. The degree to which the processing tasks are separated between the two machines can vary greatly, and this is the source of confusion to many. When a user launches an application at his workstation, it may be a spreadsheet whose software is stored and operated solely within the workstation computer, or it may be a database client that interacts with a server to bring information to that workstation. If the data file being opened by the spreadsheet is stored on a network file server, both of these instances can, by strict definition, be called client/server applications. Server processes are needed to provide both the spreadsheet and the database with the data files that they need to operate.

However, there is a question of degree here that cannot be overlooked. Once the file server has delivered the spreadsheet's data file to the workstation, its participation in the process is ended, until it is time to write the modified file back to the server. The database application, on the other hand, requires the continuous participation of both sides of the client/server paradigm to function. The database client is useless (and sometimes cannot even be launched) unless the server process is active.

This is what is really meant by client/server computing. Instead of the entire functionality for multiple users being carried out by a single computer, as in the mini/mainframe situation, the processing capabilities of the server and all of the client machines are combined into a whole that is inherently more efficient. This is because of reductions in the amount of data being transmitted over the network, as well as the combined increase in pure computing power.

There are several types of systems that can be considered servers in a client/server environment. At the most basic level is a file server that performs high-performance data storage duty for multiple clients, and perhaps provides shared print services as well. There can also be large application servers, running high volume applications--such as database access, updating, indexing, selection, and retrieval--on behalf of less powerful clients. Smaller, special-purpose servers may provide fax services, electronic mail pickup and delivery, or modem sharing.

Even though many servers have very powerful, expensive hardware, it is the software differences between clients and servers that really distinguish them. In some client/server networks, the server hardware may not be all that different from that of the client. Most of these servers are ordinary IBM-compatible PCs, as are most of the clients. The server may have 16M, 32M, or more of RAM, 1G or more of disk space, and perhaps a tape backup system, but it is not unusual today to find PCs with similar hardware resources being used as clients or stand-alone systems.

The server, though, is running a NOS, such as Novell NetWare, Microsoft's Windows NT Advanced Server, or Banyan VINES, or it is running a server application on top of a high-performance general purpose operating system (OS), like IBM LAN Server or Microsoft LAN Manager running on OS/2. In any case, the software has special features: extensive security measures designed to protect the system and the data it contains from unauthorized access, enhanced file system software with features to protect files from damage or loss while handling simultaneous requests from multiple users, and a communications system capable of receiving, sorting out, and responding correctly to hundreds or thousands of varied requests each second from different clients.

To support the demands placed on a server in a client/server environment, the server software usually runs on a computer dedicated solely to the purpose of hosting that software and supporting its services. It might be possible to use the server computer to run a regular software application or to support a client session at the same time as the server software is functioning, but server processes and functions have priority access to the system's resources.

## The Peer-To-Peer Network

While client/server networks are distinguished by how different the clients and servers are, each with a clearly defined role, peer-to-peer networks are just the opposite. There are still clients and servers in a peer-to-peer system, but generally, any fully functioning client may simultaneously act as a server. The resources of any computer on the network--disk drives, files, applications, printers, modems, and so on--can be shared with any other computer, as shown in figure 2.2 (again displaying the pattern of data communications between the nodes and not the physical cabling diagram).

Peer-to-peer networking software might be included in the base client OS, or it might be purchased separately as an add-on feature. Until recently, it was common for all of the nodes in a peer-to-peer network to be running the same client OS--DOS, Windows for Workgroups, OS/2 Warp Connect, Windows NT, or Macintosh System 7. Some exceptions to this rule have always existed. A PC running DOS can be a client in a Windows for Workgroups network, but it cannot be a server. With TOPS, both PCs and Macintoshes can share resources as clients and servers. Artisoft's LANtastic peer-to-peer systems can accommodate Macintoshes as clients, but servers must be DOS-based. A PC running OS/2 usually can be configured to be either a client or server in a DOS-based peer-to-peer network by running the DOS software in one or more DOS virtual machines, although the network resources may not be available to OS/2 applications.

Figure 2.2
This is the logical architecture of a typical peer-to-peer network.

The release of Windows 95, however, signals the achievement of Microsoft's goal of providing peer-to-peer interoperability between all of its Windows OSs. Windows for Workgroups, Windows 95, and Windows NT all ship with a fully integrated peer-to-peer networking functionality that allows all three OSs to share resources with any of the others. The ease and simplicity with which basic networking functions can be configured and enabled in these OSs, not to mention the economy of their inclusion in the standard OS package, bodes ill for add-on products like LANtastic and Personal NetWare, which offer little in the way of additional features or performance.

Peer-to-peer networks are often comprised of only a few workstations, perhaps sharing a printer or two and the data files on each other's hard drives. The upper limit on the number of nodes that can function as both clients and servers on a peer-to-peer network with performance levels that remain reasonable is usually somewhere between 10 and 25. Beyond this number, a peer-to-peer machine can be used as a dedicated server with additional high-performance hardware. It then can handle as many as 50 or 100 clients that aren't too demanding. When networks grow beyond this point, though, it is time to migrate to a full client/server architecture.

The distinctions between client/server and peer-to-peer NOSs can get blurry at times. It is very common for a computer to be more or less dedicated to the role of a server in a peer-to-peer network to provide good performance and responsiveness to clients' requests. Conversely, the server OS in most client/server networks allows one or more client sessions to be run on the same computer as the server. In NetWare 2.x, the server can be set up in non-dedicated server mode, which allows a single DOS client session on the server. NetWare 4.x is usually thought of as a stand-alone client/server NOS, but it can be run as an application atop OS/2, allowing multiple OS/2, Windows, and DOS applications to be run on the same computer. LAN Manager, LAN Server, and Windows NT Advanced Server all allow one or more client sessions to be active on the server. Older computers such as IBM XTs and ATs can live on in a client/server environment as specialized print, mail, and fax servers, long after their usefulness as client workstations has ended.

Further confusing the picture is the fact that the client software in a peer-to-peer system is often nearly the same as the client software in a client/server system. Computers running Windows for Workgroups, Windows 95, or Windows NT in a peer-to-peer system can be configured to simultaneously access resources on many client/server systems, such as NetWare, Windows NT Advanced Server, or LAN Manager. LANtastic clients can also use the file and print services of NetWare. In fact, Artisoft resells a modified version of NetWare 4.x as the basis of its CorStream Server client/server product. Novell's Personal NetWare uses the same basic client software as the latest versions of its client/server packages, NetWare 3.12 and NetWare 4.1. Using this software, a DOS or Windows PC can easily access resources on both a Personal NetWare server and a dedicated NetWare 3.x or 4.x server.

Back in the days when most corporations regarded mainframes and minicomputers to be their only strategic computing platforms, individual branches and departments put in PC networks to quickly and economically share information and servers. As these networks have grown and become connected with each other, and now function as the strategic computing platform in many corporations, peer-to-peer networking software is being used within larger networks to continue sharing resources and information on a local level.

### Client/Server versus Peer-To-Peer

Without question, the primary advantage of the peer-to-peer network is its low cost. For little more than the price of network interface cards and cabling, a handful of stand-alone PCs can be assembled into a basic functional small business network, often without the need for high-priced consultants or administrative talent.

This last point should not be taken lightly. A small business that chooses to install a client/server network (perhaps anticipating their future growth) is often placed into the difficult position of being incapable of running the network themselves, while at the same time being unable to justify employing a full-time network administrator. They are usually forced, as a result, to engage consultants for a high hourly fee.

The administrative factor, along with the high cost of the NOS software itself (while the peer-to-peer NOS is, in many cases, free with the client OS), presents a good reason for the small business to stick with peer-to-peer. This is fine, as long as the requirements of the business remain within the scope of the functionality that peer-to-peer systems provide. File and print services are sufficient for many types of operations, but if the business has the potential for generating truly large amounts of data that will have to be organized and retrieved on a regular basis, then the judicious course might be to run a client/server network from the very beginning.

Fortunately, the task of migrating from a peer-to-peer system to a client/server one has become much simpler over the years. Indeed, in the case of a Microsoft Windows network, simply adding a machine running Windows NT Advanced Server to an existing network of Windows for Workgroups or Windows 95 machines all but accomplished the task. Adding a NetWare server to such a peer-to-peer network is not terribly difficult either, although it will be necessary to reconfigure all of the workstations to accommodate both network types.

Deciding whether to go with a peer-to-peer or client/server network is an important decision. The pros and cons of both are presented in table 2.1. It is, however, not nearly as crucial as some of the others presented in this chapter, and throughout this book. If the selection of the networking hardware and infrastructure is made well, then a low-cost peer-to-peer network can be upgraded to a client/server system with virtually no expenditures wasted.

#### Table 2.1 Advantages and Disadvantages of Peer-To-Peer and Client/Server Networks

Advantages | Disadvantages
Peer-To-Peer
Inexpensive or free NOS | Limited size
Low maintenance cost | File and print services only
Easy installation | Limited connectivity
Client/Server
Extremely expandable | Expensive NOS
Unlimited connectivity | High maintenance cost
Wide range of services | Difficult to install

## Fundamental Networking Concepts

Having defined the roles of clients and servers in a LAN, we shall now consider the network itself--that is, the medium that links all of the component computers and the data communications conducted through it. Computer networking is a highly complex and technical subject. What appears to be a simple network transaction, such as the transfer of a file from server to workstation, is actually an extraordinarily complicated procedure, encompassing many different forms of communication on many levels.

Fortunately, the average LAN administrator does not usually need to be an expert on all facets of the communication that occurs between computers. This section is designed to serve as an introduction to some of the more in-depth discussions occurring later in this book. The basic vocabulary of networking will be introduced, and we will take a brief look at the hardware and network types covered elsewhere in greater depth.

### Protocols

In any discussion of the technologies and methods underlying network communications, the term network protocol will be used often (perhaps too often). A protocol is nothing more than a set of rules and specifications governing how two entities communicate. Human societies develop protocols at many levels. Languages are protocols that are formulated to allow people to understand each other. Improper use of language results in misunderstanding or prevents any communication at all. Later more advanced protocols specify what is considered proper and polite behavior for the use of language evolve. When someone violates these rules, they are often considered rude or disruptive and may be ignored or perhaps even punished.

Computers also have certain defined protocols specifying proper behavior for communication between them. When any hardware or software violates these rules, proper communications may not be able to take place over the network, even between other systems that are following the rules. Messages generated by a machine not conforming to accepted protocols probably won't be acknowledged by other computers. As with humans, such messages will be considered to be disruptive noise and will be ignored.

All of the rules and standards that make computer-to-computer communication possible are properly called protocols. Because, as with humans, communication occurs at many levels, however, it is helpful to distinguish some different types of protocols. Understanding these different types is where a construction such as the OSI network model comes in handy. The OSI model is a construction that is designed to illustrate the seven basic levels of network communication, ranging from the physical medium of the network all the way up to the application interface appearing on the workstation. It is covered in much greater depth in chapter 3, "The OSI Model: Bringing Order to Chaos."

NCP (NetWare Core Protocol), TCP/IP, Ethernet, and UTP are all technically considered protocols, even though they refer to very different communication levels that have little in common beyond being components of a network transmission. A quick look at each protocol, in reference to the OSI network model, will help make the distinctions clear.

In accordance with the OSI network model, unshielded twisted pair (UTP) is a protocol that refers to the physical layer, specifying a type of cable that can be used to connect computers, how the connectors need to be wired together, and the electrical characteristics of the signals on the wire. To avoid confusion when talking about this and other physical layer protocols, people usually refer to cabling systems, cabling types, or other terms clearly identifying that they mean the physical link between systems. Since the physical layer need not take the form of an actual cable and may use infrared or radio transmissions, for example, a general term that covers all possibilities is transmission medium.

Ethernet is a protocol that functions at the data link layer, providing the basic rules for how the signals transmitted over the network medium must be formatted to contain data, how physical stations on the network are uniquely identified, and how access to the physical medium is governed so as to allow all of the stations on the network an equal opportunity to transmit. Ethernet is one of several data link layer protocols in use today and will function properly with UTP, or one of several other physical layer protocols. The protocols operating at physical and data link layers of the OSI model are often considered together because they are dependent on each other. As explained fully in the chapter on the OSI model, the use of a particular protocol at the data link layer imposes certain limitations on the physical layer and vice versa.

Transport Control Protocol/Internet Protocol (TCP/IP) is a broad set of rules and standards, sometimes called a protocol suite, that works at the network, transport, and session layers of the OSI model. These rules control how data on the network is sent on the correct path to reach its intended destination, how some communication errors are handled, and how logical connections between nodes on the network are established, maintained, and ended. There are several other protocols of this type in use today. Partially because these protocols cover several adjacent layers of the OSI model, they are sometimes referred to as protocol stacks.

The NetWare Core Protocol (NCP) is a set of rules that govern how applications and computer systems communicate at the presentation and application layers to carry out common data processing functions such as creating, reading, writing, and erasing files, sending and accepting print jobs, and logging on and off of a server. Other common protocols of this type are Server Message Blocks (SMB), Network Filing System (NFS), and AppleShare/AppleTalk.

As you can see from figure 2.3, these four examples encompass all of the layers of the OSI model, moving from bottom to top. The four protocols discussed above need not be and usually are not used together. They are provided merely as common examples what comprises the nature of the protocols running at the different networking communication levels. The rest of this chapter covers some basic concepts concerning these different levels, ranging from hardware to software as we progress again from the physical to the application layer.

### Cable Types

The first computer networks were constructed on a foundation of serial ports and cables, like those used to connect a modem or serial printer to a PC. Serial networks are hampered by severe speed and distance limitations but are still used today. In fact, DOS 6.2 comes with Interlink, a simple peer-to-peer network application that allows two PCs to be connected with serial or parallel cables and redirects drives or printers to the other PC.

Coaxial Cable. The first big advance in networking was when coaxial cable, similar to the cable that carries radio and TV signals over long distances in cable TV systems, was adapted for data communications. Coaxial contains a single conducting wire, surrounded by an insulating material, which in turn is surrounded by a metal sheath or braid that can be grounded to help shield the signal on the conductor from interference, and then still more insulation. All of these components share a single axis at the center of the cable--hence the term coaxial.

Figure 2.3
These are four examples of networking protocols.

The first systems to use coaxial used the same signaling techniques as cable TV systems. The stream of data bits being transmitted was converted into a radio wave signal of a specific frequency, and broadcast on the wire. This system, called broadband signaling, has the advantage of allowing multiple signals or channels to be carried on a single cable at the same time, using a technique called frequency-division multiplexing (FDM), that assigned different base frequencies to different channels. The ability of a single cable to carry as many as 12 simultaneous TV channels must have seemed at the time like an unlimited amount of bandwidth that could never be used up, especially when compared to the slow teletype speeds achieved with serial connections that were the current standard.

Although analog TV signals can be carried for several miles on coaxial cable before acceptable signal quality is compromised, such distances could not be achieved with digital data. Any electrical signal carrying information can be thought of as a series of waves. The distance between the waves is the frequency of the signal, and the height of the waves is the strength, or amplitude, of the signal. The information in a signal, whatever the data type, is carried in small variations of either the frequency or amplitude. While a signal might start out well-defined, as it travels over the wire the variations that carry the information become blurred and distorted. The effect is similar to looking at an object through multiples panes of window glass. The image that passes through one pane is almost indistinguishable from looking directly at the actual object. As more panes are added, the object becomes blurry and indistinct, until finally it is unrecognizable. This distortion is called attenuation.

Digital data is much more susceptible than analog to the noise and signal distortions that are introduced as signals travel greater distances. The amount of distortion that would cause an annoying but acceptable amount of "snow" in a TV signal will utterly destroy the information carried in a digital data stream. Because of this, network systems using broadband coaxial cable are limited to reaching only a few dozen (or maybe hundreds) of feet, unless signal repeaters are used to regenerate the signal periodically. Simple amplifiers would not suffice, as they would only amplify the noise and distortion that the signal picks up as it travels down the wire.

The next advance in networking used similar coaxial cable, but instead of encoding the stream of digital data bits into a radio signal, the bits were directly transmitted on the cable with different voltage levels corresponding to different values, each level being maintained for a small but consistent time period. This is known as baseband signaling, the method still used in the vast majority of LANs today. Rather than decoding small variations in amplitude or frequency from a larger signal to decipher information, a receiving station now simply measures the voltage level on the wire at specific intervals.

This method of signaling allows much cheaper transmitting and receiving apparatus to be used on a network. It does raise a problem of signal collisions, though--only one station is able to successfully transmit at a time. If two or more nodes transmit at the same time, neither signal will be intelligible, but this problem is dealt with by the next level in the OSI model. With the development and use of baseband signaling, the limiting factor in network distance has become not how far a clean signal of a certain frequency can be transmitted, but how fast the signal can get from one end of the cable to the other. Signal quality considerations still come into play, of course, particularly in limiting the data speed, or signaling rate, of the network, which decreases as distance goes up for any particular type of cable.

Coaxial with a single conductor is an unbalanced transmission medium, as opposed to balanced media that use two similar wires carrying signals of opposite polarity or voltage. Balanced media are more resistant to noise and interference. Some IBM systems uses a balanced cable type, similar to coaxial, that has two conductors inside the shielding braid--this is called twinax.

Most baseband coaxial network systems have a maximum signaling rate of 10 megabits per second (Mbps) or less. Depending on the specific type of cabling used, they work at this speed over distances of more than a mile when simple repeaters are used to regenerate the signal. For a long time, coaxial was the only economical choice for use in high-speed LANs. The drawbacks to setting up and maintaining a coaxial cable system include the fact that the cable is difficult and expensive to manufacture, is difficult to work with in confined spaces, can't be bent too sharply around tight corners, and is subject to frequent mechanical failure at the connectors. Because a failure at any point usually renders the entire cable system unusable, the overall reliability of coaxial systems has always been less than stellar.

Twisted-Pair Cable. The biggest network in the world, the telephone network, originally used only twisted-pair cabling and still does for most local connections. The name comes from the fact that each individually insulated conductor is part of a pair, making this a balanced medium, and that each pair is twisted together along its length, which helps further protect it from interference. Twisted-pair cabling comes shielded, with a metal sheath or braid around it, similar to coaxial, or unshielded. The two are commonly known as STP (shielded twisted pair) and UTP (unshielded twisted pair). All signaling over twisted pair is of the baseband type. STP is commonly used in token-ring networks, but UTP is by far the most popular LAN cabling protocol today, used in the majority of Ethernet networks and in many token-ring networks as well.

Fiber-Optic Cable. A relatively new technology, fiber-optic cable, uses light signals transmitted over thin, glass fiber to carry data. Fiber-optic cable offers higher speed, greater reliability, and spans longer distances than other methods. It is more expensive to install than coaxial or twisted pair but is usually cheaper to maintain. It often is used at larger companies to interconnect servers or departmental networks at high speed, over a long distance, or where high security is desired.

A high-speed link dedicated to the connection of servers and other selected network components (as opposed to workstations) is called a backbone. Fiber-optic cable is completely resistant to electromagnetic interference and signals cannot be intercepted without breaking the cable. It is also far less susceptible to attentuation than copper cable. Ethernet over fiber-optic cable transmits at 10 Mbps at distances of over two miles, much farther than over any other media. FDDI is a standard network topology that allows 100 Mbps communications between nodes up to a mile or more apart.

### Network Topologies

A topology is the pattern by which the cabling medium is used to interconnect the various computers that form the network. Like the cable types discussed above, the topology used is intimately connected with the data link layer protocol. Once cannot simply choose a cable type and wire to according to any topology desired. The mechanism by which the data link layer protocol passes the data from the computer onto the network imposes definite restrictions on the way that the cable is wired. The amount of attentuation inherent to the medium, the speed of the signal, and the length of the cable segments are all factors that must be accounted for by the data link protocol. A topology is therefore selected in most cases as the result of a data link protocol decision.

The Bus Topology. There are several general categories of LAN physical topologies, which really are just different ways of stringing cable from station to station. The simplest, and the first true LAN topology, is the bus topology (see fig. 2.4), which is a single long cable with unconnected ends, to which all of the networked computers (sometimes called nodes) are attached along its length. The bus topology is most often used with coaxial cable, although other computing interfaces that utilize components wired in series (such as SCSI) are sometimes called a bus.

Depending on the width (and subsequent unwieldiness) of the cable, the bus may extend directly from computer to computer, as in thin Ethernet, or it may be wired to the vicinity of the computer and a short cable used to attach it to the bus cable, as in thick Ethernet. Both ends of a bus must always be terminated; otherwise, signals reaching the end of the cable may echo back along its length, corrupting transmissions.

Like any circuit wired in series, the bus topology is inherently unreliable in that a break anywhere in the cable disrupts service to all of the stations on the far side of the break. Like old-fashioned Christmas tree lights, a single blown bulb can affect the entire string--or network.

Figure 2.4
This is a representation of the bus topology.

The Star Topology. Although developed later, the star topology has become the most popular topology in networking, due in no small part to its overcoming the Christmas-tree light effect. In a star topology, each machine on the network has its own dedicated connection to a hub or concentrator. A hub is a device, installed in a central location, that functions as a wiring nexus for the network. Servers and workstations alike are attached to the hub, as shown in figure 2.5, and if any particular cable segment fails, only the computer attached with that segment is affected. All of the others continue to operate normally. The star topology is used mostly with twisted pair cabling, usually in an Ethernet or token-ring network environment.

Figure 2.5
This is a representation of the star topology.

If there is a drawback to the star topology, it is the additional cost imposed for the purchase of one or more hubs. Usually, though, this expense is offset by twisted-pair cable's easier installation and cheaper cost than coaxial.

The Ring Topology. Essentially, a bus topology where the two ends are connected forms a ring topology (see fig. 2.6). This is primarily a theoretical construct, though, for very few networks today are actually wired in a ring. The popular token-ring network type is actually wired using a star topology, but there can be a logical topology that differs from the physical topology. The logical topology describes how the network signaling works, rather than how the cable looks. In the case of a token-ring network, special hubs are used to create a data path that passes signals from one workstation to the next in a procession that concludes at the station where the transmission originated. Thus, the topology of this network is that of a physical star but a logical ring.

Figure 2.6
This is a representation of the ring topology.

The Mesh Topology. The mesh topology is another example of a cabling system that is almost never used. Describing a network in which every computer contains a dedicated connection to every other computer, it is another theoretical construction that overcomes one networking problem while creating another. One of the fundamental problems of networking at the data link layer of the OSI model is the method by which signals from many different workstations are to be transmitted over a shared network medium without interference. The mesh network eliminates this problem by not sharing the medium.

As shown in figure 2.7, each workstation has its own link to every other workstation, allowing it to transmit freely to any destination, at any time when it is not actually receiving a transmission. Of course, problems quickly arise as the number of workstations grows. Even a modest 10-node network would require 100 NICs and 100 cable runs, making it by far the most expensive network ever created, both in terms of hardware costs and in maintenance. We won't even speak about finding computers that can run 10 NICs each.

Hybrid Topologies. In many cases, the network topologies described above are combined to form hybrids. For example, multiple hubs, each the center of a star, are often connected using a bus segment. In other cases, hubs are added to the ends of segments extending out from another hub, forming what is sometimes called a tree topology. As always, care must be taken when using these techniques to ensure that the requirements set down by the data link layer protocol are not violated too severely. There is a certain amount of leeway to many of the specifications, but wanton disregard of the network's signaling requirements can be severely detrimental to the performance of the network.

Figure 2.7
This is a representation of the mesh topology.

### Data Link Standards

Several data link standards which are in common use today are briefly introduced in the following sections. This list is by no means exhaustive; there are other possible topologies that have been used on LANs in the past, are still being used today, and will continue to be used in the future. However, the vast majority of new networks installed today utilize one or more of these protocols. The following sections are brief introductions to the data link protocols and some of the concepts that they introduce. They are all covered in greater detail in chapter 7, "Major Network Types."

In any data link protocol, a quantity of data is packaged into a frame, or packet, which has addressing, routing, control, and other information added to it so that other stations on the network can recognize the data that is meant for them and know what to do with data meant to go elsewhere.

Ethernet. Originally developed by the Digital Equipment, Intel, and Xerox corporations in the late 1970s, Ethernet has since been adopted as an international standard and has become the predominant LAN-data link protocol in use today.

Ethernet was originally specified with a 10 Mbps signaling rate and uses a method of network access control known as Carrier Sense Multiple Access/Collision Detection (CSMA/CD). Instead of passing a token from station to station to allow access to the network for transmissions, any Ethernet workstation is allowed to transmit a frame at any time, as long as the network is not occupied by transmissions from other stations.

When two or more stations do begin transmitting at the same time, a collision occurs. The stations involved usually detect the collision and stop transmitting. After a randomly chosen period of time (only a few milliseconds at most) each of the stations attempts to transmit again, after first listening to make sure that the line is clear. Small numbers of collisions and other errors are normal on an Ethernet network.

Because it is impossible to determine with precision which node will be the next one to transmit and equally impossible to guarantee that the transmission will be successful, Ethernet is called a probabilistic network. There is a small, but very real, chance that a particular frame will not be able to be transmitted successfully within the time required because of the possibility of collisions happening at every try. As the amount of traffic increases on an Ethernet network, the number of collisions and errors increases, and the chance of a particular frame being communicated successfully decreases.

The bottom line is that as an Ethernet network grows, it reaches a point where adding active stations causes the maximum data throughput on the network to decrease. When a particular network will reach this saturation point is hard to predict with certainty. The mix of traffic, applications, and activity varies greatly from one network to another and also changes on a network over time. To avoid saturation problems, strict limits on cable segment lengths and the allowed number of nodes are specified for each of the cable types that can be used for Ethernet.

Due to continued development of the standard during its long history, Ethernet has evolved into a very flexible communications protocol that can be used with a wide range of transmission media. When referring to the various Ethernet cabling standards, abbreviations like 10Base2 are used. As shown in figure 2.8, the first number, 10, refers to the signaling rate for the medium in megabits per second (Mbps). The word after the first number is either "Base" or "Broad," indicating a baseband or broadband transmission. The last number refers to the length, in units of 100 meters, to which a single cable segment is limited. Later additions to the Ethernet standards began using letters in this position (like "T" for twisted pair) to indicate cable type.

Figure 2.8
Here's the explanations for the 10BaseX cable naming standard.

The most common forms of Ethernet are 10Base5, 10Base2, and 10BaseT, which are often known colloqially as thick Ethernet, thin Ethernet, and UTP, respectively. The latter type uses telephone cabling, as discussed earlier, while the others both use forms of coaxial cable. Several less common Ethernet topologies are also available, as well as some new varieties running at 100 Mbps that are rapidly gaining in popularity. Many Ethernet networks use a combination of two or more topologies. For example, a thick Ethernet cable may be used as a backbone running throughout a large facility. Or multiport thin Ethernet repeaters may be used to branch off segments connected to 10BaseT hubs, which are used for the final connection to the workstations. These mixed-media networks are allowed as long as each segment type adheres to the Ethernet standards for that medium.

Ethernet NICs, hubs, and cabling equipment are readily available for all media types and all PC buses. There are even pocket-sized external adapters that attach to a laptop's parallel port or to a Macintosh's SCSI port to enable network access for computers without expansion slots. Universally recognized as an economical data link protocol offering good performance for traditional network applications, Ethernet can be used for networks running virtually any of the NOSs and transport protocols available today, including NetWare, Windows NT, LAN Server, VINES, and many UNIX variants.

Token Ring. Token Ring was developed in the mid-1980s by IBM and accepted as an industry standard shortly thereafter. Stations on a token-ring network are allowed access to the network medium only when they are in possession of a token, a special frame that is passed from one station to the next. Token ring is physically wired in a star config-uration, with cables running from each station to a central access point called the multistation access unit (MSAU). The MSAU attaches each station only to the one preceding it in the ring (the upstream neighbor), from which it receives transmissions, and the one after it in the ring (the downstream neighbor), to which all its transmissions are sent. MSAUs are interconnected by a cable running from the Ring In port of one MSAU to the Ring Out port of another. The last MSAU's Ring Out is connected to the first MSAU's Ring In. This forms a logical ring topology because a frame originating at a particular workstation is passed to every other station in turn, finally returning to its origin, where it is removed from the network.

The original Token Ring signaling rate was 4 Mbps. Today, many token-ring networks run at 16 Mbps. Most token-ring equipment such as NICs and MSAUs can be configured to operate at either rate, although all stations on a ring must be set to the same speed. In a token-ring network, it can always be precisely determined who will next be able to transmit, and their transmission is practically guaranteed to be successful as long as there are no hardware errors on the network. This certainty leads to token ring being called a deterministic network, unlike Ethernet. Also unlike Ethernet, collisions are not an expected occurrence. Consistently occurring collisions on a token-ring network are a matter of concern to the network administrator.

Because a token-ring station needs to be able to discover who its upstream and downstream neighbors are, each station needs to be able to determine and modify the overall configuration of the ring. The ring needs to be able to cope if the station with the token gets turned off or otherwise removed from the ring before passing the token on. There are many more kinds of errors that can disrupt the normal functioning of the ring, and each station must be able to detect and recover from these errors. This requires token-ring NICs to have a lot of error detection and correction circuitry that is not needed or present on Ethernet or ARCnet adapters.

The rules governing the design of a token-ring network are much more complex than those for an Ethernet network. Early token-ring networks used proprietary cables sold only by IBM, but these were thick and unwieldy and had to be purchased in predetermined lengths and strung together to span long distances. Modem token-ring networks all use either STP or UTP cable. The type of cable used determines the segment length and number of node limitations that are imposed on the network, with STP providing the greater flexibility in both areas.

For a long time, IBM only supported use of STP cable on token-ring networks. This, along with a smaller number of token-ring equipment suppliers when compared to Ethernet, and the additional "intelligence" required of token-ring NICs, made token-ring equipment much more expensive than Ethernet or ARCnet. In spite of the higher costs, however, its reliability and IBM's reputation and support have helped make token ring the second most popular network topology in use today. UTP cable is now allowed if a media filter is used at the workstation, at either speed, reducing the cost of a token-ring installation. In addition, token-ring NICs and MSAUs today are available from many vendors, and the increasing competition has helped lower equipment costs dramatically.

FDDI/CDDI. Fiber Distributed Data Interface (FDDI) is a high-speed, fault-tolerant topology that supports transmission speeds of 100 Mbps over a network size of up to 100 kilometers (60 miles). The maximum distance between nodes is two kilometers. It uses dual strands of fiber-optic cable to attach stations together, with the overall topology being a counter-rotating dual ring--that is, two separate rings with traffic moving in opposite directions. Nodes can be attached to one fiber-optic cable (a single-attached station) or both (a dual-attached station). A failure of any one station or a break in one or both cables will still allow communication to continue among most of the remaining stations. The dual-attached stations closest to the break will detect the break and shunt signals from one ring to the other, maintaining the overall ring topology. Two or more simultaneous cable breaks result in two or more isolated but still functioning networks.

FDDI uses a token-passing method of network access. Its high speed, reliability, and fault-tolerance have made it a popular choice for large backbone networks (internetworks providing connections between multiple LANs in an enterprise). Its complete resistance to electromagnetic interference also makes it a popular choice for connections between buildings. Routers then provide connections between the FDDI backbone and local Ethernet or token-ring networks. FDDI equipment and administration is very expensive when compared to the other technologies, which limits its acceptance for other uses such as direct workstation connections.

A somewhat cheaper alternative to FDDI that retains its reliability is Copper Distributed Data Interface (CDDI), which uses the FDDI communication standards over UTP or STP cable. The distance between nodes is reduced from 2,000 meters to 100 meters with UTP. Comparable performance, although at shorter distances and with less reliability, can be achieved relatively cheaply using TCNS (a 100 Mbps version of ARCnet from Thomas Conrad), 100BaseT, or 100VG AnyLan.

LocalTalk. LocalTalk is used almost exclusively with Macintoshes. Every Mac has an integrated LocalTalk network interface and comes with AppleTalk networking software included in the OS. Apple's LocalTalk specification calls for nodes to be connected in a daisy-chain or bus configuration, using STP cabling. A company named Farallon has also developed a connector that enables LocalTalk to work over UTP cabling. This enables a Macintosh network to be wired together using a single extra pair in existing telephone wiring--this technique is called PhoneNet.

LocalTalk was originally developed to enable easy sharing of peripherals such as printers. Most Macintosh-compatible printers use a LocalTalk connection to one or more Macintoshes on a simple network. The signaling rate of LocalTalk is a relatively slow 230.4 Kbps. This is faster than the printer ports on an IBM-compatible PC, however, making LocalTalk a good choice for printer sharing. It is quite slow when used for file sharing, running at about the same speed that floppy disk drives read and write.

No more than 32 nodes can be connected to a LocalTalk network, which can be a maximum of 1,000 feet long. Repeaters, bridges, or routers can be used to connect LocalTalk networks, enabling communications over a much wider area. Using LocalTalk for file sharing once required purchasing additional software, such as AppleShare software from Apple or TOPS from Sun Microsystems. Recent versions of the Macintosh OS, System 7.x, include peer-to-peer networking capabilities.

ARCnet. One of the first network communication topologies to be developed, ARCnet (Attached Resource Computing Network), was commercially released in 1977 and is still occasionally used today. Originally, it used a star topology constructed out of the same type of coaxial cabling used to connect IBM 3270 terminals to mainframes. ARCnet is limited to a signalling rate of 2.5 Mbps. There can be no more than 255 active nodes on an ARCnet network, and node addresses are a single byte in length. Unlike the other network types considered here, node addresses are manually set with jumpers or switches on the NIC, while those for Ethernet and token-ring NICs are assigned at the factory. Care must be taken in an ARCnet network to make sure that no two nodes are given the same address.

ARCnet also uses a token-passing method of network access control; only the station possessing the token is allowed to transmit a data packet onto the network. The token is passed along the network as in a logical bus, from the first station to the last.

ARCnet has always had some advantages: the components were quite inexpensive when compared to other networking systems; signals could travel over relatively long distances of up to 2,000 feet; and ARCnet provides a high level of resistance to external electrical interference and noise, which makes it popular in manufacturing environments. The relatively slow signaling rate of the original ARCnet specification has been viewed as a disadvantage by some, but the actual performance of ARCnet in real-world networks is often surprisingly high. Because of its token-passing architecture, ARCnet handles traffic levels close to its theoretical maximum very efficiently. ARCnet is also a much simpler protocol than IBM's Token Ring, so less of the available bandwidth is taken up with managerial communications, leaving more for actual data throughput.

ARCnet today can use a star, a bus, or a combination of topologies, over coaxial, STP, UTP, or fiber-optic cabling. Signaling rates today can be a mix of the original 2.5 Mbps and a newer 20 Mbps. A variation of ARCnet known as TCNS (Thomas Conrad Network System) is available that can go as high as 100 Mbps on STP, coaxial, or fiber-optic.

Inexpensive ARCnet network adapters and hubs are available from many sources. All manufacturers of ARCnet equipment are required by licensing agreements to adhere to the standards set by DataPoint, the original developer of ARCnet, so usually there are no problems with mixing equipment from different sources. Still the user base for ARCnet equipment has dwindled considerably, to the point at which it can no longer be considered a major competitor in the network marketplace.

## Repeaters, Bridges, Routers, and Switches

The individual data link segments that we have considered thus far are, as we have seen, limited in the distance they can cover and the number of workstations they can support. This section, then will deal with the ways in which these segments can be connected together to form the large internetworks that are commonplace today.

### Repeaters

Repeaters are used to interconnect network segments into larger LANs. These devices do just what the name implies--they repeat every signal received on one port out to all its other ports. Because of this, repeaters spread not only good data across networks but also collisions and other errors. Repeaters operate at the physical layer of the OSI model, as shown in figure 2.9, and have no traffic filtering or packet translation ability. They can be used only to connect similar or identical network segments within a relatively small area. For example, a repeater can be used to connect a 10BaseT Ethernet segment using UTP to a 10BaseF Ethernet segment using fiber-optic cable. A repeater cannot be used to connect an Ethernet 10BaseT segment to a 100BaseX segment or a token-ring segment to any kind of Ethernet. To extend a network's reach beyond the strict limits of repeaters requires a different type of device to interconnect two or more networks; one that operated at a higher OSI layer.

### Bridges

The simplest of these is called a bridge. A bridge operates at the data link layer of the OSI model (see fig. 2.10). Early bridges required address tables to be hand-entered, but most bridges today are learning bridges. The technique used most often with Ethernet is known as transparent bridging. As a transparent bridge operates, it monitors traffic on all of its ports and stores the node addresses of the sending stations connected to each port in a table in memory. When it receives a packet on one port that is destined for a node address on a different port, it forwards the packet to that port so that it can reach its destination. If it receives a packet destined for an unknown node, it broadcasts the packet on all ports and listens for a response. When it receives a response on one port, it adds that node address to the table for that port, and also passes the response back to the original sender. In this way, each bridge eventually learns through which of its ports each node on the network can be reached. Special procedures are used to deal with unusual situations like multiple paths to a destination.

Figure 2.9
Repeaters are used to connect network segments at the physical layer.

Figure 2.10
Bridges are used to connect network segments at the data link layer.

The bridging technique used most often on token-ring networks is called source-route bridging. In this method, a bridge is not required to learn where every node resides on the network in relation to itself. However, a station that wants to send a packet to a station on another network must know the path to that station, including all intervening bridges that the data must cross. This information is included in the packet. Each intermediate bridge looks at a received packet to see where it has to go next, modifies the addressing information in the packet accordingly, and sends it on its way to the next bridge or to its final destination.

Stations learn the path to another node by sending out discovery packets to the destination address. Bridges add their own address to these packets and forward them out of one or all bridge ports. When a discovery packet reaches its destination, it contains the addresses of all of the bridges that it has passed through. This allows the destination node to send a packet back to the originating station containing the route of the shortest or fastest path between that origin and destination.

Almost any network protocol can pass over a bridge because the only requirements are node addresses for the destination and source. Bridges can even be used to connect dissimilar networks, such as ARCnet and Ethernet, or to provide LAN connections to a WAN, provided that the traffic on each side of the bridge uses the same higher-level protocols such as IPX, NetBEUI, or TCP/IP.

### Routers

Routers operate at the network layer of the OSI model (see fig. 2.11). Each individual network in a routed environment is identified with a unique network address. A router initially needs to be given the addresses of the networks that it is directly connected to. Routers then learn about which distant networks exist and the best path to them from other routers. When a router receives a packet on one port that has a destination network address different than the source network address and reachable through a different port, it retransmits the packet out of that port. A router does not modify the addressing information in the packet; each router on an interconnected network only has to know the destination network address to correctly forward the packet.

Figure 2.11
Routers are used to connect network segments at the network layer.

Once the packet reaches its destination network, the station with the destination node address specified in the packet processes the packet and responds appropriately. Instead of needing to know the node addresses of all the intermediate stations, and including this information in the packet as in source routing, a station communicating with another distant node merely needs to know the network address and node address of the ultimate destination. It includes this information in the packet and relies on the network routers to see that it reaches its destination.

Routers are able to handle multiple paths between a source and destination easily. When a router learns of a distant network from another router, it also learns how many "hops" away that network is--that is, how many routers a packet must pass through to reach its destination network. If a destination network is reachable through more than one port, then the one with the least number of hops is used to forward packets. This is known as a distant-vector routing algorithm. Routers broadcast information about all known networks periodically using router information protocol (RIP) packets, usually every 30 seconds. AppleTalk has a similar method known as router table maintenance protocol (RTMP), except that each AppleTalk router broadcasts its entire routing table every 10 seconds.

Under RIP, each hop initially is considered to be the same length and speed as any other hop. Because this is not always true (compare a high-speed FDDI link to a low-speed dialup line), different "costs" can be associated with each route. Routers can determine costs themselves by measuring the amount of time it takes to receive a response from a distant router, or a cost "metric" can be manually assigned to different ports. Routers add up the total costs associated with each route. In this way, a router can choose "least-cost routing" to a distant network. If one link becomes unavailable, eventually all the routers that know about that link learn about it and can use alternative, higher-cost routes. The RIP method of determining routes can be used with XNS (Xerox Network Services, the original Ethernet network protocol), IPX, and TCP/IP.

Routers can continuously measure traffic delays and monitor the status of attached links. Routers that communicate routing information among themselves only when there is a significant change to report are said to be using a link-state protocol. This is more efficient than using RIP. Under RIP, a large internetwork with many routers can be flooded with router information every 30 seconds, impeding other traffic. More importantly, a link-state protocol almost instantly relays the status of a failed router or communication line to other routers, enabling them to pick alternative routes right away, rather than waiting for the changes to be passed from one router to another once every 30 seconds, as with RIP. These features make link-state protocols desirable on extremely large networks. TCP/IP traffic on the Internet is routed using a link-state protocol called open shortest path first (OSPF). OSI networks use a similar protocol called intermediate system to intermediate system (IS-IS). NetWare uses NetWare link-state protocol (NLSP) to make it easier to manage worldwide NetWare networks. Apple has developed a new routing protocol as part of AppleTalk Phase 2, AppleTalk update-based routing protocol, which is similar to a link-state protocol.

Not every network protocol can be routed, because many of them do not include the necessary network addressing information. XNS, TCP/IP, OSI, and IPX have already been mentioned as routable protocols. IBM's mainframe SNA and the NetBEUI protocol used by Microsoft and IBM in their PC networking systems cannot be routed and must be bridged. Routers capable of handling more than one protocol sometimes have the ability to bridge protocols that don't have network addressing information and are sometimes called brouters (for bridge/routers).

Another way of handling non-routable protocols is to use tunneling. Tunneling encapsulates an entire packet of one protocol as the data portion inside an envelope of another protocol that contains network addressing information. When the envelope reaches its destination network, it is stripped off and the original packet's protocol is restored.

### Switches

A recently developed technology designed to meet the demand for more bandwidth in Ethernet networks is switching. Ethernet switches are really nothing more than extremely fast bridges with many ports. Only one or a few workstations are connected to each port, and the connection to the server usually is with a higher-speed link, such as full-duplex 10BaseT (a non-standard way of doubling throughput), FDDI, CDDI, or 100BaseT. This way, the full 10 Mbps bandwidth of Ethernet can be dedicated to one or a few workstations in a single collision domain, and high bandwidth connectivity to a server can be provided without changing any of the hardware or software at the workstation. Switching is rapidly gaining in popularity as the equipment drops in price. Many people believe that it will eventually overtake the traditional router in sales.

## Network Services

As you may have noticed, the discussion of networking systems thus far in this chapter has generally progressed from the bottom, or physical, layer of the OSI model upwards. As we pass beyond the more concrete mechanisms that concern the actual transmission of data from one network location to another, we come to the intermediate layer network services that take the lower level protocols for granted. The remainder of this chapter will cover some of the basic networking features that both rely on the lower layers to function and provide their own services to the layers above.

We are no longer directly concerned here with protocols per se. Networking features like file systems and print services utilize protocols to function but operate on a higher level. In a like manner, applications running at the top of the OSI model rely on the services of file and print systems, without concerning themselves with the details of their operation. This functionary isolation is what allows networking products by different vendors to interact successfully.

If the developers of an application know exactly what capabilities to expect from a network file system, then the means by which that system operates is irrelevant to them. In the same manner, if a file system can rely on a network protocol to efficiently move data between a server and a workstation, then it doesn't matter exactly what protocol is being used. The file system can be said to have transcended the particulars of the protocol, just as the application has transcended the particulars of the file system.

### File Serving and Sharing

The first resource that networks were designed to share was disk space. In fact, the large computers at the heart of most networks are still commonly called file servers even though they may provide a great many other services to network users.

Every computer OS has its own method of storing, retrieving, and keeping track of files on a disk, with different rules, restrictions, and requirements. These methods comprise the file system of the OS. File serving to a network requires a high level of compatibility between file systems because the client should be able to view, store, and retrieve files from the server no differently than if it was accessing a local disk. Yet in many cases, the file server uses completely different operating and file systems than the client, and there may be different clients using different file systems trying to access the same data on the server. To accomplish this, the NOS has to be able to closely emulate the native file systems of whatever clients it supports. Let's look at the file systems of several common client and server OSs to understand how this is done.

If all the clients on your network use the same file system, the differences are probably not a big concern, as long as your file server can store and retrieve files using that same format. If you have clients that use more than one type of file system and wish to share files between them, this becomes more of a problem because the NOS now must present information to client applications about the same files in two different--often incompatible--formats, including the file name, size, date, time, and any other information associated with the file.

The FAT File System. The basis of the file system used by all versions of DOS is called the file allocation table (FAT). The FAT file system can also be used by OS/2, Windows 95, and Windows NT. Under the FAT file system, the disk is divided into allocation units, or clusters, of uniform size. The FAT that keeps track of these clusters is limited in size to about 65,000 entries. Because of this, larger disks require larger clusters to keep the number of clusters below the limit. A file that contains even a single byte requires the space of an entire cluster to be stored on the disk; whatever space isn't actually used by the file is wasted. On average, each file wastes about half a cluster--therefore, the larger cluster sizes used on bigger hard disks waste more space.

A FAT is stored at a specific location of the disk. Two copies of the FAT are kept on disk as a safety measure; if one of the copies is damaged, the information can be recovered from the other copy. The FAT keeps track of which clusters on the disk are already in use by files and which are free to be used. Each entry in the FAT corresponds directly to a cluster on the disk. If an entry has the value 0, the corresponding cluster is unused and available. Values from 0xFFF0 to 0xFFF7 indicate that the cluster is reserved by the OS. Values from 0xFFF8 to 0xFFFF mean that this is the last cluster in a file. If any other value is stored in a cluster, it is the number of the next cluster in that file. In this way, the FAT is made up of chained entries that contain the locations of all parts of the files on the disk, allowing the OS to retrieve files from the disk in the correct order.

Another area of the disk is set aside for the root directory, another table of structured entries that are each 32 bytes long. The directory contains the file name and other information about the file, such as the date and time it was created or last modified, size of the file in bytes, file attributes, and FAT number of the first cluster used by this file. An entry can refer to a file or to another directory called a subdirectory. File and directory names can be up to eight characters long, with a three-character extension following a period separator. All alphabetic characters in a DOS file name are stored in uppercase, and only certain non-alphanumeric characters are allowed. Characters explicitly not allowed in file names and extensions include: . `"` / \ [ ] : ; | = , ? * < > Entries in a subdirectory can point to files--which are then considered to be stored in that directory, regardless of where they are actually stored on the disk itself--or they can point to still more subdirectories. This allows more files to be stored on a disk and allows files to be organized and grouped in a hierarchical tree structure, branching out from the root.

File attributes are single-bit flags that are interpreted by the OS to indicate the type of file or other information. Under the FAT file system, the attributes can indicate that the entry is a file, directory, or volume label, is read-only or can be written to, is visible or hidden in a normal directory listing, or is a special system file or regular file. Another bit can indicate if the file has been changed since the last backup.

Of course, it is not necessary for the average user to know the intimate details of how the FAT file system works to use it. Whenever a user interacts with the file system (by issuing a DOS command, for example), all that they have to know is that certain commands generate certain actions and responses. The same is true for an application that makes use of a file system. This is why a NOS can emulate the performance of the FAT file system through a completely different means. As long as the same commands generate the same responses, the two are compatible.

The FAT file system is the simplest and most common file system used in PCs today. It has very little operational overhead and only a small portion of the disk space is needed for system tables and other uses. This leaves almost the entire disk space for file storage. Because of the low overhead and small amount of information maintained about files on the system, FAT performs extremely well on small- to medium-sized hard disks up to several hundred megabytes. As hard disks become larger, FAT performance begins to suffer. The more the disk fills up, the farther the heads on the drive have to travel between reading the FAT, which is located at the beginning of the disk, and reading the files, which may be scattered in fragments all over the disk.

There are many NOSs on the market that run on DOS and use the FAT file system as their native file system, including most peer-to-peer systems such as LANtastic, Personal NetWare, and Windows for Workgroups. These NOSs usually do not support clients other than those running DOS.

The Macintosh File System. The Macintosh file system is significantly more flexible than the FAT system that DOS users have to contend with. The Macintosh file system allows file names to be up to 31 characters long and include any character except the colon, even spaces, periods, and other characters not allowed in DOS. It is case-sensitive: `ThIsFiLe` is different than `tHiSfIlE` to a Macintosh. In addition, the Macintosh file system stores information about the type of file, the application that created it, and a pointer to the file's resource fork. The resource fork contains additional information about the file, including how it should look when viewed as an icon on the Mac's graphical desktop and special fonts, drivers, or other executable code that might be needed to use the file.

Because the file system data stored by the Macintosh can easily accommodate FAT-style file names and attributes, there have been several NOSs developed that run on the Macintosh and support DOS, as well as other Macintosh machines as clients. However, problems with file names can arise when files created by a Macintosh client have to be shared with DOS clients because file names under FAT are much more restricted than under the Macintosh OS. Sometimes, DOS clients are prohibited from accessing files that don't adhere to the FAT file name rules. More often, the NOS performs some type of file name translation whenever a directory is read or a file is accessed by a DOS client.

The High Performance File System. The High Performance File System (HPFS), first introduced with OS/2 version 1.2 and now also available in Windows NT, has extended the FAT file system's capabilities by allowing long file names up to 255 characters and additional information in the root directory, such as file creation, modification, and access dates and times. Also added in HPFS are access control lists, which control who can access certain files and directories when used in a multi-user system like a network file server. HPFS allocates disk space in units of one sector (512 bytes). This wastes less disk space.

Compared to FAT, HPFS has several other characteristics that earn it the "High Performance" moniker. First, HPFS tries to store files in one contiguous piece whenever possible. This reduces the fragmentation of files that occurs under FAT and speeds the process of reading files from disk. HPFS also has a distributed sector allocation table instead of one large file allocation table. This allows information about available sectors to be stored near those sectors, reducing disk head travel when the OS is looking for free space. HPFS also offers automatic recovery from some disk errors. When a bad sector is found on the disk, its data is stored in a good sector and a hot-fix table is updated to redirect disk access requests to the new location.

The higher performance and safety of HPFS has made OS/2 a good platform on which to build critical file server applications. Microsoft, IBM, 3Com, and others have all sold NOSs that ran on top of OS/2 and took advantage of the HPFS. As 32-bit CPUs became more widespread, Microsoft LAN Manager and IBM LAN Server began using a 32-bit version of HPFS called HPFS/386, which offered even higher performance and greater safety in a shared file server environment.

Because all the data needed by the FAT file system is also kept by HPFS, it is relatively easy for a NOS running on OS/2 and using HPFS to provide file services to DOS or other clients that expect files to be stored in the FAT file system. Some of the additional attributes and other information that HPFS keeps track of is used by the NOS to control access to files.

Some OS/2-based NOSs support Macintosh clients. The 31-character length of Macintosh file names is easily handled by HPFS, but the Macintosh system is capable of utilizing many non-ASCII characters in its file names that HPFS cannot handle. Macintosh clients, therefore, usually have to restrict their file names to the character set allowed by HPFS.

The Windows NT File System. The hot-fix feature and access control lists of OS/2 are not available in HPFS under Windows NT. However, Microsoft introduced a new file system, NTFS, that incorporates these features of HPFS and adds several new features. One major improvement is giving each file both an HPFS-compatible long name and a FAT-compatible short name. This allows DOS applications to see and access files stored on an NTFS volume without translation.

Long file names under NTFS are not case-sensitive, meaning that `This_Long_Filename` is treated the same as `this_long_filename`. However, NTFS does store whatever mixture of uppercase and lowercase characters the file is named with. NTFS long names cannot use the following characters: ? `"` / \ < > * | : NTFS returns to the cluster allocation scheme of FAT, allowing allocation units of 512, 1024, 2048, or 4096 bytes.

In designing NTFS, Microsoft included fault-tolerant features beyond those in FAT and HPFS. NTFS has a hot-fix feature like HPFS does but goes further in that it doesn't require any specific locations on the disk for any special system files or tables--under FAT and HPFS, if the disk has or develops a bad sector in one of the reserved locations, then the entire disk probably is unusable. NTFS also maintains a record of transactions against the file system and can roll back any changes that were not completed because a client lost its connection to the server or because a server disk crashed. One feature that NTFS does not have, unfortunately, is the ability to undelete files that are normally, but mistakenly, deleted.

The NetWare File System. Novell has continuously enhanced the NetWare file system, adding important new features to each of the various incarnations of the NOS. Because NetWare is a special-purpose OS designed to function as a server in a client/server environment, its file system has features specifically designed to support a variety of clients. In this section, we'll examine the NetWare 3.x file system in some detail and then briefly describe some of the new features in the NetWare 4.x file system.

The basic file system in NetWare 3.x shares many features with the FAT file system used in DOS. There is a file allocation table, although it can now have as many as entries as needed, rather than be limited to 64K, as under the FAT system. To avoid the performance penalty experienced with FAT due to excessive head travel on large volumes, NetWare reads the entire FAT into memory when the volume is mounted. NetWare has selectable cluster sizes (called blocks) ranging from 4K up to 64K. Larger block sizes allow for faster performance with lower memory requirements but increase the amount of wasted space left over in blocks containing small files.

A NetWare volume has a directory entry table (DET) that stores information about all of the files and directories on the volume. The DET is divided into 4K blocks, each with 32 128-byte entries called nodes. DET blocks are cached in memory as they are accessed. NetWare 3.x supports volume sizes of up to 32 terabytes (1 terabyte = 1,000 gigabytes), and each volume can have as many as two million nodes in the DET. On a newly created volume, the DET is small, but it grows on demand as files and directories are created on the volume.

There are three types of nodes in the DET: directory nodes, file nodes, and trustee nodes. Every directory on the volume has at least one directory node, which includes such information as the directory name, creation date and time, owner ID, a link to the parent directory, a link to the beginning of the associated FAT chain, directory attributes, and security information such as the inherited rights filter and trustee assignments.

Similarly, every file on the volume has at least one file node, which records the following: file name, owner ID; creation, access, and modification dates and times; a link to the parent directory; file attributes; and similar security information.

The third type of node, the trustee node, is used as an extension to store additional security information that doesn't fit in the primary file and directory nodes.

The FAT and DET structures contain enough information for NetWare to manage disk space; provide a high level of fault tolerance, error detection, and correction through hot-fix and transaction tracking (covered in greater detail in chapter 8, on "Novell NetWare"); and also serve files to DOS clients and others using the FAT file system. Novell describes this by saying that the DOS name space is native to NetWare. This does not mean that NetWare uses the same FAT file system as DOS and that all of the features of the FAT file system are supported as a subset of NetWare's native file system. To a DOS client, as long as the same ends are accomplished, the means to those ends are irrelevant. In fact, the NetWare 3.x file system goes well beyond DOS's FAT file system in the types of attributes that files and directories can have, in maintaining access control and security information as part of the file system, and in allowing deleted files to be salvaged long after they were deleted.

A unique feature of the NetWare file system is that additional name space support modules are included and can be used as options on any NetWare volume. Perhaps the most commonly used name space module is the one for the Macintosh file system. When this is loaded, it adds all the features of the Macintosh file system to the NetWare file system, and makes these features available to Macintosh clients. The Macintosh name space, along with other included software, enables a NetWare file server to appear to Macintosh clients as a native Macintosh (also known as an AppleShare) server.

When the Macintosh name space is added to a NetWare volume, all files and directories on that volume are given a second entry, or node, in the DET. This node contains some of the same data as the original DOS name space node--dates, times, and trustees. It also contains data specific to the Mac name space, such as a 31-character file name or folder name, and a pointer to the FAT chain containing the file's resource fork if it has one. The two nodes for a particular file are linked so that if either type of client accesses the file, the common information in both nodes is updated. This allows a Mac client, for example, to modify a document originally created on a DOS machine and still preserve all the DOS-specific information that NetWare stores about that file.

The other name space module that is supplied with NetWare 3.x is that for HPFS. This allows OS/2 clients to transparently access files either locally or on a NetWare file server and share data with DOS and Macintosh clients on the same server. The HPFS name space is also used to support the long file names that are a feature of Windows 95. While not as innovative as NTFS, Windows 95's file system simultaneously maintains an 8.3 DOS-style file name in addition to long file names with the same restrictions as in Windows NT. Both file names are retained on a NetWare volume with HPFS name space support added.

Novell also offers two additional name space modules as parts of other add-on products. These are for NFS, the UNIX standard file system, and FTAM, used in OSI-based networks. NetWare supplies support for these various name spaces as optional modules because the addition of each name space substantially increases the amount of memory required to maintain the file system. Name spaces should only be added to volumes on which those particular file types are to be stored. Although any or all of the supplied name space modules can be added to the same volume, this practice is not recommended for this reason.

The NetWare file system has other features that are useful in a file-serving environment. NetWare uses all available RAM not taken up by other processes to cache recently accessed data. It also uses an elevator seeking algorithm to organize and prioritize disk read and write requests to minimize head movement. NetWare tries to read ahead on large sequential files when client activity indicates that this data will be requested soon. This allows these requests to be served out of memory instead of requiring additional disk accesses. NetWare can evenly distribute read requests across mirrored or duplexed disk pairs, potentially doubling the overall file system throughput.

When Novell introduced NetWare 4.0, it also introduced an improved file system that includes all the features of NetWare 3.x, plus several important new ones:

- Larger default block sizes
- Block suballocation
- File compression
- Data migration

A larger block size allows more of a file to be read in a single disk read request and reduces the amount of memory required to manage a given volume size. Instead of wasting the entire unused portion of a partially used disk block, NetWare 4.x divides these blocks into 512-byte suballocation blocks. These suballocation blocks are used to share the block with the "leftover" ends of other files.

NetWare 4.x introduces an integrated file compression system that can increase available disk space by as much as 63%, according to Novell. Individual files and directories can be included or excluded from the compression, and the length of time that a file remains unused before being eligible for compression can be varied. With the proper hardware, NetWare 4.x can also automatically migrate seldom-used files to less expensive mass storage media, such as optical disks or tape.

Thus, you can see that a NOS's file system must be considerably more versatile than that of a workstation's OS. In addition to supporting different types of clients, it must also be able to maintain performance levels for far greater amounts of storage space. To the client, however, what is important is not how these tasks are accomplished but simply that they are.

File Sharing. When developing a multi-user file system, a lot of attention must be given to either preventing concurrent access to a particular file or allowing concurrent access while protecting the file from multiple attempts to change it. Otherwise, many situations will arise in which files are damaged or data is lost.

As an example, suppose that client A's PC reads a file from the server into an editing program. While client A is working on the data in the PC's memory, client B's PC reads the same file into an editing program and makes some changes. Client B saves the edited file back to the server, overwriting the original contents of the file. Later, client A saves his version of the changed file back to server, believing that he also is overwriting the original contents of the file. In fact, client A has overwritten the edited file saved by client B, thereby wiping out client B's changes.

Network-aware versions of programs such as word-processors and spreadsheets can detect situations such as these and prevent data from being lost. Because file serving systems in use today allow a client to treat files on a remote, shared disk just like files on a local disk, programs that are designed for use on stand-alone systems usually do not change their behavior on a network client, sometimes damaging files and losing data.

Multitasking, single-user OSs such as Microsoft Windows and OS/2 allow multiple applications to be run simultaneously on a single PC, potentially leading to several applications accessing the same file on a local disk. This can be just as dangerous as multiple users accessing the same file on a remote server's disk.

A variety of methods are used by both client and NOSs to prevent multiple clients or applications from simultaneously accessing files in ways likely to result in lost data. To illustrate how those methods are used, we will look at several examples. Most of the examples use DOS as a client and NetWare as a file server because these are by far the most commonly used client and server. Other client and server OSs have similar capabilities.

Single- and Multi-User File Access Methods. PC OSs have well-defined file access methods for use by applications and utility programs. DOS versions since 3.1, for example, use both access codes and sharing modes, along with file attributes, to control file access by multiple applications or users. Every time an application opens a file through DOS, it must explicitly set both an access code and a sharing mode.

Access codes allow an application to open a file for read access, write access, or both, depending on the application's needs. If an application attempts to open a file for write access or read/write access and the file has the read-only attribute bit set to 1 (True), the attempt fails. This should result in a helpful error message displayed to the user.

Sharing modes control access from other applications by allowing the opening application to deny write access, read access, or both kinds of access to other applications. An application can open a file with a deny read/write mode that prevents any other application from opening the file until the first application closes it. If an application uses the deny write mode, other applications or users can read or view the file, but are not allowed to change it in any way. This has practically the same effect as setting the read-only attribute on the file and often generates the same error message in an application that attempts to write to the file when not allowed to do so.

DOS-based NOSs, such as peer-to-peer networks, have to rely on the DOS file access control methods and good programming practices to develop the applications used on them. There is no explicit security at the file system level. When files are stored on a file server with a more sophisticated file system like HPFS, NTFS, or NetWare, however, security features such as access control lists are included as an integral part of the file system. As long as a file server is physically secure, the file system security on the server usually cannot be compromised by a client unless that client knows the logon name and password of a privileged user.

In HPFS, each file is represented in the directory structure by an entry 512 bytes long that contains the file name, location on the disk of the first sector of the file, and a list of permissions associated with the file. More extensive access control can be accomplished with the use of extended attributes. Each file can have up to 64K of extended attributes, and NOSs running on OS/2 can define their own uses for them.

The file systems in NetWare versions 3.x and 4.x provide extensive and flexible security features. Novell's terminology differs from that of other NOSs, though the same basic concepts apply. Instead of granting various permissions over files and directories to users and groups, users and groups are made trustees of directories and files with associated trustee rights.

Trustee rights flow downward from parent directories to subdirectories and files through a process called inheritance. For example, if a user is granted certain rights to a directory, then that user also has those same rights to any files and subdirectories below that directory. The inheritance of these rights can be blocked, however, through the use of an inherited rights filter (IRF). The IRF blocks specific rights from being passed down to subdirectories. Only by explicitly granting the user rights to those subdirectories can the filter be bypassed.

A NetWare user's effective rights to a file or directory are therefore dependent on a combination of several factors, including the user's individual trustee assignments to the object and its parents minus any rights blocked by an IRF.

File attributes are used often as additional protection against mistakes. Executable files, including overlays, dynamic link libraries (DLLs), fonts, and drivers on a NetWare file server may often be flagged with the Read-Only and Sharable attributes. This prevents any accidental change or deletion of the file but allows multiple users simultaneous read access.

Automatic and Manual File Locking. The default settings that DOS uses in creating, opening, and modifying files allow for certain automatic protections against lost data. Files usually are created as read/write instead of read-only. Other default attributes are non-system and non-hidden. When such a file is created by a DOS client on a NetWare file server, it is flagged non-sharable by default. When a DOS application or utility opens such a file for write or read/write access, any other application using default settings is unable to open the file except for read-only access for as long as the first application has the file open.

This level of automatic file locking usually prevents lost data even from programs that are not network-aware and from common user and programmer errors. For example, another user is prevented from erasing, copying over, or renaming a file you have opened in this default mode because any of those actions would require the file to be opened with write or read/write access.

To allow the maximum sharing of data while protecting it from loss and damage, many applications initially open a file such as a word processing document or spreadsheet in read-only mode. Often the file is closed once the data is read into memory. Only when the application is about to save changes to disk is the mode changed to allow writing. At an even greater level of sophistication, some applications see if another user has modified the file since it was first opened, by checking the date and time stamp on the file, and will not allow another user's changes to be overwritten. Protection at this level relies heavily on the intentions and achievements of the programmers who created your applications.

Rather than relying on the default protection of automatic file locking, many applications take a more aggressive approach to protecting data. For example, a word processing program might initially open a file containing a document for read/write access, with the sharing mode set to deny write access to other users, and keep the file open as long as the user is editing it. If other users attempt to open the same file using this application, they get a message telling them that someone else already has the file open and offering to either create a copy of the file or open the file in read-only mode--either of these actions requires only read access. Just as with automatic file locking, it is up to the programmers of an application to ensure that the correct modes are used to achieve the desired results.

Sharable Files and Transactions. Sometimes an application requires multiple users to have simultaneous read and write access to a particular file--this is common for database and accounting applications. In this case, the application must open its data files with a read/write access code and a deny sharing mode. These files must be flagged sharable in NetWare. Usually, such an application has some internal method of keeping track of who is allowed to change each record or part of the file.

Even when this is not the case, NetWare can provide some protection using a method known as transaction tracking. Files stored on a NetWare file server can have a special Transactional (T) attribute set. When this is set, the NetWare NOS keeps track of all changes a particular client makes to the file. Only changes made between valid file open events and file close events by that client are permanently saved to the file.

If a client opens a file, makes some changes to it, and then crashes or otherwise ends abnormally without closing the file, NetWare's transaction tracking system detects the abnormal end and undoes all the changes made by the client in that session since the last time the client opened the file.

Transaction tracking also comes into play when problems occur on the server. If a volume is dismounted for any reason, unfinished transactions on any files flagged T are backed out (that is, returned to their original state) by NetWare the next time the volume is mounted.

Page, Block, or Record Locking. When several clients might be updating data in a file at the same time, some means of locking portions of the file for the brief time those portions are being updated is required. Safe multi-user file access in a database or accounting application relies even more on correct programming than full file locking does. PC OSs allow any part of a file to be locked by specifying the beginning and length of a byte range. When an application is finished updating the file it should unlock the same range. While the range is locked, other users and applications can neither read nor write data in that area of the file. A database application programming language usually has functions that automatically calculate the values needed by the OS to lock particular records, freeing the programmer from having to develop routines to calculate these values.

Programmers do, however, still have to avoid the situation of deadlocks. Suppose that client A locks record 101 in a certain file for the purpose of updating the record. Client B locks record 201 in a different file for the purpose of updating that record. If client A needs to read some information from the record that client B has locked to complete its update of record 101, and client B needs to read some information from the record that client A has locked to complete its update, then both clients will be denied the read access they need to finish their transaction. If both clients keep retrying the read, waiting for the other to finish and release its lock, they will be stuck forever in a classic deadlock. This is a very simple example of a deadlock; the situation can become much more complicated with numerous clients at different times starting and stopping transactions that affect a large number of files. To prevent such problems, one of the clients has to detect a deadlock and respond to the situation in some other way, perhaps by aborting its entire transaction and releasing all of its locks.

To enable DOS support for application range locking within files on a local disk, the DOS command SHARE.EXE, included with DOS versions since 3.1, must be executed before the application is launched. If the programs that will be doing the sharing and locking are Windows programs, then a Windows device driver, VSHARE.386, can be used instead of the DOS TSR SHARE.EXE. The VSHARE.386 driver has been available from Microsoft since late 1992, when it was released as part of Windows for Workgroups 3.11.

When loaded, SHARE.EXE or VSHARE.386 maintains a table in memory recording which areas of the file have been locked and by which applications and users. The OS refers to this table before executing any file read or write requests and causes such requests to fail if the relevant region of the file is already locked. This usually is sufficient for running multiple applications on a stand-alone DOS or Windows machine or a DOS machine that is sharing its disk with other PCs in a peer-to-peer network.

Because SHARE.EXE keeps its table of locks in conventional memory, which is always a scarce resource, only enough memory to track 20 locks is reserved by default. Many applications that require SHARE.EXE to be loaded do not work with such a small number of available locks; Microsoft recommends increasing this number to 500 or more (using the /L:500 parameter) if sufficient memory is available. VSHARE.386 runs in the Enhanced Mode of Windows, and therefore has much greater memory resources available to it, including virtual memory. Because of this, VSHARE.386 does not have any arbitrary limit on the number of locks it can handle at once; it merely allocates memory as needed for the number of locks required.

Some Windows programs such as Microsoft Access are designed to work with VSHARE.386, and therefore expect to be able to utilize many more record locks at once than would be feasible with SHARE.EXE. This can present some problems with NOSs that only try to emulate the older, more limited behavior of SHARE.EXE for DOS clients, such as NetWare versions 2.2 and 3.11. Microsoft Access is known to cause NetWare 3.11 server crashes under certain circumstances when accessing files on the server. The currently shipping versions of NetWare do not have these problems, and older versions can be patched to avoid them.

When the file in question is stored on a remote file server, the DOS mechanism for range locking must still function correctly. This requires the NOS to keep track of all lock and unlock requests from every client and allow file reads and writes of a locked portion of the file only by the client that requested the lock. In addition, the NOS should detect when a client workstation crashes or stops processing without properly clearing its locks and should clear the locked regions of the file that were reserved by that workstation without manual intervention by the system administrator.

The concerns of network file systems clearly involve a good deal more than just transporting files from one place to another and servicing the applications running at the top of the OSI model. They must also be concerned with the way in which services are provided to individual workstation clients at the session and presentation layers to ensure that the needs of the different users do not cause conflicts that can corrupt important data.

### Printer Sharing

Providing every computer user in an office with a separate printer is an expensive proposition, and yet almost every user needs access to one. The sharing of printers has been one of the most rudimentary services expected from a LAN ever since its inception. In fact, even before business networks became commonplace, there were many fairly sophisticated printer sharing devices on the market that allowed printers to be accessed by multiple computers using standard serial or parallel ports.

Some of these devices polled each computer in rapid succession to see if it had data to be printed and then sent PRINTER BUSY signals to the other computers while one was printing. A better design incorporated a large memory buffer, allowing the device to accept print data from more than one computer at a time and then feed it to the printer in proper order.

The process of printing to a network printer, as shown in figure 2.12, is in most cases very much like using a printer sharing device that incorporates a large memory buffer. Instead of being directly connected to a printer with a cable, the client computer sends its printer output to another device--a print queue directory or print spooler file on a file server--in a process called print spooling. The print queue or print spooler collects the data until the client is finished printing, then feeds it out to the printer in a steady stream in a process called despooling. This all is done under the control of a print server, which can take the form of a software program running on the file server, on another PC, or within the printer itself. The print server manages the print output from many different clients, ensures that each individual print job is handled correctly and separately, and provides administrative services to printer users and managers.

Figure 2.12
This is a simple network printing model.

While the whole process sounds simple enough, network printing is at least as complicated as the interaction of file systems. As with network data storage, a workstation must very often be fooled into thinking that it is interacting with a locally attached printer. In addition to this, however, the printer itself must also be fooled into thinking that it is dealing with a single attached workstation. Given that, even on a small network, several different types of printers may be connected to a single print server, with a multitude of different workstation types attempting to use them, the task of managing all of this activity can be very problematic indeed.

Network printing differs from network file storage in another significant way, as well. Because network users usually can't access their local hard drives and the files themselves are invisible in any case, it doesn't look or feel very different to access a file on drive Z, which may be miles away, than it does to access a file on drive C, which resides in the user's own computer.

Network and local printers are very different, though. If users have a local printer, they know it. It's usually big, ugly, too noisy, and users can reach out and touch it. It probably has a label on the front that says what type of printer it is, helping users to pick the correct print drivers in their applications. A local printer provides immediate feedback as to whether the job was successful or not, and an unsuccessful printing attempt often has a very visible cause--the printer is out of paper, offline, not turned on, and so on--that can be remedied by the average user.

A network printer also is probably big, ugly, and noisy--usually even more so--but users often can't reach right out and touch it. Because clients don't print directly to the printer but instead print to a queue or spooler file, there may be little or no indication of what type of printer the job will end up on, and there might be no feedback to the user indicating when the job is complete or whether it was successful.

Confusing the issue even more is that different NOS vendors use different terms to refer to the same things, and sometimes use the same term to refer to different things. For example, what is called a print queue in NetWare, LAN Manager, LAN Server, and Windows 95 is called a printer in Windows NT Advanced Server and is called a spool directory in Windows for Workgroups. A print server in NetWare is a printer share in Windows NT, a print subsystem in Windows 95, and a print manager or print spool in LAN Manager, LAN Server, and Windows for Workgroups. Almost every vendor calls an actual physical printer a printer, except for Windows NT Advanced Server, which calls it a printing device. Of course, there are several different naming conventions and styles for all these objects and devices, but there is no requirement that these names be in any way meaningful to users. It is usually left up to the LAN administrator to devise a means that can be used to identify the various printers to the unsophisticated network user.

NetWare Print Queues. In discussing network print services we will use Novell's terminology as defined in NetWare 2.2 and 3.x, not because it is any more correct than the terms used by other NOSs, but because it is consistent and familiar to more people. Equivalent concepts and terms used by other networking systems will be defined when appropriate.

Network printing begins at the client workstation. Most DOS and Windows applications don't understand network print queues and printer redirection any more than they do network server and volume names. They know only about LPT1, LPT2, and LPT3, the common physical printing ports on PCs. Therefore, the first step is to use some method to ensure that printer output from an application will actually go to a network printer instead of a local one. This is the same sort of resource redirection that occurs when files are accessed from network drives. In NetWare, the MAP command is used to assign a local workstation drive letter to a network volume for the duration of a session, and the CAPTURE command likewise redirects printer output to the network interface until the command is countermanded or the network connection closed. A typical usage is

    CAPTURE LPT1 /S=SERVER1 /Q=PRINTQ_0

This redirects any output intended for LPT1 to the print queue directory named PRINTQ_0 on the NetWare server named SERVER1. The CAPTURE command has several other parameters that can be used to modify the look of the printed output and provide administrative services, such as banner pages identifying the originator of the print job.

Under NetWare versions 2.2 and 3.x, network printing is redirected explicitly to a print queue, which is nothing other than a subdirectory on a file server. Because the print output of a client is simply stored in a file, users are able to print from their applications even when the physical printer they intend to use might not be available because it is out of paper, offline, or malfunctioning. Several clients can print to the same print queue at the same time; each client's print job is stored in a uniquely named file in the queue directory. The job is not sent to the printer until the client application is finished printing and the file is closed. The print queues on a particular server need to have been defined ahead of time by the system administrator.

This first step is where a lot of network printing problems arise. Many circumstances can prevent a print job from immediately reaching the printer. Users might not realize what the problem is, so they might reprint jobs many times in the hope that one of them will actually print. Once the printing problem is resolved by the system administrator or help desk, all the copies of the print job that the user generated might print.

Another common problem occurs when a user chooses the wrong printer driver, or an application is configured to expect a certain type of printer but the client's printer port is redirected to a queue serviced by a different type of printer. Sending a print job with a graphic intended for a LaserJet to a dot matrix printer, or vice versa, often results in many pages of useless random characters. When this happens at a local printer, it is usually noticed right away and the print job aborted. A network printer often is in a different room or location than the client PC, however, and often is in a room with no people around. In addition, the user often will not hold a sufficient security clearance to directly manipulate a network print queue. Hundreds of pages of garbage might print out before an administrator notices the existence of a problem.

NetWare Print Servers. The next step in the printing process is that a print server assigned to service this particular print queue notices the new file in the queue directory, and begins reading the file from disk. The print server is a software application that can be running in one of several places. Novell supplies print server software that can run on the NetWare server, a dedicated PC, or a NetWare bridge/router. Several companies also manufacture dedicated print servers--these may take the form of a small cabinet that has a network interface and one or more printer connections or an expansion card that installs into a slot within the printer itself. In either case, the print server is actually a small computer running NetWare-compatible print server software.

The convenience of this latter solution has made print server cards, especially the JetDirect line made by Hewlett Packard, a very popular means of networking printers. Once the card has been configured, one simply plugs a network connection directly into the printer and turns it on. The printer is then automatically logged on to the appropriate server, and the hardware is ready to go.

Whatever form it takes, the print server software is configured by the system administrator when it is installed. This involves defining one or more printers to be handled by the print server, and assigning print queues to printers. The dedicated print servers previously mentioned usually can only service printers connected directly to them. In the case of a card installed directly in a printer, only that printer can be managed by the server. External print servers have from one to three printer ports where you can attach printers to be managed by the server.

The print server software included with NetWare versions 2.x and 3.x can manage up to 16 printers. This software may be running on the NetWare server itself as an NLM, which does not take up a licensed connection. It may also be running on a PC dedicated to this job, which must be logged on to all file servers that contain print queue directories to be serviced.

Network Printers under NetWare. Network printers either can be directly attached to the computer running the print server software or can be remote printers. Remote printers can be attached to DOS, Windows, or OS/2 workstations that run RPRINTER.EXE, a small DOS TSR program. RPRINTER runs in the background on the workstation, and moves print jobs from the print server to the printer port. It can notify the print server if the printer has an error condition such as being out of paper or offline. The print server in turn can be configured to notify one or more users or groups that there is a printer problem.

To further confuse the issue, many of the dedicated print servers mentioned earlier can be configured to operate in Remote Printer mode. This allows them to be managed by a different print server without needing to take up one of the concurrent logons allowed by your NetWare license. A single print server can service queues on up to eight different file servers at once. This allows users on different file servers to share a printer without needing to be logged on to the file server where the print server is located. All they need to do is redirect their printer output to a queue located on their default file server.

Printing Security. In most NOSs, printing services have several security features. When a print queue is created in NetWare, the group EVERYONE is automatically assigned rights as a queue user and is allowed to place print jobs in a queue. The group EVERYONE can be removed as a queue user, and other groups or individual users can be added. This feature comes in handy when there are special-purpose printers to which only a few people should have access, such as a printer in Accounting used to print checks.

Other network systems have access control lists containing the users and groups allowed to use certain printers and might allow a password to be assigned to a shared printer. When users try to use such a printer, they are prompted for the password and must enter it correctly.

Similarly, the user Supervisor is made the default queue operator. Queue operators can open and close the queue, rearrange the order in which queued jobs will print, delete jobs before or while they are printing, and add or remove queue users.

There can be many print queues on several file servers, used by different users running different applications using various printer drivers and special print job configurations, served by multiple print servers, each of which can have many printers. The configuration of print queues, file servers, print servers, and local and remote printers can get quite complex in larger networks. It's no wonder that users often don't know where their print job has gone, or why it comes out looking the way it does.

Of course, as difficult as all this may seem to the user, the many levels of communication needed between the various components of the network printing system are assuredly more complex than she would ever imagine. In the case of NetWare, a special network level protocol called SPX (Sequenced Packet Exchange) is devoted almost entirely to printing-related communications. This is because a high level of reliability is required to deliver data to a printer. A single incorrect character can turn a 50-page report into 150 wasted pages.

Once again, we see the way in which intermediate level network mechanisms service the higher layer processes (such as the applications and printer drivers that generate the printer file) and at the same time are serviced by the lower layer protocols, which deliver the files to the appropriate destination, as ignorant of their contents as postal workers are of the letters they carry.

### Network Accounting and Auditing

In addition to services that directly benefit the end user, such as file and print systems, all modern NOSs have built-in accounting services to track network usage. These can be combined with account restrictions to control access to network resources. These systems function at the intermediate levels of the OSI model as well. A user can instruct an application to overwrite a particular file on a network drive, and the Network protocol can deliver the file to the destination, but it is the NOS's accounting and security measures that will intervene between the two and prevent any proscribed activity from being completed.

In addition to those built in to the NOS, there also are add-on network management packages that can supplement or replace these services. A network administrator can measure, record, and control such events as

- User logons and logoffs
- Disk space used by specific users and groups
- Network traffic generated (in packets, bytes, or both)
- Print jobs sent to network printers
- Number of pages printed
- Applications used, including when and for how long

NetWare has a great many options available for network accounting and auditing, although other NOSs are catching up fast. Fueling the push to further develop these network features is the growing realization that installing and maintaining network services has many hidden costs. The majority of the expenses associated with a network occur after it has been installed.

No matter how much future growth is assumed when a network is designed, users always seem to deplete resources faster than anticipated, creating chronic shortages of disk space and bandwidth. Constant and rapid expansion of the network's capacity in response to the ever-growing demand is not economically feasible for most organizations, yet controlling network usage requires knowing who is using what resources and how much. Many organizations require detailed justifications for capital expenditures for new equipment; also, some organizations need to charge back to individual departments a proportionate amount of the expense of shared resources such as the phone system and computer network. Network accounting and auditing services make the processes easier and more accurate.

Some of the auditing and control features of NetWare are built into NetWare's security system. For example, logon times can be restricted to normal working hours, and particular users can be restricted to certain workstations. By using NetWare accounting services, complete records can be maintained of when and where users log on and off. Similarly, disk space usage can be limited for individual users and in specific directories. This can help postpone the nearly inevitable need to expand disk storage on a server. The number of blocks of data written to and read from network disks by each user over a period of time can be recorded, and network traffic statistics can be broken down by user.

New in NetWare 4.x is a type of user called an auditor. The auditor can monitor almost any kind of event or resource usage on a network, including such events as file and directory creations or deletions, trustee rights modifications, or any change to a user account, without needing the kind of rights usually reserved for a system administrator or supervisor. Indeed, the feature is specifically designed to be independent from the role of the administrators so that they too can be supervised when necessary.

### Local Area Network Communications Applications

File and printer sharing were the basis for the conception and acceptance of the LAN in the business world. However, the ubiquitous presence of the enterprise network and the communications capabilities that are inherent in a LAN have, in recent years, given rise to a class of network applications and services that are rapidly becoming indispensable in the business world.

E-Mail. The first specifically LAN-oriented application to be developed, and the most common one today, is electronic mail (e-mail). All e-mail programs allow a user to type a message at a workstation, designate one or more recipients, and send the message on its way. The message is delivered to each recipient's mailbox, where it can be viewed, filed, forwarded, replied to, or simply discarded.

If the sender and recipient both have access to the same file server or electronic post office, the message may be delivered by the sender's e-mail application itself by writing to a file on the server where the receiver's e-mail application will look for new messages. This is similar to one person putting a note in a neighbor's mailbox, instead of sending it through the postal service. When the sender and receiver don't share access to the same post office, however, a different service must be used to deliver the mail. Depending on the vendor, this service may be called a mail hub, messaging server, message handling service, message transfer agent, mail router, or some other name.

Communication between users of different, incompatible mail systems is made possible by the use of gateways that translate messages from one format to another. Messages can be delivered to distant recipients over a WAN or with the use of mail hubs or routers using modems to communicate over dialup lines. E-mail is the primary reason for the establishment of a WAN in many organizations.

Many PC e-mail applications allow word processing documents and other files to be sent along with a message as an attachment. Many programs include several viewers so that commonly used document types can be read without running the program used to create the attachment. Messages can also have return receipts requested so that the sender is notified when a recipient reads the message.

One of the common administrative problems with e-mail systems is the task of address book or directory maintenance and synchronization. As new users are added to a LAN, and other users are removed, many e-mail systems require the same changes to be made manually to the e-mail address book. Some e-mail programs have utilities that attempt to periodically update their address book with changes in the network's user database. These have varying degrees of success. Synchronizing changes between post offices to maintain an up-to-date corporate-wide address book is another area where a lot of administrative work is usually involved, although some e-mail vendors are attempting to address this problem. The biggest nightmare in corporate-wide e-mail systems is that different programs might be in use in different locations. Gateways are available to successfully deliver mail to another system, but very little has been done by anyone to enable automatic synchronization of address books or user directories between systems from different vendors.

The recent growth of Internet services opens the bounds of e-mail beyond the enterprise. Many corporate users are now accustomed to corresponding with clients and associates around the globe on a regular basis. Many even require the same file attachment services over Internet e-mail links, which compounds the administrator's headaches enormously.

Group Scheduling. E-mail can be used to eliminate some of the phone tag and multiple back-and-forth calls often necessary to schedule a meeting with several people. The person organizing the meeting simply sends a message to all participants, giving the meeting topics, date, time, and place. The participants respond whether they are available for the meeting or rearrange their schedules if the person requesting the meeting has sufficient authority.

Even with e-mail, finding a time when every member of a large group of people is available can be a hit-or-miss proposition and can end up taking more time than the meeting itself. Group scheduling software has been developed to address this problem. Several packages are on the market; some e-mail programs include a group scheduling module, but with others it must be purchased separately. In many cases, the group scheduling program can be made to work through an existing e-mail system for meeting notifications, requests, and confirmations.

A typical group scheduling application works like this: the person trying to organize a meeting creates an event. They may specify the participants, date, time, location, purpose, and duration of the meeting, or only a few of these items. The application examines the schedules of all the participants to see if they are available at the time specified, or might suggest a date and time when all the participants have a free time period long enough to accommodate the desired meeting duration. The program also might be able to check for conference room availability, as well as reserve other resources (overhead projector, screen, coffee pot, and so on) for the meeting.

In order for the application to be most beneficial, all users must keep their appointments detailed in the program's database, including events that are not scheduled through the program. This allows other users to see what free time they actually have available for meetings. Usually, security features can prevent other users from seeing what actual appointments a particular person may schedule, allowing them only to see what blocks of time are reserved or free. Busy executives often want their assistants to manage their group scheduling just as they manage other appointments, and most group scheduling software allows for this.

Forms-Based Workflow. A large part of the work of any organization is taken up by filling out forms with information, then forwarding them to someone else for reading, consolidation, reporting, or filing. These forms usually are paper-based, costly to design and print, and expensive to store or dispose of after they are used. Putting any information that you consider confidential in a paper form also increases the risk that it might fall into the wrong hands.

If the organization has a network infrastructure that can reach everyone, this paper trail can be reduced. Software programs exist that allow a form to be designed on a computer, and distributed over a network. The forms then can be filled out on-screen by users, and the data in various fields automatically stored in a database for later retrieval and analysis. The forms can have calculated fields--that is, fields that fill themselves in with certain information based on data entered elsewhere on the form. Individual fields may be made read-only or not viewable at all by certain users. Sophisticated forms software includes security features such as digital signatures that can be used to verify the identity of the person entering data, and forms can be sent to designated recipients via e-mail whenever desired.

## Summary

As you can see, these communications-related applications are, in most cases, quintessential examples of the client/server paradigm. Users access server-based resources that are modified by workstation processes and delivered back to the server for storage or dissemination to other users. With services like these, we approach the top of the OSI networking model. A front end, or client application, running at the workstation, makes use of a server application that may provide it with database management or message handling services. These server applications then may make use of the security, auditing, and file systems operating at the intermediate levels of the model, which in turn utilize the network, data link, and physical layer protocols to send data to other locations on the network. Each of these systems operates independently, cooperating perfectly, and yet deliberately ignorant of the other's purpose.

This chapter was not intended to present a detailed representation of the OSI reference model. That may be found in chapter 3, "The OSI Model: Bringing Order to Chaos." Nor was it intended to provide complete coverage of network cabling types and data link layer protocols (see chapter 7, "Major Network Types"), specific NOS features (see part III, "Software Platforms: NOSs and Clients"), or printing services (see chapter 23, "Adding Network Printing"). The intention was to present some of the features and services any or all of which may be operating on a network at any one time. It is sometimes easy to forget that even the simplest tasks are complicated immensely by the need to reduce all communication to a single signal traveling over a copper wire (or some other medium). As you read through the sections of this book that zoom in on particular networking topics to show great detail, never forget the whole picture and the myriad other operations that all contribute the successful operation of the network.

© Copyright, Macmillan Computer Publishing. All rights reserved.