ENHANCE YOUR SYSTEM'S DIAL-UP NETWORKING PERFORMANCE
In previous articles about Windows NT Remote Access Service (RAS--see "Related Articles in Windows NT Magazine," page 126), I covered several aspects of this multifaceted NT component, including new features of NT 4.0 RAS and Dial-Up Networking (DUN), Virtual Private Networks (VPNs), and Registry tweaks to implement new or hidden functionality. But I haven't covered RAS performance. For this article, I've collected a few of my favorite RAS optimization techniques that enhance RAS performance on NT servers and workstations.
A lot of what I have to share relates directly to TCP/IP and IP-based RAS connections. The advent of the Internet and the widespread deployment of TCP/IP networks have made IP-based RAS connections the most common connections in modern NT networks. As a result, I'll cover both the configuration side of the RAS/DUN service and some specific protocol-related optimizations you can use with RAS.
Configuring RAS Devices
The first step in optimizing RAS is to ensure you optimally configure the dial-up adapters. Whether you're using a standard modem or ISDN terminal adapter, be sure you configure the device (and the communications port to which it's attached) to achieve maximum performance.
With any dial-up adapter, choose the highest Data Terminal Equipment (DTE) rate your modem supports. The DTE rate is the speed at which the computer sends data to your modem's serial (COM) port. Setting the dial-up adapter's DTE rate higher than its Data Communications Equipment (DCE) rate, the physical speed at which the device transmits data (the line rate), optimizes the device's performance. Optimizing the dial-up adapter in this manner guarantees that the computer will provide data to the device as fast as the device can process it. Setting the DTE rate higher than the DCE rate is important because most modern modems and ISDN terminal adapters employ data compression techniques to achieve effective transfer rates that exceed their rated speeds. You set the DTE rate of a COM port via the Baud Rate setting in the Ports applet in Control Panel. Screen 1, page 122, shows my settings for COM2.
To maximize the throughput of most dial-up adapters (including modems and ISDN terminal adapters using COM ports), set the DTE rate for the device to the highest setting recommended by the manufacturer. For 28.8Kbps and faster devices that communicate through COM ports, the optimal setting is usually 57.6Kbps or 115.2Kbps. You might have a port or modem driver that supports a higher number, such as 128Kbps, which reflects the highest possible speed of that device or port as reported to NT by the Unimodem driver or a custom serial driver.
The optimal DTE rate for a particular device depends on the particular COM port that the device uses, and specifically the universal asynchronous receiver-transmitter (UART) chip driving the port. The COM ports on all modern PCs come with 16550 or faster UARTs, which use 16-byte or larger first in, first out (FIFO) buffers, and support maximum DTE rates ranging from 38.4Kbps to 115.2Kbps. In addition, multiport serial boards often have dedicated application-specific integrated circuits (ASICs) or microprocessors that handle the serial I/O and allow for maximum DTE rates of 230Kbps or more. With fast external modems or ISDN terminal adapters, don't use communication ports that have older 8250 UARTs (which are slower and use no FIFO buffer) or 16450 UARTs (which have only a 2-byte FIFO buffer). These slower UARTs won't let you achieve the dial-up device's maximum speed, and will likely cause the port to become overrun and lose data during transmission. Typically, you won't have these problems with internal modems, because they contain UARTs that are fast and well-matched to the device's capabilities.
The Ports applet in Control Panel isn't the only place you can configure the maximum DTE rate setting for your dial-up adapter. You can also define this rate in the Modems applet in Control Panel for each dial-up adapter (under the General tab of the Properties dialog box for each device; you can reach this tab while editing a RAS/DUN phonebook entry). Therefore, I recommend that you set the Maximum Speed setting for each dial-up adapter to the highest possible rate. In most cases, this rate is equivalent to the one you set for the COM port earlier. The modem's Maximum Speed setting (as configured in the Unimodem driver for the device in the Modems applet) will typically override the DTE rate settings in the Ports applet for the communications port in question. For this reason, you might want to use the Ports applet default settings. The only potential disadvantage to this approach might be a case where you are using a non-Unimodem aware (e.g., DOS or Win 3.x-based) communications application. In this case, not setting the proper DTE rate in the Ports applet could limit the device's performance.
When setting DTE rates, first consult the device's documentation to verify the manufacturer's recommended settings; different manufacturers will have different recommended configurations for their products, and the documentation might contain clues that will help you obtain maximum performance from the device. You might discover additional commands or a specific initialization string that you can issue to the device to enable or disable specific performance-related features. You can place this information into the Extra Settings field of the Advanced Connection Settings dialog box, which you can access via the Advanced button in the Connection tab of a device's Properties dialog box. To take advantage of all the features of your dial-up adapters, be sure you have the latest version of the correct driver for each adapter you install.
Two noteworthy settings for improving the performance of your RAS device are available in the Ports applet in Control Panel. The first setting is Flow Control. Flow Control defines the method of handling data transfer between two communications devices when the DTE and DCE rates are different (which is usually the case) so that data is not lost. For most RAS devices, choosing either the default setting of None or selecting Hardware (i.e., Request To Send/Clear to SendRTS/CTS) flow control are typically the best choices. Hardware-based flow control means the hardware directly negotiates the flow of control. However, NT actually emulates hardware-based flow control in software. Although you might naturally suspect that this method is slower, my experimentation with different settings has shown little or no difference in regard to performance with different flow control settings selected. Leave the default settings of None or Hardware, because the Xon/Xoff setting (which is the standard for software-based flow control) is incompatible with binary transfers and therefore not recommended with dial-up adapters.
The other noteworthy setting is enabling FIFO buffers for the COM port attached to your RAS device (or created by the device, as with internal modems). Although the default in NT is to enable FIFO buffers whenever COM ports using them are detected, you still need to verify this setting. To view or change this setting, go to the Ports applet in Control Panel and choose Settings, Advanced to bring up the dialog box in Screen 2. With most dial-up adapters and communications ports, you obtain maximum performance and reliability when you enable FIFO buffer support.
Optimizing RAS/DUN Connections
Now that you've optimized the communications settings for hardware, you can tune the RAS configuration. I'll approach this subject first from the client side and then the server side.
First, when you're configuring DUN on a client to connect to a remote network running multiple protocols (e.g., an NT RAS server offering both IP and NetBEUI), try to limit the number of protocols, preferably to one. You'll greatly reduce the traffic flowing across the RAS connection and optimize the speed of the session. TCP/IP is usually the best protocol to use in routed networks or TCP/IP-only environments because doing so will not incur additional protocol overhead on servers or clients and will permit connectivity throughout the entire network. However, in terms of raw speed, NetBEUI is still usually the fastest LAN protocol for use with smaller networks (i.e., less than 200 users) and Microsoft RAS/DUN. Therefore, if your LAN is not connected to other networks or the Internet and is using NetBEUI as the primary or sole protocol, stick with this protocol for RAS, as well.
Next, consider implementing a Multilink Point-to-Point Protocol (MPPP--Multilink RAS in NT) RAS connection. A Multilink RAS connection lets you use more than one dial-up device simultaneously to achieve one, larger, virtual RAS connection. NT's RAS and the latest version of the Windows 95 DUN client support this functionality. To implement a Multilink RAS connection, you must install multiple devices at both ends. (The devices can be different types and speeds as long as they have a compatible counterpart at the other end of the connection.) In the DUN phonebook entry for the connection, select multiple adapters and enter the appropriate telephone number for each adapter to dial, as Screen 3 shows. Although this feature requires multiple RAS devices on the RAS server, it might be more attractive for increasing client bandwidth than upgrading the company's remote access infrastructure to support more expensive technologies such as ISDN. In addition, users connecting to the Internet via modem-based RAS connections can increase their bandwidth using Multilink RAS with their Internet Service Provider (ISP).
Many ISPs don't support Multilink RAS for analog connections, but several ISPs have recently started offering this service. The concept of Multilink RAS isn't very strange; after all, it's based on the technology used to bond the two 64Kbps bearer channels on ISDN terminal adapters. With modems, you use multiple physical modems rather than two bearer channels. (For more information about Multilink RAS, see "Related Articles in Windows NT Magazine," page 126.)