Let DHCP assign IP addresses
Windows NT's Dynamic Host Configuration Protocol (DHCP) service is less complicated than you might think. If you've been manually assigning IP addresses to computers in your network because DHCP seems too complex, you'll be interested to know that spending only a couple of hours learning about DHCP can save you a lot of time and trouble in the long run. For more information about DHCP, see Mark Minasi, Inside Out: "DHCP Recovery," March 1999, and "DHCP and Assigning IP Addresses," August 1996.
What Is DHCP?
DHCP is a TCP/IP protocol that provides automatic IP address assignment. (The name Automatic IP Address Assignment might have been more meaningful than DHCP, but AIAA sounds less like an acronym and more like a network administrator's distress call.) To use TCP/IP on the network, an administrator must provide at least three pieces of data for each computer: the IP address, the subnet mask, and the default gateway's IP address. Each computer needs a unique IP address to use TCP/IP. The assigned addresses must be in the correct subnet. You might wonder how to determine which subnet you're connecting to in a large network. However, DHCP knows which subnet the request for an IP address came from, so DHCP has no problems assigning an appropriate address. If the network uses Windows Internet Naming Service (WINS) and Domain Name System (DNS), the administrator must also configure the client computers with the WINS and DNS servers' IP addresses.
The network administrator can configure each system manually. Alternatively, the administrator can supply the correct values and ask users to configure their systems. However, the latter method is risky. The easiest and safest procedure is to configure one or more DHCP servers to automatically assign IP addresses and other necessary information to each computer on the network. This process involves configuring the server, telling it what range of addresses to use, setting up some additional parameters, and monitoring the server periodically.
Installing the DHCP Service
DHCP runs in the background, as other NT services do. Although you must install DHCP on an NT server, you can administer it from a workstation. DHCP servers must have fixed (i.e., static) IP addresses, because they can't assign addresses to themselves. A Backup Domain Controller (BDC) is often a good candidate for a DHCP server.
To install the DHCP service, open the Network applet from Control Panel. (Alternatively, you can right-click the Network Neighborhood icon, and select Properties.) Select the Services tab, and click Add. Choose Microsoft DHCP Server from the list of Network Services, and click OK. Then, reboot your server.
Configuring a DHCP Server
After you install the DHCP service, you must configure the server. Open the DHCP Manager tool from the Administrative Tools group. Screen 1, page 174, shows the DHCP Manager dialog box.
The key component in DHCP setup is the scope. A scope is a range of IP addresses. You can have one scope per subnet. Thus, one scope specification must cover a subnet's entire range of addresses. Suppose you have available addresses 10.0.0.2 through 10.0.0.100. But your network components (e.g., routers, printers, the DHCP server) are scattered throughout this range, with a printer at 10.0.0.57. You wouldn't configure one scope for addresses 10.0.0.2 through 10.0.0.56 and another scope for 10.0.0.58 through 10.0.0.100. Instead, DCHP lets you specify IP addresses, or ranges of addresses, that the DHCP server doesn't assign.
From the DHCP Manager menu, select Scope, Create. Screen 2, page 174, shows the Create Scope dialog box that opens. You need to enter the starting and ending IP addresses for the scope, and you must provide the scope's subnet mask. Then, enter the IP addresses to exclude. You can enter a range of addresses or just one address (e.g., an address that a printer or other non-DHCP-aware network component is using). Finally, specify the duration of the lease. (I discuss leases in a later section.) You can also name the scope and attach a comment. You might want to use these options if you have multiple subnets with separate scopes.
When you click OK to close the Create Scope dialog box, you must specify whether you want to activate the scope immediately. In most cases, you'll answer yes. However, you might prefer to set up all the scopes over a weekend, then activate them all at once.
When you exit the Create Scope dialog box, you might receive the error message No more data is available. You can ignore this message. You'll see the new scope in the DHCP Manager window. If you activated the scope, the lightbulb icon next to the scope is yellow. Don't worry if you entered a scope of 131.107.2.100 through 131.107.2.199 and you see a scope of 131.107.2.0. DHCP simply shows the last octet as a zero.
You might think that having multiple DHCP servers for redundancy is a good idea. However, DHCP servers don't interact with one another in NT 4.0. Thus, you can't configure multiple servers with the same scope because they'll assign the same IP addresses. I hope this problem won't occur in future releases. An administrator with two servers that each support part of the network sometimes splits the IP addresses between the servers. Thus, if one server is down, at least some users can receive IP addresses.