Skip to main content

Dynamic Host Configuration Protocol: Frequently Asked Questions

Published: May 1, 2007 | Updated: January 4, 2008

On This Page
 Background Information
 How DHCP Works
 DHCP Server Authorization
 DHCP and Routing and Remote Access
 DHCP and DNS
 Managing DHCP Servers
 Troubleshooting DHCP



 



Background Information

Q. What is DHCP?
A.

DHCP is an Internet Engineering Task Force (IETF) standard specified in Request for Comments (RFC) 2131 for simplifying management of host Internet Protocol (IP) configuration. The DHCP standard defines the use of DHCP servers as a way to manage dynamic allocation of IP addresses and other related configuration details for DHCP-enabled clients on your network.

Q. What are the benefits of using DHCP?
A.

DHCP provides the following benefits for administering your TCP/IP-based network:

  • Reliable configuration DHCP avoids configuration errors caused by the need to manually type in values at each computer. In addition, DHCP helps prevent address conflicts caused by a previously assigned IP address being reused to configure a new computer on the network.
  • Reduces configuration management Using DHCP servers can greatly decrease time spent configuring and reconfiguring computers on your network. Servers can be configured to supply a full range of additional configuration values when assigning address leases. These values are assigned using DHCP options.
  • The DHCP lease renewal process helps assure that where client configurations need to be updated often (such as users with mobile or portable computers who change locations frequently), these changes can be made efficiently and automatically by clients communicating directly with DHCP servers.

Q. Which standards define DHCP?
A.

DHCP is defined in the following IETF RFCs:

For additional standards related to DHCP, see the Dynamic Host Configuration IETF working group.

DHCP in Windows Vista, Windows XP, Windows Server 2008, and Windows Server 2003 is IETF standards compliant.


Q. Where is the Microsoft DHCP documentation?
A.

DHCP documentation is included with Windows Server 2003 and Windows Server 2008 (click Start, then click Help and Support). There are also DHCP sections of the Windows Server 2003 Deployment Guide and Windows Server 2003 Technical Reference.

For the product documentation resources available for DHCP in Windows Server 2008, see the Windows Server 2008 DHCP TechCenter.

For the product documentation resources available for DHCP in Windows Server 2003, see the Windows Server Dynamic Host Configuration Protocol (DHCP) TechCenter.

For a list of all the resources for DHCP in Windows Server 2008, Windows Server 2003, and Windows 2000 Server, see the Dynamic Host Configuration Protocol Web site.


Q. How is DHCP typically used on private and public networks?
A.

For private networks, DHCP is used to provide centralized IP address configuration information to DHCP client computers across small, medium, or enterprise networks.

For public networks, DHCP is used to provide centralized IP address configuration to DHCP client computers connecting to the Internet, such as through broadband Internet connections or through a wireless hotspot.

Q. How does Microsoft Windows support DHCP?
A.

Current versions of Windows support the three elements of a DHCP infrastructure:

  • Computers running Windows XP, Windows Server 2008, or Windows Server 2003 can use the DHCP Client service to act as a DHCP client and automatically obtain an IP address configuration from a DHCP server.
  • Computers running Windows Server 2008 or Windows Server 2003 can use the DHCP Server service to act as a DHCP server and automatically assign IP address configurations to DHCP client computers.
  • Computers running Windows Server 2008 or Windows Server 2003 can use the Routing and Remote Access service to act as a DHCP relay agent (also known as a Bootstrap protocol [BOOTP] relay agent) and listen for broadcast and unicast DHCP messages and relay them between DHCP servers and clients.
Q. Why should I use Microsoft's DHCP server over other DHCP servers?
A.

A DHCP server running Windows Server 2008 or Windows Server 2003:

  • Is integrated with the Active Directory directory service to prevent unauthorized or rogue DHCP servers from starting on your network.
  • Is integrated with the Domain Name System (DNS) and performs DNS dynamic update for DHCP clients on their behalf.
  • Can take advantage of Windows clustering for high availability.
Q. Does the Windows Server 2008 and Windows Server 2003 DHCP Server service support BOOTP?
A.Yes. BOOTP is a host configuration protocol developed before DHCP that was designed to configure diskless workstations with limited boot capabilities. The DHCP Server service in Windows Server 2008 and Windows Server 2003 supports BOOTP clients through the configuration of a BOOTP table.


Q. What are the new features of the DHCP in Windows Server 2008 and Windows Vista?
A.

The DHCP Server and DHCP Client services include the following enhancements:

  • Dynamic Host Configuration Protocol for IPv6 (DHCPv6) support

  • DHCPv6, defined in RFC 3315, provides stateful address configuration for IPv6 hosts on a native IPv6 network. The DHCP Client service in Windows Vista and Windows Server 2008 supports DHCPv6. A computer running Windows Vista or Windows Server 2008 can perform both DHCPv6 stateful and stateless configuration on a native IPv6 network. The DHCP Server service in Windows Server 2008 supports DHCPv6 stateful (both addresses and configuration settings) and stateless (configuration settings only) operation.

    For more information about DHCPv6, see The DHCPv6 Protocol.

  • Network Access Protection enforcement support

  • DHCP enforcement in the Network Access Protection (NAP) platform requires a DHCP client to prove its system health before receiving an address configuration for unlimited access. For more information, see the Network Access Protection Web page.

For more information, see the Microsoft Windows DHCP Team Blog.

Q. What is DHCP for Internet Protocol version 6 (IPv6) (DHCPv6)?
A.

DHCPv6 is the IPv6 counterpart to DHCP for IPv6 networks. DHCPv6 can be used to assign stateful IPv6 addresses or stateless configuration settings to IPv6 hosts. DHCPv6 is defined in RFC 3315.

The DHCP Client service in Windows Vista and Windows Server 2008 supports DHCPv6. A computer running Windows Vista or Windows Server 2008 can perform both DHCPv6 stateful and stateless configuration on a native IPv6 network. The DHCP Server service supports both DHCPv6 stateless and stateful operation.

For more information, see The DHCPv6 Protocol.

How DHCP Works

Q. How does DHCP work?
A.

DHCP is a client-server protocol in which a DHCP client requests an IP address configuration from a DHCP server on the network. DHCP servers store the set of available IP addresses and related configuration information in a database. When DHCP clients start up on a network, they must discover the DHCP servers on the network and request IP configuration information. The DHCP servers respond with an offered IP address configuration. The DHCP client then requests the use of a specific IP address configuration from among those offered, which is acknowledged by the DHCP server that offered it.

Because the DHCP server typically only allocates an IP address configuration for a specific amount of time known as the lease time, the DHCP client must renew the lease time of its IP address configuration on an ongoing basis. If the DHCP client does not renew the lease time before it expires or changes the subnet to which it is connected, it must obtain a new IP address configuration.

For a detailed technical explanation of how DHCP works, see Chapter 6 - Dynamic Host Configuration Protocol of the TCP/IP Fundamentals for Microsoft Windows online book.

Q. What protocols and ports does DHCP traffic use?
A.All DHCP traffic uses the User Datagram Protocol (UDP). Messages from the DHCP client to the DHCP server use UDP source port 68 and UDP destination port 67. Messages from the DHCP server to the DHCP client use UDP source port 67 and UDP destination port 68.


Q. What are the different kinds of DHCP messages?
A.

DHCP clients and servers use the following messages to communicate during the DHCP configuration process:

  • DHCPDiscover Sent from client to server to initially discover the presence of DHCP servers on the network.
  • DHCPOffer Sent from server to client to respond to the DHCPDiscover message. The DHCPOffer message contains an IP address configuration offered to the requesting DHCP client.
  • DHCPRequest Sent from client to server to request a specific IP address configuration from a specific DHCP server.
  • DHCPAck Sent from server to client to acknowledge that the client has been allocated a specific IP address configuration.
  • DHCPNak Sent from server to client to indicate that the client cannot use a specific IP address configuration. For example, DHCP servers send DHCPNak messages when a wireless client has moved to a different subnet and attempts to renew the lease on its previous address.
  • DHCPDecline Sent from client to server to indicate that the offered IP address configuration is invalid. For example, DHCP clients send DHCPDecline messages when they discover that the offered IP address is a duplicate.
  • DHCPRelease Sent from client to server to indicate that the DHCP client is no longer using the IP address configuration.
  • DHCPInform Sent from client to server to request additional configuration settings.
Q. How does the DHCP server determine the originating subnet of the DHCP client?
A.DHCP servers store ranges of addresses known as scopes that correspond to the valid IP addresses that can be assigned hosts on individual subnets. A DHCP server must allocate an IP address from the correct scope to DHCP clients. When a DHCP client starts up on a network, it does not have a valid IP address that has been acknowledged by a DHCP server and therefore cannot indicate its subnet to the DHCP server. If the DHCP client is on the same subnet as the DHCP server, the DHCP server can identify the subnet from the interface on which the DHCP messages from the client were received. When the DHCP client is not on the same subnet as the DHCP server, a DHCP relay agent on the DHCP client's subnet records the IP address of the interface on which the DHCP message from the DHCP client was received before forwarding the message to a DHCP server.


Q. How does DHCPv6 work?
A.For more information, see The DHCPv6 Protocol.

DHCP Server Authorization

Q. How is the DHCP Server service integrated with Active Directory?
A.

In Windows Server 2008 and Windows Server 2003, the DHCP Server service is integrated with Active Directory to provide authorization for DHCP servers. An unauthorized DHCP server on a network can disrupt network operations by allocating incorrect addresses or configuration options. A DHCP server that is a domain controller or a member of an Active Directory domain queries Active Directory for the list of authorized servers (identified by IP address). If its own IP address is not in the list of authorized DHCP servers, the DHCP Server service does not complete its startup sequence and automatically shuts down.

This is a common issue for network administrators who attempt to install and configure a DHCP server in an Active Directory environment without first authorizing the server.

For a DHCP server that is not a member of the Active Directory domain, the DHCP Server service sends a broadcast DHCPInform message to request information about the root Active Directory domain in which other DHCP servers are installed and configured. Other DHCP servers on the network respond with a DHCPAck message, which contains information that the querying DHCP server uses to locate the Active Directory root domain. The starting DHCP server then queries Active Directory for a list of authorized DHCP servers and starts the DHCP Server service only if its own address is in the list.

Q. How does the authorization process work?
A.

The authorization process for DHCP server computers depends on the installed role of the server on your network. There are three roles or server types for which each server computer can be installed:

  • Domain controller The computer keeps and maintains a copy of the Active Directory database and provides secure account management for domain member users and computers.
  • Member server The computer is not operating as a domain controller but has joined a domain in which it has a membership account in the Active Directory database.
  • Stand-alone server The computer is not operating as a domain controller or a member server in a domain. Instead, the server computer is made known to the network through a specified workgroup name, which can be shared by other computers, but is used only for computer browsing purposes and not to provide secured logon access to shared domain resources.

If you deploy Active Directory, all computers operating as DHCP servers must be either domain controllers or domain member servers before they can be authorized and provide DHCP service to clients.

Although it is not recommended, you can use a stand-alone server as a DHCP server as long as it is not on a subnet with any authorized DHCP servers. When a stand-alone DHCP server detects an authorized server on the same subnet, it automatically stops leasing IP addresses to DHCP clients.

Q. How do I authorize a Windows-based DHCP server in an Active Directory environment?
A.

To authorize a DHCP server, do the following:

  1. Log on as a member of the Enterprise Admins group for the enterprise where the server is being added.
  2. Click Start, click Settings, click Control Panel, double-click Administrative Tools, and then double-click DHCP.
  3. In the console tree, click DHCP.
  4. On the Action menu, click Manage authorized servers. The Manage Authorized Servers dialog box appears.
  5. Click Authorize.
  6. When prompted, type the name or IP address of the DHCP server to be authorized, and then click OK.

DHCP and Routing and Remote Access

Q. Do remote access clients use DHCP to obtain an IP address configuration?
A.

No. Remote access clients use the Internet Protocol Control Protocol (IPCP), defined in RFC 1332, to obtain an IP address from their remote access server. However, remote access clients running Windows Vista, Windows XP, Windows Server 2008, or Windows Server 2003 send a DHCPInform message after they have been configured with IPCP to obtain additional configuration parameters that are not included with IPCP. The DHCP Relay Agent component of Routing and Remote Access on the remote access server forwards the DHCPInform message to a DHCP server and forwards the response back to the remote access client.

The remote access server, such as a computer running either Windows Server 2008 or Windows Server 2003 and Routing and Remote Access, can use DHCP to obtain IP addresses to assign to remote access clients with IPCP.

For more information, see Using Routing and Remote Access servers with DHCP.

Q. How do I configure Routing and Remote Access to use DHCP to obtain IP addresses for remote access clients?
A.

To configure Routing and Remote Access to use DHCP to obtain IP addresses for remote access clients, do the following:

  1. Click Start, point to Programs, point to Administrative Tools, and then click Routing and Remote Access.
  2. Right-click the server name, and then click Properties.
  3. On the IP tab, click Dynamic Host Configuration Protocol (DHCP)
  4. In Use the following adapter to obtain DHCP, DNS, and WINS address for dial-up clients, click the correct adapter.
  5. Click OK.
Q. How do I configure Routing and Remote Access to forward DHCPInform messages to the correct DHCP server?
A.

You must configure the DHCP Relay Agent component of Routing and Remote Access with the address of at least one DHCP server. Do the following:

  1. Click Start, point to Programs, point to Administrative Tools, and then click Routing and Remote Access.
  2. In the console tree, right-click DHCP Relay Agent, and then click Properties.
  3. On the General tab, in Server address, type the IP address of your DHCP server, and then click Add.
  4. Repeat step 3 for each DHCP server you need to add, and then click OK.

DHCP and DNS

Q. How do I enable a Windows-based DHCP server in an Active Directory environment to work with DNS?
A.

The DHCP Server service in Windows Server 2008 and Windows Server 2003 can perform updates on behalf of its DHCP clients to any DNS servers that support dynamic updates. This behavior can perform DNS dynamic updates for DHCP clients that do not support DNS dynamic updates. To configure DNS dynamic update behavior for a DHCP server, do the following:

  1. Click Start, click Settings, click Control Panel, double-click Administrative Tools, and then double-click DHCP.
  2. In the console tree, right-click the DHCP server name, and then click Properties.
  3. From the properties dialog box for the DHCP server, click the DNS tab.
  4. On the DNS tab, configure the appropriate settings.
Q. How do I troubleshoot a DHCP server in an Active Directory environment that is having DNS and reverse DNS problems?
A.Verify the settings on the DNS tab for the properties of a DHCP server. For more information, see the Windows Server 2003 Help and Support topic titled " Using DNS servers with DHCP."

Managing DHCP Servers

Q. What are the tools for managing DHCP servers?
A.The tools you use for managing DHCP are the DHCP console found in Administrative Tools and the Netsh.exe commands in the DHCP context. For more information, see DHCP tools.


Q. How do I monitor the DHCP Server service?
A.

Windows Server 2008 and Windows Server 2003 provides a set of DHCP server performance counters that can be used to measure and monitor various aspects of server activity, such as the following:

  • All types of DHCP messages sent and received by the DHCP service.
  • The average amount of processing time spent by the DHCP server per message sent and received.
  • The number of messages dropped because of internal delays at a DHCP server computer.

Use the System Monitor snap-in. For more information, see DHCP performance monitoring reference.

Q. How do I back up and restore the DHCP database on a DHCP server?
A.For DHCP servers running Windows Server 2003, you can use the Backup and Restore commands in the DHCP console. For more information, see Backing up the DHCP database and Restoring server data.

Troubleshooting DHCP

Q. My DHCP Server service is not starting. What can I check?
A.One of the most common causes for this problem is that the DHCP server is not authorized in Active Directory. For more information, see the "DHCP Server Authorization" section of this article.
Q. What are the troubleshooting tools for DHCP servers?
A.

The tools you use for troubleshooting DHCP servers are the following:

  • DHCP console
  • Event Viewer
  • Network Monitor
  • System Monitor counters