Wednesday, September 24, 2008

PEER 2 PEER CONNECTION IN WINDOWS 98SE

Windows 98 can serve as both a network client and as a network server (it's a floor wax and a dessert topping!). While you would never use the server capabilities of Windows 98 to host a large network on which you would instead use NetWare or Windows NT Server, the peer-to-peer networking capabilities in Windows 98 are sufficient for a number of uses, including:

  • Sharing disk resources over a larger network
  • Sharing a CD-ROM drive with another computer that either doesn't have one, or that needs to share access to a single CD-ROM
  • Sharing printers over a larger network
  • Setting up a small office or home office (SOHO) network
  • Allowing a backup system to access local resources for backup

In this chapter, you learn about Windows 98 peer-to-peer networking capabilities: how to set them up, how to use them, and how to administer them. The information in this chapter can be used to fulfill any of the networking needs described in the preceding list.


NOTE: For basic networking information, be sure to first read Chapter 21, "Understanding Windows 98 Networking."


Understanding Windows 98 Peer Networking Capabilities

There are two main networking models in use: client-server and peer-to-peer. In a traditional client/server network, there is a dedicated server that has only the job of storing files for users (clients) in a central location, and also providing access to other network resources, such as printers and CD-ROM drives. In a peer-to-peer network, each computer is responsible for sharing files and printers with all of the other computers on the network.

Client/server networks, with a dedicated server, are best for larger groups of computers, particularly when there is someone with enough technical knowledge to manage the server and the network itself. Companies implement dedicated server networks when they grow to 10-25 computers, although there are exceptions (some smaller companies may implement a dedicated server if they have a specific need and if they have the technical know-how to manage one; other larger companies may maintain a peer network configuration up to as many as 50 computers). Smaller groups of computers are usually best served by a peer network.

Peer-to-peer networks have the following advantages and disadvantages:

Advantages of peer networks:

  • Easier to set up
  • Easier to maintain
  • Much less expensive than dedicated server networks
  • Spread the burden of providing services over many computers

Disadvantages of peer networks:

  • Less secure
  • More difficult to manage effectively
  • Harder to back up all network resources
  • Higher-end network applications may require a network operating system (such as NetWare or Windows NT Server) on which to run
  • Clients that also provide services to others may perform more poorly

Windows 98 includes reliable peer networking capabilities that allow you to access resources on a Windows 98 system from other systems, be they other Windows 98 systems, Windows 95 systems, Windows NT systems, or even DOS systems. Using these capabilities, client computers can perform the following tasks:


NOTE: Although you're learning about peer-to-peer networking, in any network transaction there is still always a server (the one with the resource) and a client (the one using the resource). In a peer network, all of the computers tend to be both clients and servers.


  • Browse all computers that are sharing resources
  • Browse shared drives, folders, and files
  • Open and work with shared files
  • Map shared drives or folders to local drive letters
  • Print to shared printers
  • Remotely administer Windows 98 systems providing peer networking services

For a system to share its files and printers across a network, a number of things must be true:

  • Both the server and client must be running the same network client software: Client for Microsoft Networks or Client for NetWare Networks (both can be run if necessary).
  • The server must have the File and Printer Sharing service installed, either for NetWare or Microsoft networks (you can use only one or the other).
  • Both the server and client must be using a compatible network protocol, such as NetBEUI, IPX/SPX, or TCP/IP.
  • A compatible physical network connection must be in place between the server and client. Examples include Ethernet, Token Ring, and Dial-Up Networking over either a modem or a direct-cable serial connection (this supports only peer resource sharing between two computers, and is much slower than the other choices).
  • Selected resources on the server must be designated as being shared.
  • If user-level security is being used, the specified users must be created on the peer server, or taken from a NetWare server or a Windows NT system.
  • The server and client must have defined computer and workgroup names (although the workgroup name does not need to match).

Choosing Microsoft or NetWare Peer Services and Protocols

Windows 98 can perform peer networking by using either the File and Printer Sharing service for NetWare or Microsoft networks. However, you can use only one of these peer networking services at a time. In other words, while you can run both clients simultaneously and access NetWare or Microsoft networks with them, you can perform peer networking using only one or the other services.

You should choose the peer networking service based on the most-used client service you need to run. If you need to access NetWare servers, then use File and Printer Sharing for NetWare networks. Otherwise, using File and Printer Sharing for Microsoft networks is usually the best choice, whether or not you're also accessing Windows NT Servers.

For small networks, the NetBEUI protocol is your best bet. The only drawback to NetBEUI is that it isn't routable, so if there's a router involved on your network (for example, in a larger corporate network), then TCP/IP will work better. If you're using the File and Printer Sharing service for NetWare networks, then you need to use the IPX/SPX protocol regardless.

Choosing Hardware for a Small Peer Network

If you need to network just a few computers together (up to about eight), and don't need any of the advanced security or networking features offered by Windows NT Server or NetWare, then Windows 98 provides a good platform for building such a network. With Windows 98, you can easily share files and printers across a network, which is what is needed most of the time, anyway; most small networks can still be very productive without the features of NetWare or Windows NT Server.

For setting up small home networks, or small office networks, it's best to go with some standard choices for these requirements, and it's easy and relatively inexpensive to do so. Consider the following items:

  • You need to decide how you will wire the network (even if it's just wires snaked across a room). You'll need to know the location of each computer, and where you plan to locate the hub.
  • You should purchase a simple 10Base-T Ethernet hub (one with four to eight ports) that will cost about $150. You should choose a hub from a reputable manufacturer, such as Asante, SMC, 3Com, or HP. While these companies make high-end hubs costing close to $1,000, they also offer small office hubs in the price range described.
  • For each computer, you will need a standard 10Base-T Ethernet card, costing between $60-$100. Again, stick with name brands for these cards. 3Com or SMC are both very good (and often can be ordered along with new computers, built into their motherboards) and there are many others, besides (the author and technical editor both prefer 3Com, by the way).
  • You will need an appropriate number of 10Base-T cables to run from each computer to the hub location. No cable can be longer than about 300 feet (100 meters). If you plan to occupy the space for more than a year or so, then it may make sense to bring in a network wiring professional to do a professional job and run the cables through the walls.

10Base-T or 10Base-2?


There are two forms of Ethernet that are widely used these days: 10Base-T (also called twisted-pair Ethernet) and 10Base-2 (also called thin Ethernet). 10Base-T Ethernet uses a star configuration with a hub to which all the computers connect. Its main advantage is that if the wiring from the hub to any computer is disconnected or broken, everything else keeps working. 10Base-2, on the other hand, uses a bus configuration where each computer is connected to the cable, one right after the other; if there's a break in the cable, the whole thing stops working. The main advantage to 10Base-2 is that it's often the cheapest way to connect several computers together that are in the same room, because there's no hub or extra wiring to have to purchase.
Most companies are phasing out 10Base-2, but if you are setting up a small peer net-work, where all of the computers are close together, then you may want to consider it.
If you decide to implement a 10Base-2 network, follow these rules:
n The maximum length of the total network cable cannot exceed 185 meters, unless you extend it with a repeater every 185 meters (up to three segments, total, are allowed).
n There should be no less than one meter of cable between each computer.
n You must use RG/58 cable; mixing cable types can cause problems.
n Each end of the cable must have a 50-ohm resistor connected, or the network won't operate.
n You cannot connect more than 30 network devices to the network, unless you extend the network with either a repeater or router.


Once you have the hardware installed and connected, you can then set up each workstation so that it has the requisite software. The following section describes this process.

Setting Up Windows 98 for Peer Networks

There are four components that must be installed into Windows 98 before you can try to connect to other computers over the network (and these steps must be carried out for each system, of course). Chapter 21 describes the Windows 98 network components in greater detail. This section gives you a quick look at how to set up peer-to-peer networking.

First, you need to load the drivers for the network card that has been installed. For newer Plug and Play systems, this should have been easily accomplished when you started the system after installing the network interface card (NIC). If not, see Chapter 12, "Supporting Devices," for instructions on manually setting up the NIC driver.

Next, you need to install the network client software that you will use. As previously discussed, you have two choices: Client for Microsoft Networks and Client for NetWare Networks. If you need to connect to both peer resources and to a Windows NT Server, or if you will be doing only Windows 98 peer networking, then choose Client for Microsoft Networks. If you need to connect to a NetWare server, choose Client for NetWare Networks. To install either client, follow these steps:

1. Open the Network control panel. On the Configuration tab, click the Add button.

2. On the Select Network Component Type dialog box, choose Client and click OK (see Figure 22.1).

Figure 22.1

Choosing a network component to install.

3. You now see the Select Network Client dialog box, shown in Figure 22.2. Choose Microsoft as the manufacturer, and then choose either Client for Microsoft Networks or Client for NetWare Networks (this example assumes Client for Microsoft Networks). After clicking OK, you may be prompted for your Windows 98 CD-ROM.

4. After returning to the Network control panel's Configuration tab, click Add again. This time, choose Protocol on the Select Network Component Type dialog box.

Figure 22.2

Choosing a network client type.

5. In the Select Network Protocol dialog box (see Figure 22.3), choose Microsoft, and then choose NetBEUI, TCP/IP, or IPX/SPX-Compatible depending on whether you chose Microsoft or NetWare client in step 3.

Figure 22.3

Choosing a network protocol.

6. Click Add again on the Network control panel's Configuration dialog. This time, choose Service in the Select Network Component Type dialog box.

7. In the Select Network Service dialog box (see Figure 22.4), choose either File and Printer Sharing for Microsoft Networks or File and Printer Sharing for NetWare Networks and click OK.

Figure 22.4

Choosing a File and Printer Sharing service.

8. Back again on the Network control panel's Configuration tab, click the File and Print Sharing button, which shows you the File and Print Sharing dialog box shown in Figure 22.5. Enable either or both types of resource sharing and click OK.

Figure 22.5

Enabling File and Print sharing.

9. Next, use the Identification tab of the Network control panel to designate a workgroup and computer name for the system. This is discussed in more detail in the next section.

10. Click OK to close the Network control panel. You may be prompted again for your Windows 98 CD-ROM, and you will need to restart the computer when prompted to do so.


TIP: At any time up until you click OK on the Network control panel's dialog box, you can cancel all changes with the Cancel button.


Direct Cable Peer Networking

For simple, low-bandwidth connections between two computers, such as a connection between a laptop and a desktop PC, a network adapter card and network cabling is not necessary. Instead, you can network the computers directly by using a serial or parallel cable. Windows 98 provides two methods for setting up a direct cable networking connection, as follows:

  • The Direct Cable Connection accessory (in the Accessories/Communication group) launches a wizard that sets up a direct-cable connection.
  • The Control Panel Modems application lets you configure a serial or parallel connection as a modem connection. You can access the other computer through this modem-cable connection by using Dial-Up Networking.

The following sections discuss these alternatives.

Direct Cable Connection

The Direct Cable Connection accessory sets up a direct serial or parallel connection between two PCs. Direct Cable Connection is in the Accessories/Communications group. If this applet is not present on your system, install it through the Add Programs Control Panel.

A direct cable network connection is much like any other network connection--the two computers must use compatible protocols, and you can establish security using the user-level or share-level security models (as described in Chapter 21). To install a direct-cable network connection:

1. Double-click the Direct Cable Connection icon in the Accessories/Communications group to launch the Direct Cable Connection wizard (see Figure 22.6).


Figure 22.6

The Direct Cable Connection Wizard.

2. The wizard will ask if you want the computer to act as a guest (to access shared files on another PC) or a host (refer to Figure 22.6). The host option lets the PC act as either a host or a guest--you can either share files or access shared files on another computer. If a host PC is connected to a network, the guest can reach the network through the host. Click Next.

3. Choose which port you'd like to use for the direct cable connection (see Figure 22.7). Plug the cable into the port. Click Next.

Figure 22.7

Choose a port and cable type in the Direct Cable Connection wizard.

4. If you are configuring the computer as a host, and the computer isn't currently configured with shared resources, the wizard will prompt you to create some shared folders that the guest can access (see Figure 22.8). Follow the instructions and click Next.

Figure 22.8

The Direct Cable Connection wizard prompts you to share folders on the host.

5. The wizard instructs you to plug the cable into both computers (if you haven't done so already) and to run the Direct Cable Connection wizard on the other PC. You are offered the option of setting password protection for the host PC. Check the Use Password Protection box to set up password protection, and click on Set Password to enter a password for the host.

6. Click Finish.

The direct cable connection can act as a NetBIOS gateway to a TCP/IP network. If you plan to use the host as a gateway to a TCP/IP network, use NetBEUI for the direct cable connection.


NOTE: You cannot use Direct Cable Connection and Dial-Up Networking at the same time. Shut down all Dial-Up Networking connections before you attempt to use Direct Cable Connection.


Direct Connection Through Dial-Up Networking

You can also connect two PCs through a serial or parallel connection by using Dial-Up Networking (DUN). See Chapter 26 for a complete description of Windows 98's Dial-Up Networking feature. Once you set this up, you "dial" the other computer--just as you do with a remote Internet connection--over a modem cable. The Direct Cable "modem" is configured the same way as a real modem, with a bound network protocol, such as TCP/IP, on each end.

When you open the Modems control panel and choose to add a new modem, and then choose to manually select one from a list, you can choose (Standard Modem Types) in the Manufacturer list, and then either Dial-Up Networking Serial Cable Between 2 PCs or Dial-Up Networking Parallel Cable Between 2 PCs.

Once the modem cable is installed, set up a Dial-Up Networking connection through the modem (see Chapter 26).


NOTE: You can purchase the special cables required to connect two computers by using DUN from most computer stores. If you are setting up a serial connection, you purchase a null-modem cable that has a female RS-232C connector (9- or 25-pin, as appropriate for the computers) on each end. If you are setting up a parallel connection, ask for a parallel-to-parallel cable, such as the one used by LapLink or other direct-connect programs (it should have a male DB25 connector on each end, with all wires supported).


Understanding Workgroups and Identification

For peer networking, Windows 98 supports a Workgroup model that lets you divide up the resources (computers) on the peer network into groupings of computers. These groups do not have any function other than to help users browse the computers available and more easily find the one that they're looking for. Workgroups do not deny access to users in different workgroups, nor do they have to be created and maintained. All that must be done is to identify each computer as being in a particular workgroup.

For example, in a larger organization using peer networking, you might create workgroups for each department: one for finance, operations, marketing, sales, and so forth. When a user goes to locate a particular computer, they can more easily find it by opening one of the workgroups shown inside Network Neighborhood.


File and Printer Sharing for Microsoft Networks: Browse Masters


If you use File and Printer Sharing for Microsoft Networks, the peer network uses some of the computers within each workgroup as master browse servers, or browse masters. These computers, which are "elected" from among all the computers in the workgroup, maintain the list of all computers and resources within the workgroup. Depending on the number of computers in the workgroup, there may be more than one Browse Master, and there may also be Backup Browse Masters. Generally, there is one Browse Master for each 15 computers in a workgroup. There will also be at least one Browse Master for each protocol used in each workgroup, so if you are using both NetBEUI and TCP/IP, there will be at least two Browse Masters, one per protocol.
It is the Browse Master's job to respond to peer network browse requests from other computers wishing to view the resources, usually through Network Neighborhood. If a Browse Master leaves the network (is turned off or shut down), a new one will automatically be elected. The use of Browse Masters significantly reduces network traffic, because it eliminates the need for a peer workstation to have to query every computer within the workgroup in order to find out what resources are available. Instead, it can request a single list from the Browser Master, using a single network transaction.
There is a slight memory cost for a computer acting as a Browse Master, and on some systems you may want to control whether or not they can be used for this purpose. You do this by opening the Network control panel, and then on the Configuration tab, you open the properties for File and Printer Sharing for Microsoft Networks. In the dialog box that appears, you can choose from three possible settings for the Browse Master setting: Automatic, Disable, and Enable. Automatic means that the computer may be elected to be the Browse Master, Disable means that it never will be, and Enable means that it will always be a Browse Master whenever it is turned on and participating in the workgroup.


Each computer is also identified to the network for this same purpose with a computer name. You can assign whatever name you like to each computer, which is then shown as the peer network is browsed. Most people use the user's name to identify their computer, but you can use any name that makes sense.

Both the workgroup and the computer name are set by using the Identification tab of the Network control panel, shown in Figure 22.9.

Figure 22.9

Specifying a workgroup and computer name.

Troubleshooting Peer Networking Problems

Peer networks are fairly straightforward, but there are always problems that can crop up with any network. There are many possible points of failure, particularly when you're just setting one up. If you're having trouble with a peer network, consider the following items:

  • Ensure that the network interface card is functioning. For instance, does Device Manager report a problem with the network interface card? Also, some NICs have their own diagnostic programs that can help identify a bad card.
  • If you're using a 10Base-T network, is the hub functioning? It should include lights that indicate when it "sees" data on the network (traffic lights), and you should see these lights illuminate as you power a computer up that is properly connected.
  • Many 10Base-T Ethernet cards also support 100Mbps speeds (100Base-T). If this is the case, make sure that all of the cards on the network are set the same way, and if you're using the 100Mbps setting, make sure the hub supports that speed. Also, the network cards and hubs must also have the same setting for whether they are operating at full or half-duplex operation.
  • If you're using a thin-Ethernet (10Base-2) network, make sure that you're using the right type of cable (RG-58) and that you have the correct terminators installed at each end of the network (they must be 50-ohm terminators). Also, ensure that the T-connectors are properly connected to the NIC cards, and that any barrel connectors are firmly connected.
  • Make sure that all the computers have the same network settings in the Network control panel; they should all be using the same client, protocol, and File and Printer Sharing service.
  • If the problem is that no computers can see any others, particularly when there are more than two computers, suspect the wiring or the network hub. If you're setting up a two-computer peer network, and can borrow a third computer, this can be very useful in helping you to determine if the problem is with either of the computers, or with the wiring or hub.
  • Sometimes a computer won't appear in the Network Neighborhood list when it is turned on because the Browse Master hasn't updated its list yet. You can still access such computers by using the Start Menu/Find/Computer command and then specifying the name of the computer you are trying to access.
  • If a computer listed in the workgroup isn't responding and you can't open its shares, it may be because it was improperly shut down or lost power. It can take between 10-45 minutes for the Browse Master to realize that a computer is missing from the Workgroup if it didn't go through a normal shutdown process. Even when it is normally shut down, it still takes a while for the list of available computers to be updated, particularly if the computers on the network are busy (updating the browse list is a low-priority job).
  • TCP/IP settings can often be tricky to get right. You should check and make sure that all of the TCP/IP settings are correct for each computer. See Chapter 25, "Windows 98 with TCP/IP," for more information.

Conclusion

Peer networks can be useful in certain circumstances, such as when setting up a small network that needs only peer capabilities, or when you need to share a resource across a corporate network on occasion. However, they are much more difficult to centrally manage than a network based on Windows NT Server or NetWare. Moreover, in a larger environment, it can be wise to disable peer networking from the clients, because users will invariably share resources inappropriately, and your company may have security requirements that will be unintentionally violated.

In this chapter, you learned about peer networking features in Windows 98, how to install them, and how to use them. You should use this chapter in concert with Chapter 21, "Understanding Windows 98 Networking." Also, if you want to perform peer networking within a traditional network environment, make sure to read Chapter 23, "Windows 98 in Windows NT Domains" and Chapter 24, "Windows 98 with NetWare/InternetWare Networks."

Direct DOS print outs to network printers

If you want to print from a DOS program to a network printer, you have to bind the printer port used by the particular DOS program to the network printer path.

For example, let's say your DOS program prints to LPT1 (most DOS programs do) and your printer is on the network at the following network path:

\\MY_SERVER\PRINTER

  • Go to the "DOS/Command Prompt"
  • Type the following command:

    NET USE LPT1: \\MY_SERVER\PRINTER

    and press ENTER.

Example:

net (space) use (space) lpt2: (space) \\pavilion\hp1100 (space)/persistent:yes

No comments: