Inside Windows 98

Previous chapterNext chapterContents


- 21 -

Using Dial-Up Networking and Direct Cable Connection


Windows 98 includes a feature that enables you to use your computer to dial into a server to connect to remote networks, including the Internet. Windows 98's collective name for this feature is Dial-Up Networking.

Windows 98 also includes a feature called Direct Cable Connection that enables you to connect PCs using serial or parallel cables to create a mini-network. With Direct Cable Connection you can network computers through their serial or parallel ports rather than through a network interface card (NIC). This chapter explains Dial-Up Networking and Direct Cable Connection, covering the following topics:

In addition to enabling you to connect to remote computers and LANs, a server module included with Windows 98 enables you to use your Windows 98 workstation as a Dial-Up Networking server. This enables other users to dial into the computer to gain access to your local resources or to your LAN.

Overview of Dial-Up Networking

The capability to dial into a remote computer or network to use the computer's or network's resources is called remote access. In Windows 98 and Windows NT, the capability to dial into a remote system or act as a dial-in server is generally termed remote access services, or RAS. The computer that dials in is called the RAS client. The computer that provides access is called the RAS server.


NOTE: The terms Dial-Up Networking and Remote Access Services are used interchangeably in this chapter.

Windows 98 includes a RAS client that Microsoft has named Dial-Up Networking. You can use Dial-Up Networking to connect to a RAS server to gain access to the server's shared resources and gain access to the network to which the server is connected. If you have a RAS server connected to your office LAN, for example, you can dial into the server from your home or hotel and access the LAN as if you were sitting in your office with your computer connected directly to the LAN. You can use the dial-up connection to access directories and files, send mail, perform scheduling, and even print. You are limited only by the speed of the connection.

The Windows 98 RAS client also enables you to connect to the Internet through a dial-up Internet service provider. If your office LAN is connected to the Internet, you can dial into a RAS server at the office to access the Internet, provided the RAS server supports IP routing.

To use the Dial-Up Networking client in Windows 98, you must have the following:

To use Windows 98 as a Dial-Up Networking server, you must have the Dial-Up Networking server software, included on the Windows 98 CD.

Understanding the Dial-Up Networking Client

The Dial-Up Networking client in Windows 98 (see Figure 21.1) uses the Dial-Up Adapter driver supplied with Windows 98 to enable the computer to connect to remote servers through a modem. The Dial-Up Networking client supports the following selection of connection protocols:

FIGURE 21.1 A typical Dial-Up Networking property sheet.

You can use the Dial-Up Networking client for a variety of purposes, including accessing remote LANs, connecting to the Internet, sending and receiving mail remotely, and sharing files and printers with other non-networked users. If you simply want to share a few files with a friend, for example, one of you can configure your Windows 98 workstation as a Dial-Up Networking server, and the other can use the Dial-Up Networking client to connect to the server to copy files between the systems. Dial-Up Networking also is the mechanism Windows Messaging (Exchange) and Outlook Express use to enable you to process remote mail--sending and receiving mail from a LAN-based Microsoft Mail postoffice or POP3 account. Dial-Up Networking also makes possible dialing into a UNIX mail server to send and receive mail.

If you use an online service, such as America Online or CompuServe, you can use Dial-Up Networking to connect to an Internet provider or your LAN IP server, and then connect to the information service through the dial-up connection. If you don't have a local CompuServe access number, for example, but your office LAN is tied to the Internet, you can dial into your LAN's server to establish a TCP/IP connection to the Internet; then use WinCIM to establish a connection to CompuServe over that TCP/IP connection.


TIP: You must have a dial-up server that routes TCP/IP protocol before you can use the Windows 98 RAS client to establish a dial-up connection to the Internet. Windows NT and UNIX dial-up servers support IP routing. The Windows 98 Dial-Up Networking server cannot route IP, which prevents a Windows 98 Dial-Up Networking server from acting as a TCP/IP gateway.

Support for RAS Servers

The Dial-Up Networking client software is included with Windows 98. You can use this RAS client to dial into one of several types of RAS servers using a variety of protocols, including NetBEUI, IPX/SPX, and TCP/IP. The following sections describe the types of RAS servers to which you can connect using Windows 98, and explore some of the advantages and limitations of each one.


TIP: Windows 98 includes Point-to-Point Tunneling Protocol (PPTP), which enables you to establish a security network connection to a PPTP server across the Internet.

Windows 98 Dial-Up Networking Server

The Dial-Up Networking server for Windows 98 is included on the Windows 98 CD and can be added easily through the Control Panel. This Dial-Up Networking server enables you to use your Windows 98 workstation as a RAS server (see Figure 21.2), which enables other users to dial into your computer to access its resources and to access your LAN. The Windows 98 Dial-Up Networking server enables only one dial-in connection at a time. The Windows 98 Dial-Up Networking server supports NetBEUI, IPX/SPX, and TCP/IP protocols for dial-in clients, but does not support IP routing or PPTP. Clients that dial in using TCP/IP, therefore, can access only the resources shared by the dial-up server, but not other resources on the LAN to which the server is connected. These clients can gain LAN access by running the NetBEUI or IPX/SPX protocols, in place of or in conjunction with TCP/IP.

FIGURE 21.2 You can use Windows 98 as a RAS server.


TIP: The Windows 98 Dial-Up Networking server provides a limited capability to monitor and administer the server through system policies. If you use a Windows NT RAS server instead, you can administer the server remotely through a dial-up connection or LAN connection.

The Windows 98 Dial-Up Networking server supports the following clients:

Windows NT 3.5x / 4.x RAS Server

The Windows 98 Dial-Up Networking client supports connection to a Windows NT Server or Windows NT Workstation version 3.5x or later RAS server. These servers use the standard PPP protocol, enabling Windows 98 and other PPP-capable clients to connect through the RAS server. PPP is the default protocol used by the Windows 98 Dial-Up Networking client.


TIP: Unlike the Windows 98 Dial-Up Networking server, a Windows NT RAS server can support up to 256 simultaneous connections.

Windows NT 3.1 and Windows for Workgroups 3.11 RAS Server

The Dial-Up Networking client in Windows 98 can connect to a Windows NT 3.1 or Windows for Workgroups 3.11 RAS server. These servers use the RAS asynchronous NetBEUI protocol, which Windows 98 supports. In addition, clients that run Windows for Workgroups 3.11 or Windows NT 3.1 can use their RAS clients to connect to a Windows 98 Dial-Up Networking server.

Novell NetWare Connect

Novell NetWare Connect is a proprietary NetWare RAS server. The Windows 98 dial-up client can connect to a NetWare Connect RAS server to access NetWare servers on the remote LAN. To access NetWare servers remotely, however, you must run a NetWare client, such as Client for NetWare Networks, which is included with Windows 98.

SLIP

SLIP, which stands for Serial Line Interface Protocol, is the standard dial-in protocol many UNIX systems use. SLIP enables you to dial into a TCP/IP-based network served by a UNIX dial-up server running TCP/IP. Your client also must be running TCP/IP.

Understanding Security

The Windows 98 RAS client and server support pass-through security, which enables the dial-in server or another server on the network to handle remote user authentication. If you use a Windows 98 RAS server, the server can use share-level security to authenticate dial-in access. When a user dials into the server, the user provides a password, which you have assigned in the Dial-Up Networking server's configuration. If the passwords match, the dial-in user is connected and can begin to use the resources on the server or on the network to which the server is connected, provided the user has the necessary passwords for the resources.

The Windows 98 Dial-Up Networking server also can use pass-through, user-level security to authenticate access to the server and to the LAN. When the server is configured for user-level security, a Windows NT server authenticates user logon, just as it does for LAN clients who attempt to access user-level, security-protected resources on the LAN. The user dials into the Windows 98 Dial-Up Networking server, which then transmits the authentication request to the Windows NT-based security server on the LAN. If the server responds with security authentication, the dial-in user is connected and can begin to use the Dial-Up Networking server's resources and other shared resources on the LAN for which the user has passwords or access permission. If the security server denies authentication, the dial-in connection is denied and the connection fails.

The security that other types of dial-up servers provide depends on the operating system and dial-up server software. For information on using share-level and user-level security, refer to Chapter 26, "Peer Resource Sharing and Security."

Installing and Configuring Dial-Up Networking

Now that you have some background regarding RAS in Windows 98, you're ready to install and configure the Dial-Up adapter and software. The following section explains how to configure the dial-up adapter.

Planning Your Installation

Before you install the Dial-Up Adapter, you should determine which network transport protocol(s) you want to use with the Dial-Up Adapter. If you intend to use Microsoft TCP/IP, you should read Chapter 22, "Configuring Internet Connections," to determine the necessary TCP/IP settings. If you plan to use the Dial-Up Adapter to provide remote sharing of resources, you also need to install a suitable client, such as Client for Microsoft Networks or Client for NetWare Networks. The following list provides a guideline for installing protocols, clients, and services to support a dial-up connection:

In addition to installing the necessary network protocols and services, you also should install the modem you will use for Dial-Up Networking before you install Dial-Up Networking and the Dial-Up Adapter.

Installing Dial-Up Networking

Dial-Up Networking might already be installed on your computer. To determine if it is, open the Control Panel and double-click the Add/Remove Programs icon. On the Add/Remove Programs Properties sheet, click the Windows Setup tab. Scroll through the list of installed components and double-click the Communications item. If Dial-Up Networking has a check beside it, the necessary software is already installed. If not, place a check beside Dial-Up Networking and choose OK. Windows 98 will prompt you for the Windows 98 CD if needed.


TIP: Also place a check beside the Dial-Up Networking Server item if you want to use your computer as a Dial-Up Networking server.

Installing the Dial-Up Adapter

Before you can begin to use RAS in Windows 98, you must install the Microsoft Dial-Up Adapter. This adapter driver, which is included with Windows 98, serves as a virtual network interface card between your computer and its modem. The Dial-Up Adapter serves much the same purpose as a physical network adapter. The primary difference is that rather than connect your computer to others through a LAN cable, the Dial-Up Adapter provides the link through your computer's modem.


TIP: Windows 98 installs the Dial-Up Adapter automatically when you install Dial-Up Networking. As explained in this section, you need to install the Dial-Up Adapter only if you have removed it from your network configuration.

To install the Dial-Up Adapter, open the Control Panel and choose the Network object, or right-click the Network Neighborhood and choose Properties. From the Configuration page of the Network property sheet, choose the Add button to open the Select Network Component Type dialog box. Select Adapter from the list, then choose Add. Select Microsoft from the Manufacturers list. The only entry in the Microsoft list is Dial-Up Adapter. Select the Dial-Up Adapter from the Network Adapters list, and then choose OK.

The Dial-Up Adapter provides three property pages you can use to configure the adapter after you install it. To set the adapter's properties, open the Network object in Control Panel, select the Dial-Up Adapter from the network components list, then choose Properties to open the Dial-Up Adapter property sheet (see Figure 21.3).

The Driver Type property page enables you to specify which network driver you want to use with the Dial-Up Adapter. You must choose a client that is a protected-mode driver.

FIGURE 21.3 The Dial-Up Adapter property sheet.

The Bindings property page (see Figure 21.4) enables you to specify which network protocols the Dial-Up Adapter uses. Based on which protocols you decide to use (see "Planning Your Installation" earlier in this chapter), place checks in the check boxes for the protocols you want to bind to the Dial-Up Adapter. If you installed only one protocol, only that one protocol appears in the list and is selected automatically.

FIGURE 21.4 The Bindings Property page.


NOTE: You must use at least one protocol with the Dial-Up Adapter, even if you do not use a network client.

The Advanced property page (see Figure 21.5) enables you to set several advanced settings for the Dial-Up Adapter. The Record a log file option enables you to specify whether Windows 98 maintains a log file of your dial-up connections. If you choose Yes, Windows 98 creates a log named Ppplog.txt in the Windows folder and stores PPP session information in the log file. The Ppplog.txt file can be very useful for troubleshooting connection problems. If you are not experiencing any problems, however, choosing No improves performance slightly.

FIGURE 21.5 The Advanced property page.

The setting labeled Use IPX Header Compression specifies whether Windows 98 compresses IP packets. If you connect to a CSLIP (Compressed Serial Line Interface Protocol) server, enable this setting; otherwise, you can leave it disabled.

The IP Packet Size setting determines the size of network packets Windows 98 uses. Changing this setting can improve performance but requires a knowledge of your ISP's MTU value. The remaining settings apply to PPTP and VPN.

After you specify the necessary settings on the Dial-Up Adapter property sheet, choose OK to apply the changes. Windows 98 prompts you to restart the system for the changes to take effect.

Creating a Dial-Up Networking Session

After you install the Dial-Up Adapter, you can use Dial-Up Networking. You access Dial-Up Networking in Windows 98 through the Dial-Up Networking folder, located in My Computer. The Dial-Up Networking folder contains a wizard you can use to add new dial-up connections, as well as connections you have already defined (see Figure 21.6).

FIGURE 21.6 The Dial-Up Networking folder contains all your dial-up connection settings.

To define a new Dial-Up Networking connection, run the Make New Connection Wizard by selecting it from the Dial-Up Networking folder. The wizard prompts you for a name for the connection and enables you to choose which modem you want to use for the connection. You also specify the phone number to dial, and can specify the COM port settings for the connection if you want to use settings other than the default port settings. If you're not familiar with configuring a COM port, refer to Chapter 19, "Modems and Telephony."

After you specify the connection data, the wizard creates an icon in the Dial-Up Networking folder with the name you specified for the connection as the icon's description. To change the connection's properties, open the icon context menu and choose Properties. Windows 98 displays a property sheet similar to the one shown in Figure 21.7.

FIGURE 21.7 The property sheet for a Dial-Up Networking connection.

Most of the controls on the property page are self-explanatory. To configure the COM port, choose the Configure button. To specify the type of server to dial into, choose the Server Types tab to display the Server Types page (see Figure 21.8).

FIGURE 21.8 The Server Types page.

From the Type of Dial-Up Server drop-down list, select the type of server protocol you want to use. By default, the list contains three choices: NRN NetWare Connect, PPP, and Windows for Workgroups and Windows NT 3.1 (RAS). If you have installed the optional SLIP driver, the list also contains options for CSLIP and SLIP. Select a server type based on the protocol the dial-up server uses. If you connect to a Windows 98, Windows NT, or other PPP server (such as an Internet service provider), select the PPP option. If you connect to a NetWare Connect RAS server, select the NRN option. For connection to a server that uses the asynchronous NetBEUI protocol, select Windows for Workgroups or Windows NT 3.1 server. For uncompressed SLIP connections to UNIX servers, select SLIP. For compressed SLIP, select CSLIP.

Some additional options in the Server Types dialog box enable you to control the way the connection is established and the protocols used for the connection. The settings in the Advanced options group are explained in the following list:

In addition to setting advanced options, you also must choose which protocols to use during the connection. The selections include NetBEUI, IPX/SPX Compatible, and TCP/IP. Enable the check boxes for only those protocols you want the dial-up connection to use.

Using Session-Dependent TCP/IP Settings

The TCP/IP Settings button in the Server Types dialog box enables you to specify TCP/IP settings for the connection that differ from your global TCP/IP settings for the adapter. Each Dial-Up Networking connection can use a different IP address, DNS servers, and other options. Choosing the TCP/IP Settings button displays the TCP/IP Settings dialog box, shown in Figure 21.9.

FIGURE 21.9 The TCP/IP Settings dialog box.

If you want the server to assign your IP address, using DHCP or another method, choose the Server assigned IP address option button. If you need to provide an explicit IP address, choose the Specify an IP address option button, and then enter your IP address in the IP address text box. If you're not sure what IP address to use or whether you should use an explicit address or rely on a server to supply the address, read Chapter 22 for an explanation.

If you rely on DHCP to define the DNS servers, choose the Server assigned name server addresses option button. If you need to specify explicit DNS and/or WINS server IP addresses, choose the Specify name server addresses option button and enter the IP addresses of the primary and secondary DNS and WINS servers in the text boxes.

The TCP/IP Settings dialog box contains the following two additional check boxes:


NOTE: If you specify TCP/IP settings through the Network object in the Control Panel, those settings take precedent over the Dial-Up Networking TCP/IP settings. Typically, you can leave the TCP/IP settings in the Network Control Panel object blank and rely only on the Dial-Up Networking TCP/IP settings to provide a working connection. Some servers do not provide dynamic configuration information properly to Windows 98 and Windows 98 clients, however, and with these servers you must specify the settings in the Control Panel.
Dial-Up Networking provides two additional property pages for each connection. The Scripting page enables you to associate a logon script with the connection. Refer to the section "Creating Dial-Up Scripts" later in this chapter for an 
explanation of scripting and the Scripting property page.

The Multilink page enables you to configure channel aggregation, which makes it possible to use multiple communications devices concurrently (such as multiple modems) to improve performance.

Using Remote LAN Resources

After you define a Dial-Up Networking connection, you can connect to the remote server in various ways. You can open the Dial-Up Networking folder, for example, and double-click the icon of the connection you want to use. Windows 98 opens a dialog box similar to the one shown in Figure 21.10.

FIGURE 21.10 The Connect To dialog box.

Enter your username and password in the User name and Password text boxes. If you need to modify the phone number for the connection, make the change in the Phone number text box. From the Dialing from drop-down list, select your dialing location. If you need to define dialing properties such as a calling card number, prefix dialing numbers, disable call waiting, or set other dialing options, choose Dial Properties. If you're not familiar with defining or using dialing locations or options, refer to the section "Configuring and Using Telephony Services" in Chapter 19. When you are ready to make the connection, click the Connect button. Windows 98 dials the server and attempts to establish a connection. After the connection is established, a status dialog box appears giving you information about the connection.


TIP: If Windows 98 doesn't give you the option of saving your password (the Save Password check box is dimmed), you probably don't have a network client installed. Open the Network object in Control Panel and add the Client for Microsoft Networks, then reboot the computer. You should then gain the ability to save your Dial-Up Networking passwords.

Windows 98 also can make remote connections automatically. The following list describes situations in which Windows 98 automatically starts a Dial-Up Networking connection:

Windows 98 caches remote server names and their resources for future use. If Windows 98 can't determine which Dial-Up Networking connection to use to access a resource, Windows 98 prompts you to choose a connection from the Dial-Up Networking folder or enter a server name. If the connection is successful, Windows 98 associates the server and remote resource name so that it can automatically establish the connection in the future.


TIP: Sometimes Dial-Up Networking is completely automatic from session initiation to termination. If you use remote preview in Exchange to access a remote mail server, for example, Exchange establishes the connection, downloads your mail headers, and terminates the connection, all automatically.

After a remote connection is established, you can use remote resources as if they were located on your LAN or local computer. Remote nodes with which you share a workgroup name appear in the Network Neighborhood folder. You can access other workgroups and servers on the remote LAN through the Entire Network folder. Essentially, accessing a remote resource through a Dial-Up Networking connection is exactly the same as accessing it through a LAN connection, except the Dial-Up Networking connection is slower.

For more information on how to connect to remote resources, map resources to local drive IDs and ports, and share resources, refer to Chapter 26.

Using SLIP and CSLIP Connections

Although the number of networks connected directly to the Internet continues to increase, many networks do not have a direct connection to the Internet. And the number of home-based users or users who have non- networked standalone workstations and want access to the Internet is also growing rapidly.

Windows 98's Dial-Up Networking supports the TCP/IP protocol stack, which enables you to dial into various types of remote access servers and Internet service providers to gain access to the Internet. Many Internet service providers use Point-to-Point protocol (PPP) to provide dial-up Internet connections. PPP is Dial-Up Networking's default protocol in Windows 98 and is used when you connect to a Windows 98 or Windows NT RAS server.

Many UNIX servers, however, use Serial Line Interface Protocol (SLIP) or Compressed SLIP (CSLIP). Windows 98 supports SLIP and CSLIP, which enable you to use Windows 98's Dial-Up Networking to connect to SLIP and CSLIP servers. Windows 98 installs support for SLIP and CSLIP automatically when you install Dial-Up Networking.

Selecting and Using SLIP and CSLIP

You select SLIP or CSLIP for use when you create or modify a Dial-Up Networking connection. Use the steps specified earlier in this chapter to create the Dial-Up Networking connection for the SLIP or CSLIP server to which you want to connect. After you use the Make New Connection wizard to create the connection, open the connection icon's context menu and choose Properties to display its General property page. Click the Server Types tab to open the Server Types page.

From the Type of Dial-Up Server drop-down list, select CSLIP:UNIX Connection with IP Header Compression if you want to connect to a CSLIP server, or select SLIP:UNIX Connection if you want to connect to a SLIP server. Set the logon and TCP/IP options according to your server's requirements, and then choose OK. Now you can begin to use the SLIP or CSLIP connection.

Connecting to the Server

When you connect to a SLIP or CSLIP server, the server generally prompts you for a user logon name and password. When you use Dial-Up Networking to connect to a SLIP server, Windows 98 displays a Post Dial Terminal Screen dialog box after the connection is established, which enables you to enter your username and password to log on and receive the IP addresses of the server and your workstation. Write down the IP addresses, and then choose F7. Windows 98 displays a SLIP IP Connection Address dialog box in which you must enter the IP address the SLIP connection has assigned your computer. After you enter the IP address, choose OK to begin using the SLIP connection.

You might think the method described above for connecting to a SLIP server could be easier. You're right. Fortunately, you can use a script to automate the process. The next section explains how to use scripting with Dial-Up Networking to automate connections.

Creating Dial-Up Scripts

Many RAS servers and service providers require you to respond to prompts or choose from a menu of options to establish a connection. If you have the Windows 98 CD, you can use an optional scripting component to automate connections to any type of server, regardless of the type of protocol it uses. If you connect to CompuServe through Dial-Up Networking, for example, you can use scripting to automate the CompuServe logon process.

Windows 98 installs scripting support automatically when you install Dial-Up Networking. Windows 98 places some sample Dial-Up Networking scripts in the \Program Files\Accessories folder. You use the Scripting property page to associate a script with a Dial-Up Networking connection and debug the script, which you learn later. Right now, you need to learn how to create and edit scripts.

Creating and Editing Scripts

You can use Notepad, WordPad, or any ASCII file editor to write and edit Dial-Up Networking scripts. A script consists of various statements that set the port properties, transmit a string to the server, wait for a string from the server, retrieve IP address information, and perform other tasks that help automate the logon and connection configuration process.

