Windows NT DHCP
Dynamic host configuration protocol is used to automatically assign TCP/IP addresses to clients along with the correct subnet mask, default gateway, and DNS server. There are global and scope options. Global options apply to all client computers. Scope options apply to specific subnets or range of IP addresses. DHCP RFCs are 1533, 1534, 1541, and 1542.
DHCP Lease Process
- Request - Broadcast is sent with MAC address. The client tries to get its last address. If it is not available, the DHCP server will send a NACK signal.
- Offer - All offered IP addresses are unavailable when the DHCP server offers them until they are rejected.
- Selection - The client broadcasts its selected choice.
- Acknowledgement - Any offered IP addresses not selected are freed to be used again.
When booting, there will be four attempts to get a DHCP address at 9, 13, and 16 second intervals. Once the lease is obtained at one half the lease period the client will try to renew the lease with the original DHCP server and will continue until the lease term is seven eights complete. At 7/8th completion, the client will attempt the renew process with any DHCP server. If the lease is not renewed and a new lease is not obtained, at the end of the lease period, TCP/IP communications cease from the client.
DHCP is available for NT 3.5 and later Servers. Only one scope (range of IP addresses) can be configured for one DHCP server.
- Install DHCP. DHCP service is installed from the control panel network applet services tab. Select add, and "Microsoft DHCP Server". Restart the computer
- Configure DHCP - The DHCP Manager is used to configure DHCP which can be run from any networked NT computer. The DHCP manager is accessed using Administrative Tools. The following items are set for each scope (local subnet):
Global options include (These options may be set within each scope as necessary):
- Start Address
- End Address
- Subnet Mask
- Exclusion Range start and end addresses.
- Lease duration in days, hours, minutes or unlimited.
- Name - The scope name
- Domain name
- DNS server
- WINS server (WINS/NBNS)
- WINS/NBT node type
- Router (Default gateway)
- Global - Options for all scopes and clients served by the DHCP server. Overridden if specified otherwise in scope or client options.
- Scope - Options for specific subnets or ranges of addresses.
- Client - Options for specific clients.
The specific client options have greater priority than scope options and scope options have priority over global options. Options may be set to allow various global options to be set as defaults for undeclared options in the scope or client options (Each subnet may have its own WINS server). Global and scope options may be reached from the DHCP options menu. Some of these options are:
- 002 Time Offset
- 003 Router - For setting default gateway
- 004 Time Server
- 005 Name Servers
- 006 DNS Servers
- 007 Log Servers
- 044 WINS/NBNS Servers - Used if the client is not manually configured for the WINS server.
- 046 WINS/NBT Type - NetBIOS name configuration designation of B,P, M, or H node.
- 047 NetBIOS Scope ID - Set so NBT hosts communicate only with other similarly configured hosts.
- cookie Servers
- LPR Servers
- Impress Servers
There can be several DCHP servers on a network. More than one may be configured to back up the other in case of failure.
Because of how leases are assigned and accepted, operation with multiple DHCP servers is not a problem as long as the DCHP servers are configured correctly. The DCHP servers must be configured so the scope of available IP addresses are not the same on any redundant DHCP server. DHCP servers do not communicate with each other.
DHCP Database Options
- Backup - Includes scopes and all options. The database is automatically backed up to:
The backup interval is stored in the registry at:
A duplicate registry key is in the \WINNTROOT\System32\Dhcp\Backup\dhcpcfg file
- Restore - The backup is loaded if the DHCP database is determined to be corrupt by the system at initialization. A backup can be forced by copying the backup directory contents into the DHCP directory.
- Compact - The database is normally compacted, but for NT3.51 or earlier, the JETPACK.EXE utility can be used to compact the database to improve performance. If the size is 30MB, it should be compacted. This utility is run from the \WINNTROOT\System32\Dhcp directory. The DHCP service should be stopped before running this utility.
- DCHP.MDB - The main database
- DHCP.TMP - Temporary DHCP storage.
- JET*.LOG - Transaction logs used to recover data.
- SYSTEM.MDB - USed to track the structure of the DHCP database.
- Default gateway - The gateway that clients on the subnet can or must use to access other subnets or networks.
- Domain name - The DNS name (Internet name) of your internet domain.
- Lease - The time the client may use the assigned DHCP address. Normally this is a period of time in which if the client does not use the address, it is made available to the address pool for another client to use.
- Scope - A range of IP addresses in a subnet.
- Global options - IP configuration settings that apply to the entire network (all scopes the DCHP server manages).
- Scope options - IP configuration settings for a particular subnet including the IP address of the router (default gateway) and the available IP range to be used by the DHCP server for this particular subnet.
DHCP Client Configuration
If changing from static IP mapping to DHCP mapping, a reboot is not required. If changing from DHCP mapping to static IP mapping a reboot is required for the IP address to be effective.
- /all - Shows much configuration information from local hostname, IP address, subnet mask to DHCP server and WINS server address and lease dates. It will display an IP address of 0.0.0.0 and DHVP address of 255.255.255.255 if the DHCP attempt was unsuccessful.