Correctly install and configure remote connectivity the first time

Setting up Remote Access Service (RAS) and Dial-Up Networking (DUN) on Windows NT Server 4.0 or NT Workstation 4.0 can be problematic, which makes remote connectivity a popular support call topic. Configuring RAS or DUN on NT is like running a series of hurdles. Users start this process by questioning support staff about selecting and troubleshooting modems. After they've bought and configured a modem, users begin the configuration process. In this step, they run into problems and usually log a few more support calls.

In this article, I'll help you solve common RAS and DUN setup problems. I'll explain the configuration process and help you anticipate possible problems and better plan, if not eliminate, your support calls.

Step 1: Getting Your Modem to Work with RAS
Although this step might seem simple, problems setting up a modem are common. Users go to their local retailer, grab an inexpensive modem, and expect it to work. They spend hours troubleshooting and finally realize the modem they bought either won't work or might work with modifications to NT system files. You can avoid these hurdles by buying an NT-compatible modem that matches the modem specifications on your client and server. Also, don’t purchase a WinModem; WinModems work with Windows 98 and Win95 but not with NT.

Q: Can I use RAS with a modem that isn't on Microsoft's Hardware Compatibility List (HCL)?

When RAS attempts to access a modem, it reads a user-editable file to get information about initializing and manipulating the modem. Modem.inf is the name of this file, and you can find it in C:\winnt\system32\ras\. You can manually edit modem.inf to add support for modems that aren’t on the HCL (you must have a basic device driver for your modem).

For better understanding, let's walk through a section of this file. When you open modem.inf in a text editor (e.g., Notepad), you'll find that the beginning of the file contains information about the file's structure. Use the text editor to search for Hayes Compatible 14400. The line after Hayes Compatible 14400 is ALIAS=Hayes Optima 14400. This ALIAS mechanism lets the Hayes Compatible 14400 configuration inherit the configuration of the Hayes Optima. Commands specific to the Hayes Compatible modem follow the ALIAS mechanism. You can use this scheme to compare your manufacturer's modem init strings to standard Hayes modems' init strings. If the strings are the same, you can create a new header for your modem and you can use the ALIAS command to inherit the other modem’s command strings. If the strings don't match, you can create your own strings.

Also, a manufacturer might have modified its modem after Microsoft manufactured the latest NT CD-ROM, which makes modem.inf's modem commands incorrect. In this case, ask the modem manufacturer for updated modem.inf commands. Use a text editor to plug these changes into modem.inf.

Step 2: Configuring RAS
This section focuses on less-than-obvious RAS configuration questions. For more general information about RAS configuration, see "Related Articles in Windows NT Magazine."

Q: I use DUN to connect to a server that requires me to use a logon script. How do I create a script file to automate my logon?

A: To enable a script for a DUN entry, you need to run the DUN application: Select the entry that requires a logon script, and click More. Select Edit entry and modem properties, which brings up the Edit Phonebook Entry dialog box, which Screen 1 shows. On the Script tab, select Run this script. In the drop-down list below this option, Microsoft provides example scripts that you can modify to meet your scripting needs. These sample scripts reside in the C:\\winnt\system32\ras\ directory.

Switch.inf is the script file associated with generic logons. A switch.inf script is made up of six sections: a section header, comment lines, commands, responses, response keywords, and macros. By modifying switch.inf, you can create a script to meet your needs. (The switch.inf file contains information about how to edit the file, and you can find information about editing script files in NT Help. Make a backup copy before editing this file, just in case you make a mistake.) To edit the switch.inf file, go to the Edit Phonebook Entry dialog box and select Generic login from the Run this script drop-down list. Click Edit script. This action opens switch.inf in Notepad.

NT offers a logging mechanism to assist you in troubleshooting script. First, you must enable this feature in the registry: Run regedt32 and go to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters key. Change the value of Logging key, type REG_DWORD, to 1. The system will begin logging the next time you start DUN. The system will log and append errors into C:\\winnt\system32\ras\device.log.

Q: How many TCP/IP addresses do I need to set up a static TCP/IP address pool on my RAS server?

A: To set up a static TCP/IP address pool, go to Control Panel and select Network. On the Services tab, you can view your network’s RAS properties by double-clicking Remote Access Services. In the resulting Remote Access Setup dialog box, click Network. Select the TCP/IP option in the Server Settings section of the Network Configuration window, and click the Configure button next to the TCP/IP option (as Screen 2 shows). You will then see the RAS Server TCP/IP Configuration dialog box, which Screen 3 shows.

The system’s default setting is to use Dynamic Host Configuration Protocol (DHCP) to offer TCP/IP addresses to dial-in clients. However, to set up a static TCP/IP address pool, select the Use static address pool option. When you use this option, you must obtain a valid address range for your network if you want to offer TCP/IP connectivity beyond your computer to a network. Your address range must include at least two addresses, even if only one client is dialing in. The system assigns the lower range of the address range you select to your local server when someone dials in. The system assigns the upper range addresses to clients dialing in.

Step 3: Troubleshooting Modem Problems and Connectivity
This step assumes you’ve installed your modem and configured RAS or DUN. However, your modem is having problems connecting with RAS.

Q: If my modem isn’t working with RAS, how do I test to see if the modem is causing the problem?

You can use HyperTerminal, a built-in NT program, to test if the modem is working. In the Control Panel Services applet, stop the RAS service. In the Start menu, select Programs, Accessories, HyperTerminal. In the resulting Connection Description dialog box, select Cancel. The system sends whatever you type in the resulting HyperTerminal screen directly to the modem. Type

AT

The system will display OK to let you know the modem is working. For more information about HyperTerminal, see the Microsoft article "Troubleshooting Modem Problems Under Windows NT 4.0" (http://support.microsoft.com/support/kb/articles/q161/5/16.asp).

Q: How do I determine my IP address after I've connected through RAS?

To determine which IP address you receive from the server, run the DOS command shell. From the prompt, enter

IPCONFIG

This command lists all network and modem adapters’ configuration. This list gives modems the Ethernet adapter name of NdisWanx, in which the x represents a number identifying the adapter.

Q: How do I set up my system to automatically connect when I use my browser?

In Microsoft Internet Explorer (IE), select Internet Options from the View menu. On the Connection tab, select the Connect to the Internet using a modem option, and click Settings. In the resulting window, you can select a dial-up connection as well as general dialing and password settings.

Q: Is the error message One or more requested network protocols did not connect successfully telling me that I have no connectivity?

This error is common, and users can misinterpret it. The system sends this message when you select one of the DUN client protocols the server doesn’t offer. The system generated the error message in Screen 4 because you specified TCP/IP and NetBEUI as the DUN client protocols. The server that the client connects to offered only TCP/IP connectivity. The error message in Screen 4 shows you that you have connectivity using TCP/IP but not using the NetBEUI protocol.

Step 4: Know Where to Find Help
Getting RAS up and running can be problematic. I have discussed only the common problems users experience when they set up RAS or DUN. Microsoft offers TechNet and support articles that can help you troubleshoot deeper RAS problems (http://support.microsoft.com/support).