Each script includes a procedure named main, which defines the entry point (starting point) of the script. The main procedure contains statements that automate the connection or other task you use the script to accomplish.

The scripting language used in Scripting for Dial-Up Networking resembles the scripting languages that many communications programs use. If you're not familiar with scripting or writing scripts, the easiest way to begin to understand scripting is to open and view one of the sample scripts provided with Scripting for Dial-Up Networking. You can use these scripts as starting points for your own scripts, modifying them as necessary to suit your needs. The following is the CompuServe script (CIS.SCP) provided with Scripting for Dial-Up Networking:

; This is a script file that demonstrates how
; to establish a PPP connection with Compuserve,
; which requires changing the port settings to
; log in.
; Main entry point to script
;
proc main
; Set the port settings so we can wait for
; non-gibberish text.
set port databits 7
set port parity even
transmit "^M"
waitfor "Host Name:"
transmit "CIS^M"

waitfor "User ID:"
transmit $USERID
transmit "/go:pppconnect^M"
waitfor "Password: "
transmit $PASSWORD
transmit "^M"
waitfor "One moment please..."
; Set the port settings back to allow successful
; negotiation.
set port databits 8
set port parity none
endproc

This script is fairly simple. It sets the data bits and parity of the connection, then transmits a carriage return (Enter) to CompuServe and waits for the Host Name: prompt. After the script receives the Host Name: prompt, it transmits a command to CompuServe (/go:pppconnect^M) to establish the PPP protocol. Then the script waits for the Password: prompt, and re-sponds with the password when the prompt is received. After the connection is established, the script changes the port settings again. The endproc statement ends the script.

Browsing through this script shows you that the script relies on some variables for the user ID and password. Scripting for Dial-Up Networking supports a couple common variable names that define Dial-Up Networking variables, as follows:

Later in this section is a script command reference that explains the script commands that Scripting for Dial-Up Networking supports. The next section explains how to associate a script with a Dial-Up Networking connection and debug the script.

Working with Scripts

The Scripting property page for a Dial-Up Networking connection (see Figure 21.11) enables you to select a Dial-Up Networking connection with which to associate a script, change the properties of a Dial-Up Networking connection, and control a few properties that define how the script runs.

To associate a script with a Dial-Up Networking connection, right-click the Dial-Up Networking connection and choose Properties. Click the Scripting tab. Then enter the path and file name of the script file in the File name text box or use the Browse button to browse for the file.

FIGURE 21.11 The Scripting property page.

If you want the terminal window to appear minimized, place a check in the Start terminal tcreen minimized check box. Otherwise, the terminal window appears on the desktop so that you can monitor the progress of the connection (see Figure 21.12). To debug the script, enable the Step through script check box. The script executes one line at a time and you verify each line, which enables you to monitor the script's success.

FIGURE 21.12 The Post-Dial Terminal Screen dialog box.


TIP: To remove the script associated with a connection, simply highlight the script filename and press Del.

Script Command Reference

The following sections explain the Dial-Up Networking scripting commands supported by Windows 98.

proc <name>

This statement begins a script procedure, where name is the name of the procedure. Every script must have a procedure named main that serves as the entry point of the script. Processing of the script begins with the proc main statement and ends with the main procedure's endproc statement.

Example:

proc main

endproc

This statement ends a script procedure. When the endproc statement for the main procedure is reached, Dial-Up Networking starts PPP or SLIP, depending on the server type selected for the connection.

delay <n seconds>

This statement causes the script to pause for the specified number of seconds.

Example to delay four seconds:

delay 4

waitfor "<string>"

This statement causes the script to pause until it receives the specified string of characters. The waitfor statement is case sensitive.

Example to wait for the string Select menu item: :
waitfor "Select menu item: "

transmit "<string>" | $USERID | $PASSWORD

This statement transmits a string to the server. You also can use transmit to send your username and password as defined by the $USERID and $PASSWORD keywords. These keywords correspond to the username and password stored with the Dial-Up Networking connection's properties.

Example to transmit the string 3 and a carriage return, followed by your password:

transmit "3^M"
transmit $PASSWORD


NOTE: Windows 98 appends a carriage return to the $USERID and $PASSWORD variables when it transmits them.

set port databits <integer>

This statement sets the number of data bits in each data word (byte) and can be set to a value from 5 to 8. If you don't specify a value for data bits, Dial-Up Networking uses the setting specified by the Dial-Up Networking connection's properties.

Example to specify 7 data bits:

set port databits 7

set port stopbits <integer>

This statement changes the number of stop bits for the port and can be 1 or 2. If you don't specify the number of stop bits with the set port stopbits statement, Dial-Up Networking uses the port settings specified by the Dial-Up Networking connection's properties.

Example to specify 2 stop bits:

set port stopbits 2

set port parity none | odd | even | mark | space

This statement specifies the type of parity checking used for the connection. If you don't specify the parity method, Dial-Up Networking uses the parity method defined in the Dial-Up Networking connection's properties.

Example to specify odd parity:

set port parity odd

set ipaddr

This statement specifies the IP address of your node for the session. You generally use this statement after you use the getip statement to retrieve your computer's assigned IP address from the server. In other words, you use the getip statement to retrieve your IP address from the server, then use set ipaddr to tell Dial-Up Networking to use that IP address for the session.

getip "<delimiter>"

This statement reads an IP address from the server. For delimiter, specify the character that separates the IP address from the characters that surround it to enable Dial-Up Networking to parse the IP address from the field.

Here's an example of retrieving the IP address when a comma is used to separate the address from other text:

set ipaddr getip ","

Comments

Text on a line preceded by a semicolon acts as a comment, which the script processor ignores. To create a comment, therefore, start the line with a semicolon.

Example:

; This is a comment

