DHCP Step-by-Step Guide: Demonstrate DHCP Split Scope with Delay on a Secondary Server in a Test Lab
A Dynamic Host Configuration Protocol (DHCP) split-scope configuration using multiple DHCP servers allows for increased fault tolerance and redundancy over using only one DHCP server. The new Split-scope Wizard in Windows Server® 2008 R2 replaces the more error prone manual split-scope configuration method used in earlier versions of Windows Server. The wizard-based configuration, along with the advent of scope properties, enables IT Professionals to minimize the possibility of depletion of address pools. The new split-scope configuration employs a secondary DHCP server with a time delay that is configured in its scope properties. The time delay on the secondary DHCP server causes it to respond with a delay to DHCP DISCOVER requests from DHCP clients, enabling the primary DHCP server to respond to and accept the DHCPOFFER first. In the event that the primary DHCP server becomes unavailable, the secondary DHCP server can continue distributing addresses until the primary server is available to service clients again. The split-scope configuration is a server-side enhancement and therefore requires no client configuration to work. Only IPv4 scopes benefit from a split-scope configuration because IPv6 was designed to alleviate address exhaustion.
The following step-by-step instructions guide you in deploying a DHCP split-scope with delay on a secondary server in a test lab.
This step-by-step guide contains an introduction to using DHCP with a split scope on a secondary server, with delay, and instructions for setting up a test lab using two DHCP servers and one DHCP client.
Important
The following instructions are for configuring a test lab using the minimum number of computers. Individual computers are needed to separate the services provided on the network and to clearly show the desired functionality. This configuration is not designed to reflect best practices, nor does it reflect a recommended configuration for a production network. The configuration, including IP addresses and all other configuration parameters, is designed only to work on a separate test lab network.
In this test lab, a DHCP split-scope is configured on two computers running Windows Server 2008 R2 (primary and secondary) with DHCP installed. A delay is configured on the secondary server. A computer running Windows® 7 with the DHCP Client service is used to demonstrate proper functioning of the configuration. A computer running Windows Server 2003 is also used in the test lab as a domain controller and DNS server.
The following are required components of the test lab:
The product disc for Windows Server 2008 R2.
The product disc for Windows Server 2003 with Service Pack 2 (SP2).
The product disc for Windows® 7.
Note
This lab demonstrates a mixed server environment using both Windows Server 2008 R2 and Windows Server 2003. However, you could deploy a pure Windows Server 2008 R2 server environment if you do not require interaction between the two different server versions.
Configure DC1
DC1 is a server running the Windows Server 2003 SP2 operating system. DC1 is configured as a domain controller with Active Directory® Domain Services (AD DS), and as the primary DNS server for the intranet subnet.
Configure DHCP Server 1 and DHCP Server 2
DHCP Server 1 and DHCP Server 2 are servers running Windows Server 2008 R2. DHCP Server 1 is configured with the DHCP Server service, and functions as a primary DHCP server with split-scope configuration. DHCP Server 2 is configured with the DHCP Server service, and functions as a secondary DHCP server with split-scope configuration.
Configure DHCP Client 1
DHCP Client 1 is a client computer running Windows 7. DHCP Client 1 is configured with the DHCP client requesting an IP address from DHCP Server 1 and DHCP Server 2.
After all the computers are configured, this guide provides steps for a demonstration of DHCP split scope with delay configured on the secondary server. The following sections provide details about how to perform these tasks.
DC1 is a computer running Windows Server 2003 Standard Edition with SP2, which provides the following services:
A domain controller for the Contoso.com AD DS domain.
A DNS server for the Contoso.com DNS domain.
To configure DC1, complete the following tasks:
Install the operating system.
Configure Transmission Control Protocol/Internet Protocol (TCP/IP).
Install AD DS and DNS.
Create a user account and group in AD DS.
The following sections explain these steps in detail.
Install Windows Server 2003 SP2 as a stand-alone server.
Start your computer using the Windows Server 2003 product disc.
When prompted for a computer name, type DC1.
Configure the TCP/IP protocol with a static IP address of 172.16.1.1 and the subnet mask of 255.255.255.0.
Click Start, click Control Panel, and then double-click Network Connections.
Right-click Local Area Connection, and then click Properties.
Click Internet Protocol (TCP/IP), and then click Properties.
Select Use the following IP address. Type 172.16.1.1 next to IP address and 255.255.255.0 next to Subnet mask.
Verify that Preferred DNS server is blank
Click OK, click Close, and then close the Network Connections window.
DC1 serves as the only domain controller and DNS server for the Contoso.com domain.
To start the AD DS Installation Wizard, click Start, click Run, type dcpromo, and then press ENTER.
In the AD DS Installation Wizard dialog box, click Next.
Operating system compatibility information is displayed. Click Next again.
Verify that Domain controller for a new domain is selected, and then click Next.
Verify that Domain in a new forest is selected, and then click Next two times.
On the Install or Configure DNS page, select No, just install and configure DNS on this computer, and then click Next.
Type Contoso.com next to Full DNS name for new domain, and then click Next.
Confirm that the Domain NetBIOS name shown is CONTOSO, and then click Next.
Accept the default Database Folder and Log Folder directories, and then click Next.
Accept the default folder location for Shared System Volume, and then click Next.
Verify that Permissions compatible only with Windows 2000 or Windows Server 2003 operating systems is selected, and then click Next.
Leave the Restore Mode Password and Confirm Password text boxes blank, and then click Next.
View the summary information provided, and then click Next.
Wait while the wizard completes configuration of AD DS and DNS services, and then click Finish.
When prompted to restart the computer, click Restart Now.
After the computer is restarted, log on to the CONTOSO domain using the Administrator account.
Next, create a user account in AD DS. This account is used when logging in to DHCP Server 1 and DHCP Server 2.
Click Start, point to Administrative Tools, and then click AD DS Users and Computers.
In the console tree, double-click Contoso.com, right-click Users, point to New, and then click User.
In the New Object - User dialog box, next to Full name, type User1, and in User logon name, type User1.
Click Next.
In Password, type the password that you want to use for this account, and in Confirm password, type the password again.
Clear the User must change password at next logon check box, and select the Password never expires check box.
Click Next, and then click Finish.
Leave the AD DS Users and Computers console open for the following procedure.
Next, add the newly created user to the DHCP Administrators group and use it for all of the configuration activities.
In the AD DS Users and Computers console tree, click Users.
In the details pane, double-click DHCP Administrators.
In the DHCP Administrators Properties dialog box, click the Members tab, and then click Add.
Under Enter the object names to select (examples), type User1, the user name that you created in the previous procedure, and then click OK two times.
Leave the AD DS Users and Computers console open for the following procedure.
For the test lab, DHCP Server 1 and DHCP Server 2 are running Windows Server 2008 R2, and host the DHCP service as primary server and secondary server respectively for split-scope configuration, which provides IP addresses and leases for the requesting DHCP clients. To configure DHCP Server 1 and DHCP Server 2, complete the following tasks:
Install the operating system.
Configure TCP/IP.
Join the computer to the domain.
Install DHCP server roles.
Configure DHCP.
Start your computer using the Windows Server 2008 R2product CD.
When prompted for the installation type, select Custom.
Follow the instructions that appear on your screen to finish the installation.
Next, install the DHCP server role on DHCP Server 1 and DHCP Server 2.
Click Start, and then click Server Manager.
Under Roles Summary, click Add roles, and then click Next.
On the Select Server Roles page, select the DHCP server, and then click Next two times.
On the Select Network Connection Bindings page, verify that 172.16.1.2 is selected, and then click Next on DHCP Server 1. Similarly, on the Select Network Connection Bindings page, verify that 172.16.1.3 is selected, and then click Next on DHCP Server 2.
On the Specify IPv4 DNS Server Settings page, verify that contoso.com is listed under Parent domain.
Type 172.16.1.1 under Preferred DNS server IP address, and then click Validate. Verify that the result returned is valid, and then click Next.
On the Specify WINS Server Settings page, accept the default setting of WINS is not required on this network, and then click Next and skip to step 11 below.
On the Add or Edit DHCP Scopes page, click Add for DHCP Server 1 only.
Important
Do not add a DHCP scope on DHCP Server 2. A scope will be added automatically by the split scope wizard. For DHCP Server 2, click Next.
In the Add Scope dialog box, type SS Scope next to Scope Name. Next to Starting IP Address, type 172.16.1.4, next to Ending IP Address, type 172.16.1.204, and next to Subnet Mask, type 255.255.255.0.
Select the Activate this scope check box, click OK, and then click Next.
On the Configure DHCPv6 Stateless Mode page, select Disable DHCPv6 stateless mode for this server, and then click Next.
On the Authorize DHCP Server page, select Use current credentials. Verify that CONTOSO\user1 is displayed next to Username, and then click Next.
On the Confirm Installation Selections page, click Install.
Verify the installation was successful, and then click Close.
DHCP Server 1 and DHCP Server 2 are the member servers that provide DHCP addressing. The DHCP service was partially configured during installation with Server Manager on both of these servers.
Configure identical reservations on both the DHCP servers so that either DHCP servers can assign the reserved IP address.
Click Start, click Run, type dhcpmgmt.msc, and then press ENTER.
Leave this window open for all DHCP configuration tasks.
Next, configure scope options for the default user class. These server options are used when a client computer attempts to access the network and obtain an IP address from the DHCP server.
In the DHCP console tree, under Scope [172.16.0.0] SS Scope, right-click Scope Options, and then click Configure Options.
On the Advanced tab, verify that Default User Class is selected next to User class.
Select the 006 DNS Servers check box, in IP Address, under Data entry, type 172.16.1.1, and then click Add.
Select the 015 DNS Domain Name check box, in String value, under Data entry, type contoso.com, and then click OK.
Note
The 003 Router option is configured in the default user class if a default gateway is required for client computers. Because all computers in the test lab are located on the same subnet, this option is not required.
Next, configure a split-scope deployment on DHCP Server 1 and DHCP Server 2 by launching the Split-scope Wizard on the scope to be split-scoped on DHCP Server 1.
In the DHCP console tree, right-click Scope [172.16.0.0] SS Scope, and then click Advanced > Split-Scope.
The DHCP Split-Scope Configuration wizard is launched.
On the Percentage of Split page, set the configuration for a ratio of 80:20 by assigning DHCP Server 1 to exclude addresses 172.16.1.164 to 172.16.1.204, and DHCP Server 2 to exclude 172.16.1.4 to 172.16.1.163. See the example below.
Click Next, and then on the Delay in DHCP Offer page, configure DHCP Server 1 with a value of 0 (default) and configure Added DHCP Server (DHCP Server 2) for 1000 milliseconds. This enables DHCP Server 2 to offer DHCP OFFER messages only after a delay of 1000 milliseconds, thereby preventing the exhaustion of IPv4 addresses from the required scope of DHCP Server 2.
DHCP Client 1 and DHCP Client 3 are computers running Windows 7that you use to demonstrate as a typical DHCP client that requests for an IP address from the DHCP server in the domain. To configure DHCP Client 1, complete the following tasks:
Install the operating system.
Configure TCP/IP.
Verify network connectivity.
Join the computer to the domain and restart the computer.
Start your computer using the product disc for Windows 7.
When prompted for the installation type, select Custom Installation.
When prompted for a computer name, type DHCP Client 1.
On the Select your computer's current location page, click Work.
Follow the rest of the instructions that appear on your screen to finish the installation.
Click Start, and then click Control Panel.
Click Network and Internet, click Network and Sharing Center, and then click Manage network connections.
Right-click Local Area Connection, and then click Properties.
In the Local Area Connection Properties dialog box, clear the Internet Protocol Version 6 (TCP/IPv6) check box. This reduces the complexity of the lab, particularly for those who are not familiar with IPv6.
Click Internet Protocol Version 4 (TCP/IPv4), and then click Properties.
Verify that Obtain an IP address automatically and Obtain DNS server address automatically are selected.
Click OK, and then click Close to close the Local Area Connection Properties dialog box.
Close the Network Connections and Network and Sharing Center windows.
Because DHCP Client 1 now has access to domain services, it can be joined to the domain.
Click Start, right-click Computer, and then click Properties.
Under Computer name, domain, and workgroup settings, click Change settings.
In the System Properties dialog box, click Change.
In the Computer Name/Domain Changes dialog box, select Domain, type Contoso.com, and then type enggmachine1.contoso.com in Computer Name.
Click More, and then, in Primary DNS suffix of this computer, type Contoso.com.
Click OK two times.
When prompted for a user name and password, type the user name and password for User1 account, and then click OK.
When you see a dialog box that welcomes you to the Contoso.com domain, click OK.
When you see a dialog box that tells you that you must restart the computer to apply changes, click OK.
In the System Properties dialog box, click Close.
In the dialog box that prompts you to restart the computer, click Restart the computer now.
Next, obtain a new IP address profile for DHCP Client 1 from DHCP.
On DHCP Client 1, in the Command Prompt window, type ipconfig /renew, and then press ENTER.
In the Command Prompt window, type ping 172.16.1.1, and then press ENTER.
Verify that the response reads “Reply from 172.16.1.1."
In the Command Prompt window, type ipconfig, and then press ENTER.
In the command output, verify that the value of Connection-specific DNS Suffix is contoso.com and that the value of Subnet Mask is 255.255.255.0.
In the Command Prompt window, type route print -4, and then press ENTER.
In the command output, below Active Routes, verify that a Network Destination of 172.16.1.1 is displayed.
To demonstrate that DHCP Server 2 continues to distribute IP addresses to clients in the absence of DHCP Server 1, take DHCP Server 1 offline.
- In the DHCP console tree, right-click DHCP Server 1, point to All Tasks and then click Stop.
Next, obtain a new IP address profile for DHCP Client 1 from DHCP Server2.
On DHCP Client 1, in the Command Prompt window, type ipconfig, and then press ENTER.
In the command output, verify that the IP address is 172.16.1.164 from DHCP Server 1.
In the Command Prompt window, type ipconfig /renew, and then press ENTER.
In the command output, verify that the IP address is 172.16.1.4 from DHCP Server 2.
To demonstrate that DHCP Server 1 resumes distribution of IP addresses to when it is brought back online, restart, DHCP Server 1.
- In the DHCP console tree, right-click DHCP Server1, rest on All Tasks, and then click Start.
Next, obtain a new IP address profile for DHCP Client 1 from DHCP Server 1.
On DHCP Client 1, in the Command Prompt window, type ipconfig, and then press ENTER.
In the command output, verify that the IP address is 172.16.1.4 from DHCP Server 2.
In the Command Prompt window, type ipconfig /renew, and then press ENTER.
In the command output, verify that the IP address is 172.16.1.164 from DHCP Server 1.
This appendix helps you with troubleshooting techniques and the setting of optional features in Windows Server 2008 R2 and Windows 7.
Reviewing information contained in DHCP client events can help you with troubleshooting. It can also help you understand DHCP client functionality.
Click Start, point to All Programs, click Accessories, and then click Run.
Type eventvwr.msc, and then press ENTER.
In the left tree, navigate to Event Viewer (Local)\Windows Logs\System.
Click an event in the middle pane.
By default, the General tab is displayed. Click the Details tab to view additional information.
You can also right-click an event, and then click Event Properties to open a new window for reviewing events.
Reviewing information contained in Windows System events on your DHCP servers can help you with troubleshooting. It can also help you understand DHCP server functionality.
Click Start, and then click Run.
Type eventvwr.msc, and then press ENTER.
In the left tree, navigate to Event Viewer (Local)\Custom Views\Server Roles\DHCP Server.
Click an event in the middle pane.
By default, the General tab is displayed. Click the Details tab to view additional information.
You can also right-click an event, and then click Event Properties to open a new window for reviewing events. The following are the events pertaining to this feature:
1340 - EVENT_SERVER_DNSDHCID_FAIL
The DNS registration for DHCPv4 Client IP address %1 , FQDN %2, and DHCID %3 is denied as there is probably an existing client with same FQDN already registered with DNS.
1340 - EVENT_SERVER_DNSDHCID_FAIL
The DNS registration for DHCPv6 Client IPv6 address %1 , FQDN %2, and DHCID %3 is denied as there is probably an existing client with same FQDN already registered with DNS.