Dynamic Host Configuration Protocol

Previous Topic Next Topic

Troubleshooting DHCP Servers

The most common DHCP server problems are the inability to start the server on the network in a Windows 2000 or Active Directory domain environment or the failure of clients to obtain configuration from a working server. When a server fails to provide leases to its clients, the failure most often is discovered by clients in one of three ways:

Common Problems

The following error conditions indicate potential problems with the DHCP server:

The first troubleshooting task is to make sure that the DHCP services are running. This can be verified by opening the DHCP service console to view service status, or by opening Services and Applications under Computer Manager. If the appropriate service is not started, start the service.

In rare circumstances, a DHCP server cannot start, or a Stop error might occur. If the DHCP server is stopped, complete the following procedure to restart it:

To restart a DHCP server that is stopped

  1. Start Windows 2000 Server, and log on under an account with Administrator rights.
  2. At the command prompt, type net start dhcpserver, and then press ENTER.

note-icon

Note

Use Event Viewer in Administrative Tools to find the possible source of problems with DHCP services.

DHCP Relay Agent service is installed but not working

The DHCP Relay Agent service provided with Multi-Protocol Routing (MPR) does not provide a TCP/IP address from a remote DHCP server.

The DHCP Relay Agent service is running on the same computer as the DHCP service. Because both services listen for and respond to BOOTP and DHCP messages sent using UDP ports 67 and 68, neither service works reliably if both are installed on the same computer.

Install the DHCP service and the DHCP Relay Agent component on separate computers.

The DHCP console incorrectly reports lease expirations

When the DHCP console displays the lease expiration time for reserved clients for a scope, it indicates one of the following:

The lease term of a DHCP reserved client is determined by the lease assigned to the reservation.

To create reserved clients with unlimited lease durations, create a scope with an unlimited lease duration and add reservations to that scope.

DHCP server uses broadcast to respond to all client messages

The DHCP server uses broadcast to respond to all client configuration request messages, regardless of how each DHCP client has set the broadcast bit flag. DHCP clients can set the broadcast flag (the first bit in the 16-bit flags field in the DHCP message header) when sending DHCPDiscover messages to indicate to the DHCP server that broadcast to the limited broadcast address (255.255.255.255) should be used when replying to the client with a DHCPOffer response.

By default, the DHCP server in Windows NT Server 3.51 and earlier ignored the broadcast flag in DHCPDiscover messages and broadcasted only DHCPOffer replies. This behavior is implemented on the server to avoid problems that can result from clients not being able to receive or process a unicast response prior to being configured for TCP/IP.

Starting with Windows NT Server 4.0, the DHCP service still attempts to send all DHCP responses as IP broadcasts to the limited broadcast address unless support for unicast responses is enabled by setting the value of the IgnoreBroadcastFlag registry entry to 1. The entry is located in:

HKEY_LOCAL_MACHINE\CurrentControlSet\Services\DHCPServer \Parameters\IgnoreBroadcastFlag

When set to 1, the broadcast flag in client requests is ignored, and all DHCPOffer responses are broadcast from the server. When it is set to 0, the server transmission behavior (whether to broadcast or not) is determined by the setting of the broadcast bit flag in the client DHCPDiscover request. If this flag is set in the request, the server broadcasts its response to the limited local broadcast address. If this flag is not set in the request, the server unicasts its response directly to the client.

The DHCP server fails to issue address leases for a new scope

A new scope has been added at the DHCP server for the purposes of renumbering the existing network. However, DHCP clients do not obtain leases from the newly defined scope. This situation is most common when you are attempting to renumber an existing IP network.

For example, you might have obtained a registered class of IP addresses for your network or you might be changing the address class to accommodate more computers or networks. In these situations, you want clients to obtain leases in the new scope instead of using the old scope to obtain or renew their leases. Once all clients are actively obtaining lease in the new scope, you intend to remove the existing scope.

When superscopes are not available or used, only a single DHCP scope can be active on the network at one time. If more than one scope is defined and activated on the DHCP server, only one scope is used to provide leases to clients.

The active scope used for distributing leases is determined by whether the scope range of addresses contains the first IP address that is bound and assigned to the DHCP server's network adapter hardware. When additional secondary IP addresses are configured on a server using the Advanced TCP/IP Properties tab, these addresses have no effect on the DHCP server in determining scope selection or responding to configuration requests from DHCP clients on the network.

This problem can be solved in the following ways:

After renumbering in this manner using superscopes, the DHCP server, upon receiving a renewal request:

  1. Checks to see if the client's IP address belongs to a scope it is aware of. Since the superscope includes the old scope, the server finds the scope and checks to see that this IP address has been marked as excluded.
  2. The server checks if the client lease exists in its database. Since this server previously allocated the lease to this client, it sends a DHCPNack in response to the renewal request.
  3. The client is forced to request a new address (the client broadcasts a DHCPDiscover message).
  4. The server responds to the DHCPDiscover with a lease from the new scope.

    The second step in this process (when the server checks the existence of the lease in its database), is what differentiates a renumbering scenario from a using multiple servers on the same subnet:


note-icon

Note

To migrate to the new scope, you can either deactivate the old scope or exclude all the addresses in the old scope. The server interprets both methods identically.

© 1985-2000 Microsoft Corporation. All rights reserved.