To transmit a carriage return, include ^M in the transmit string, such as transmit CIS^M or transmit CIS. To send only a linefeed character, use <lf> in the string, such as transmit <lf>. To transmit a carriage return and linefeed, use <lf>, as in transmit <lf>.

Setting Up a Windows 98 RAS Server

Windows 98 includes the components necessary for you to configure your Windows 98 workstation as a remote access server. To install the Dial-Up Networking Server software, open the Control Panel and double-click the Add/Remove Programs icon. Click the Windows Setup tab, and then double-click the Communications object in the components list. Place a check beside the Dial-Up Server item and choose OK. Follow Windows 98's prompts to complete the installation.

After you install the Dial-Up Server, your Windows 98 workstation can act as a RAS server for Windows 98, Windows NT, Windows for Workgroups, and other clients that use the PPP or asynchronous NetBEUI RAS protocols. Windows 98 also can act as a gateway for IPX/SPX and NetBEUI network transports, enabling dial-in users to access the LAN to which the Windows 98 RAS server is connected. A Windows 98 RAS server cannot serve as a gateway for TCP/IP, however. If you want to dial into a remote network to gain access to the Internet or perform IP routing on the remote LAN, the RAS server must be capable of IP routing, as are Windows NT, Shiva LanRover, and other RAS servers.


TIP: Dial-Up Networking Server does not support SLIP or CSLIP as a server, nor does it support the NetWare NRN protocol for dial-in. Dial-Up Networking Server supports only the PPP and asynchronous NetBEUI protocols for dial-in clients.

How you configure your Windows 98 RAS server depends on the type of access you want users to have. You cannot prevent access to the LAN by specifically limiting access to the dial-in server. If a user dials into the server using the proper network and RAS protocols and has the necessary permissions to access resources on the network, the user can do so through the RAS server. Therefore, you need to configure the Windows 98 RAS server to use share-level or user-level security if you want to be able to restrict access to resources on the server and on the LAN. You can implement share-level security without requiring a security server, because Windows 98 directly supports share-level security. To employ user-level security, however, the network must include a NetWare or Windows NT server that can act as the security server by authenticating accounts, passwords, and permissions. For detailed information on share-level and user-level security, refer to Chapter 26.

Whichever method of security you choose, remember that you must configure the Windows 98 RAS server for that type of security before you can configure it as a RAS server. To specify share-level or user-level security, choose the Network object in the Control Panel and use the Access Control property page to specify the security method.

Configuring the Dial-Up Networking Server

Configuring your Windows 98 computer to act as a RAS server is easy. After you install Dial-Up Server, a new menu item appears in the Connection menu of the Dial-Up Networking folder. To configure the Dial-Up Server, open the Dial-Up Networking folder and choose Connections, and then Dial-Up Server. Windows 98 displays a Dial-Up Server property sheet similar to the one shown in Figure 21.13.

Figure 21.13 The Dial-Up Server property sheet with share-level security enabled.

The appearance of the Dial-Up Server property sheet depends on whether you use share-level security or user-level security on the RAS server. If the server uses share-level security, the property sheet appears. If the server employs user-level security, a slightly different property page appears.

To enable dial-in access, choose the Allow caller access option button. If you use share-level security, choose the Change Password button to open a dialog box in which you can specify a password for dial-in access to the server. The password you specify applies to all users who dial in to the server. If the server employs user-level security, choose the Add button to add usernames and permissions from the security server. If you need help configuring user permissions, refer to Chapter 26.

After you specify the password or user-access list, choose the Server Type button to open the Server Types dialog box. If you choose Default from the Type of Dial-Up Server drop-down list, the Dial-Up Networking Server attempts to use the PPP protocol to establish the connection, and if the connection fails, it attempts to use the asynchronous NetBEUI protocol. If you select a specific protocol from the Dial-Up Networking Server drop-down list, the Dial-Up Networking Server only tries the selected protocol and terminates the connection if the protocol fails.

If you want the server to allow software compression for transferring data, place a check in the Enable software compression check box. If you want to require encrypted passwords for added security, place a check in the Require encrypted password check box. After you specify the necessary settings in the Server Types dialog box, choose OK. Then in the Dial-Up Server property page, choose OK to initiate the RAS server.


TIP: While the RAS server waits for calls, the Status text box on the Dial-Up Server property page displays the message Monitoring to indicate that Dial-Up Networking is monitoring the modem line for incoming calls. When dial-in access is turned off, the Status box displays the message Idle. As a connection is being negotiated, other messages appear in the Status text box to indicate the status of the connection.

Occasionally, you might need to terminate a caller's access to the Windows 98 RAS server. If the user forgot to log off before leaving his computer, for example, you can terminate the call from the server. Or, you might need to terminate connections for security reasons. To terminate the current connection, open the Dial-Up Networking folder and choose Connections, Dial-Up Server to bring up the Dial-Up Server property page. Choose the Disconnect User button to disconnect the current connection.

Disabling dial-in connections is equally easy. Simply open the Dial-Up Server property page and choose the No caller access option button. When you choose OK, the Dial-Up Networking Server stops monitoring the modem for incoming calls, and users cannot dial into the server.

Using Direct Cable Connection

One major improvement in Windows 98 over Windows 3.x is in connectivity. Windows 98 offers many different methods for you to connect together two or more PCs to share files and printers. One of the easiest methods is Direct Cable Connection, which enables you to connect together two PCs using a null-modem serial or parallel cable. Although Direct Cable Connection was designed to make it possible to share resources between notebook and desktop PCs, you can use Direct Cable Connection to connect any two Windows 98 PCs to create a small network.

Understanding Direct Cable Connection

Microsoft's Dial-Up Adapter enables Windows 98's Dial-Up Networking software to connect to a remote access server or other Windows 98 PC through a modem connection. The Dial-Up Adapter also serves another purpose: it enables you to connect together two PCs using a serial null-modem cable or a parallel cable. Using the Direct Cable Connection software included with Windows 98, the two PCs can share files and printers, just as if they were connected by network cards and cables. Although transfer speed isn't as fast with Direct Cable Connection as it is with a standard network connection, the cost is minimal: less than $15 for the cable. There are no other gadgets or software to buy.

In a Direct Cable Connection between two PCs, one PC acts as a host and the other acts as a guest. The host system "listens" to the serial or parallel port, waiting for a guest to request a connection. When the guest makes that request, the host validates the connection, authenticating the logon password (if you've configured Direct Cable Connection to require one). Then the guest can connect to resources shared by the host in the same way you connect to resources on a LAN--you can map resource IDs (such as drive letters) on the guest to resources on the host, or use the Network Neighborhood to browse for resources. You then can transfer files between the two PCs and print from the guest to the host PC's printer(s).

Direct Cable Connection also can provide connectivity to your LAN. If the host PC is connected to a LAN, the guest PC will gain access not only to the host's resources, but also to the shared resources on the network. Essentially, the host computer acts as a gateway to the LAN for the guest.


NOTE: Direct Cable Connection doesn't support connection by computers on the LAN to the guest PC. The guest can access the LAN, but not the other way around.

Direct Cable Connection uses the same types of security as the Windows 98 network. You can access shared resources with user-level security or share-level security, depending on how the host and guest are configured. For this reason, access to the network using Direct Cable Connection is the same as it is with a PC connected directly to the LAN. You must either have the required share-level passwords to access a shared resource, or if user-level security is active, your user account must be validated by a security server on the LAN.


NOTE: If you want to connect your two PCs using a parallel cable, both PCs' parallel ports must be configured as bidirectional ports. For best performance, the two ports should also be configured as ECPs (Enhanced Capabilities Ports). You configure a computer's parallel port options through the PC's BIOS Setup program. Check your PC hardware manual if you're not sure how to run the BIOS Setup program.

Setting Up Direct Cable Connection

The first step in using Direct Cable Connection is to install the software for it. Like other Windows 98 components, Direct Cable Connection can be installed through the Add/Remove Programs object in the Control Panel. Use the following steps to add Direct Cable Connection to the host and guest PCs:

1. On the host PC, open the Control Panel and double-click the Add/Remove Programs icon.

2. Click the Windows Setup tab to display the Windows Setup page.

3. Select the Communications item, then click the Details button.

4. Place checks beside Direct Cable Connection and Dial-Up Networking (Direct Cable Connection requires the use of the Dial-Up Networking adapter).

5. Choose OK, and then OK again to install the software on the host PC.

6. Repeat steps 1 through 5 on the guest PC.

The next step is to configure the Dial-Up Adapter, network protocol, and network client.

Configuring a Protocol and Client

Like a real network adapter, the Dial-Up Adapter used by Direct Cable Connection relies on a network transport protocol and network client. Windows 98 adds the Dial-Up Adapter and associates with it the Client for Microsoft Networks, Client for NetWare Networks, NetBEUI protocol, and IPX/SPX protocol. If you're connecting to a NetWare-based system, these selections will work. If you're using a Windows 98- or Windows NT-based network, however, you can remove the NetWare components. The following steps explain how:

1. Open the Control Panel and double-click the Network icon.

2. On the Configuration page, click the Client for NetWare Networks icon; then click Remove.

3. Click the IPX/SPX-compatible protocol, and then click Remove.

4. Choose OK. Windows 98 will prompt you to restart the system.


TIP: Although you can use TCP/IP for Direct Cable Connection, the host won't transport TCP/IP packets for the guest, which prevents the guest from accessing resources beyond the host (such as on the LAN). Consider using NetBEUI instead.

Configuring Sharing

In addition to configuring the necessary protocol, you also need to configure the PCs to share files and printers. The guest can access resources shared by the host, and the host can access the guest's shared resources, but only after you configure the two computers appropriately. It's important to note that you don't need to enable file and print sharing on a PC to access shared resources located on another PC. Adding the appropriate network client gives you that ability. If you want to share resources on a PC with other users, however, you must enable sharing on that PC.

To enable sharing on either the host or guest, follow these steps:

1. Open the Control Panel and double-click the Network icon.

2. On the Configuration property page, verify that a file and printer sharing service (such as File and Printer Sharing for Microsoft Networks) is not shown in the list of installed components. If a sharing service is listed, skip to step 7.

3. Click the Add button.

4. Select Service from the Select Network Component Type dialog box, and then click Add.

5. From the Manufacturers list, choose Microsoft.

6. From the Network Services list, choose File and Print Sharing for Microsoft Networks if you're using the Microsoft client. Choose File and Print Sharing for NetWare Networks if you're using the NetWare client. Then click OK.

7. On the Configuration page, click the File and Printer Sharing button to display the File and Print Sharing dialog box.

8. To enable the PC to share its files, place a check in the check box labeled I want to be able to give others access to my files.

9. To enable the PC to share its printer(s), place a check in the check box labeled I want to be able to allow others to p rint to my printer(s).

10. Choose OK to close the File and Print Sharing dialog box.

11. Choose OK on the Network property sheet. Windows 98 will prompt you to restart the system. You must do so before the changes will take effect.
You can move files to or from the host from the guest if you only enable sharing on the host. However, you can only access files that are located in shared folders on the host, and you can only place files from the guest in those shared folders. 
If your host PC isn't connected to a LAN, consider sharing the root folder of each hard disk, which will enable you to access any host folder from the guest. If your host is connected to a LAN, however, you should take a different approach for 
security: share the root folders of each disk on the guest, and then perform all your file operations from the host. The host will be able to copy files from the guest, and place the files in any of the guest's folders. Because Direct Cable Connection 
doesn't support access by other machines on the LAN to the guest, sharing the guest's entire file system doesn't place the files at risk for unauthorized access. Just remember to disconnect the guest when you're finished so no one else can sit down at 
your host PC and access its files.

For a detailed explanation of how to share files and printers and ensure security for your data, refer to Chapter 26.

Connecting the Cable

The next step in setting up a Direct Cable Connection is to connect the cable between the two PCs. You can use a null-modem serial cable or parallel cable. The only restriction (other than using a cable that's supported by Direct Cable Connection) is that you must use the same port on each computer. If you connect the cable to COM1 on the guest, for example, you must connect the cable to COM1 on the host.


TIP: In almost 20 years of working with PCs, I've never experienced a problem connecting a serial or parallel cable to a running PC. There is the off chance that something could be damaged, however, so I recommend you shut down and turn off the PCs before connecting them.

The following cables are compatible with Direct Cable Connection:

Be aware that not all serial cables advertised as null-modem cables will work with Direct Cable Connection.


NOTE: Q: I only have one serial port on my notebook, and I have an external pointing device (mouse or trackball) connected to it. How can I use the pointing device and Direct Cable Connection at the same time?

A: You can't use the serial pointing device and a serial Direct Cable Connection at the same time, because you only have one port. You have two options. If your notebook includes a PS/2 mouse port (most do), you can connect the pointing device to the PS/2 port with an adapter that probably came with the pointing device. If you don't have such an adapter, check with your local computer store for one or contact the pointing device's manufacturer to see if one is available. The best option, however, is to use the parallel port instead of the serial port.


Using a Direct Cable Connection

After you configure and connect the two PCs, you can begin using Direct Cable Connection. The following section explains how set to up the host and guest.

Setting Up the Host and Guest

The first step in using Direct Cable Connection is to set the host to begin listening for a connection on the appropriate port. Then you set the guest to attempt a connection to the host. To start Direct Cable Connection on either the host or the guest, choose Start, Programs, Accessories, Communications, and Direct Cable Connection.

The first time you run Direct Cable Connection, a wizard steps you through the process of configuring the PC as either a host or guest (see Figure 21.14). Select either the Host or Guest option button, and then choose Next.

FIGURE 21.14 Specify whether the PC will act as a host or as a guest.

Next, the wizard prompts you to select the port to use for the connection (see Figure 21.15). Choose the appropriate port, and then click Next.

FIGURE 21.15 Choose the port to which the cable is connected.

If you're setting up the host, the wizard asks you if you want to use password protection. If password protection is enabled, the guest must specify the correct password to connect to the host and use its resources. To enable password protection, place a check in the Use p assword protection check box, then click the Set Password button. The wizard displays a simple dialog box in which you enter and verify the connection password. When your password settings are ready, click the Finish button. Direct Cable Connection will initialize the port and begin listening for a connection from the guest.

If you're setting up the guest, the wizard prompts you for the port to use, just as it does when setting up the host. After you select the port and click Next, click Finish to attempt a connection to the host. Direct Cable Connection will initialize the port and attempt a connection to the host. While it is attempting the connection, you should see the message Verifying user name and password on the host as well as the guest. When the connection is established, the guest begins searching the host for shared folders. If no connection or browse errors occur, a window containing all of the shared folders appears on the guest. The next section, "Using Shared Resources," gives you a brief explanation of how to use those shared resources.

If Direct Cable Connection is unable for some reason to browse the host for shared resources, Direct Cable Connection on the guest PC opens a simple dialog box that prompts you to specify the name of the host PC. Type the name of the host computer, such as DESKTOP, and then choose OK.


TIP: If you close the shared resource window on the guest, you can cause Direct Cable Connection to browse the host again by clicking the View Host button on the Direct Cable Connection dialog box.


NOTE: Q: When I try to connect to the host, the guest can't automatically browse for shared folders on the host. Direct Cable Connection prompts me to specify the name of the host. Is there some way to make it browse automatically?

A: If you have more than one protocol bound to the Dial-Up Adapter on the guest or the host, the multiple protocols could be preventing Direct Cable Connection from browsing the connection. Reduce the protocols for the Dial-Up Adapter on the guest to only the NetBEUI protocol, and then try again (the system will have to restart after you change protocols). To remove a protocol, open the Control Panel and double-click the Network icon. Select the protocol from the list of installed components, and then click Remove. Click OK to close the property sheet.

If reducing to one protocol on the guest doesn't enable the guest to automatically browse the host, try removing all but the NetBEUI protocol for the Dial-Up Adapter on the host, and then try the connection again.

Q: Direct Cable Connection is unable to connect, and I'm sure the cable is OK. What else could be wrong?

A: Open the Control Panel and double-click the Network icon. Verify that the Dial-Up Adapter is installed and has the right protocol bound to it (Microsoft strongly recommends NetBEUI). Also verify that NetBEUI is defined as the default protocol for the Dial-Up Adapter. To do so, click NetBEUI Dial-Up Adapter, and then verify that the appropriate client is enabled on the Bindings page. Then click the Advanced tab and place a check in the check box labeled Set this protocol to be the default protocol. Close the property sheet and let Windows 98 restart. Then test the connection again.


Using Shared Resources

You can use folders on the host from the guest without mapping a guest drive ID to the remote folder. When Direct Cable Connection establishes the connection, browses for resources, and displays a window containing those resources, just double-click the shared folder you want to use. Its files and sub-folders will appear in a window just as if you were browsing through a folder on your own system.

If you want to associate a drive ID on the guest to the shared folder on the host, use one of the following techniques:

For a more detailed explanation of how to share files and printers, read Chapter 26.


Previous chapterNext chapterContents

© Copyright, Macmillan Computer Publishing. All rights reserved.