Categories
Design

It how to set up dhcp in windows server 2008 r2

DHCP simplifies administration and makes it easier for users to get their computer on the organization’s network. DHCP is a protocol that allows client computers to start up and automatically receive an internet protocol address and other name System server addresses, and Windows Internet Naming Service Server addresses.

It’s assumes that you have install Windows Server 2008 R2 on a machine and you should also have set a static IP address on the server before continuing.

1. Click Start, click All Programs, click Administrative Tools, and select Server Manager.

It how to set up dhcp in windows server 2008 r2

2. In Server Manager, click the Add Roles link in the right pane to initiate the Add Roles Wizard.

It how to set up dhcp in windows server 2008 r2

3. Click Next to continue.

It how to set up dhcp in windows server 2008 r2

4. On the Select Server Roles page, select the check box next to DHCP Server, and then click Next to continue.

It how to set up dhcp in windows server 2008 r2

5. On the Introduction to DHCP Server page, helpful information is displayed to learn about DHCP server. click Next to continue the installation.

It how to set up dhcp in windows server 2008 r2

6. On the select Network Connection Binding page, check the box next to the desired network connections and click Next to continue.

It how to set up dhcp in windows server 2008 r2

7. The display specify IPv4 DNS setting enter the name of the parent domain and preferred DNS server IP address and click validate button to check IP address, click Next to continue.

It how to set up dhcp in windows server 2008 r2

8. On next screen click add and then type name of the scope, first address that you want available to clients to use, enter last address that you want available to client to use, enter the subnet mask and enter the IP address of your gateway.

It how to set up dhcp in windows server 2008 r2

9. If you want to enable IPv6 for this server select here otherwise disable IPv6 for your DHCP server and click ok.

It how to set up dhcp in windows server 2008 r2

10. Select whether to use the current or alternate credential used to authorize the DHCP server in the domain. choose use current credentials and click Next.

It how to set up dhcp in windows server 2008 r2

11. Click Next to Install.

It how to set up dhcp in windows server 2008 r2

12. Click on close button.

It how to set up dhcp in windows server 2008 r2

13. Once the Installation is complete your DHCP server will be functioning, you can manage your DHCP server.

It how to set up dhcp in windows server 2008 r2

14. After you Install the DHCP server service, the next thing you must do is create the scopes that will provide the range of IP address and TCP/IP options for clients. DHCP Server services support three types of scopes.

  • Normal Scope
  • Multicast Scope
  • Super Scope

1. Normal Scope

A Normal scope is used to assign IPv4 address pools for Class A, B and C networks.

2. Multicast Scope

A multicast scope is used to assign IP address pools for IPv4 Class D networks.

3. Super Scope

If you configure multiple scopes on a server and want to be able to activate or deactivate them as a unit then create the Super Scope and add to it the scopes you want to manage as a group.

It how to set up dhcp in windows server 2008 r2

15. Reservations provide a way to assign a permanent lease on an IPv4 address to a client. In this way, the client has a fixed IP address, but you retain flexibility in that you could change the IPv4 address at any time if necessary through DHCP.

It how to set up dhcp in windows server 2008 r2

Share the post “Configuring Windows Server 2008 R2 DHCP Server”

Question

I’ve installed Windows Server 2008 R2 in my home “virtual” test environment. I have AD DS, integrated DNS installed. I installed DHCP role for test purposes but I seem to be getting errors. My configuration as follows:

VMware: Windows Server 2008 R2 – Network adapter connection: Bridged

IP: 192.168.0.70 – Subnet Mask: 255.255.255.0 – Default Gateway: 192.168.0.1 and DNS is configured to use ISP DNS server.

DHCP Scope: 192.168.0.15 to 192.168.0.25 and 006 DNS Server: 192.168.0.70

DHCP Server is installed on same DC as AD DS/DNS.

Virtual Client (Windows 7 Pro) is configured to automatically obtain IP addresses and is joined to domain.

IPv4: 192.168.0.9 – Subnet Mask: 255.255.255.0 – Default Gateway: 192.168.0.1 – DHCP: 192.168.0.1 and DNS is configured to use ISP DNS server.

The Errors I’m getting:

– Event ID: 20090 – “DHCP Server is unable to bind to UDP port number 67 as it is used by another application. This port must be made available to DHCP Server to start servicing the clients.”

– Event ID: 1041 – “The DHCP service is not servicing any DHCPv4 clients because none of the active network interfaces have statically configured IPv4 addresses, or there are no active interfaces.”

Thank you in advance

EDIT: I’ve changed DNS ip to Server ip: 192.168.0.70 as i have dns role installed.

  • Edited by tech_leak Wednesday, May 29, 2013 1:33 AM DNS Role

Answers

right, solving the event logged issues i mentioned above didnt fix the issue so i deleted the scope and re configured it. Now its fixed and the clients are receiving the correct ip’s from the dhcp server. Thank you so much for your help 🙂

  • Edited by tech_leak Wednesday, May 29, 2013 4:02 AM
  • Marked as answer by tech_leak Wednesday, May 29, 2013 3:39 PM

All replies

can you verify the NIC binding in your DHCP Server properties ?

and to find the port usage you can use netstat -ano and process explorer / Task manager to find out the corresponding process PID and stop the app/ service and verify if you get rid of the error.

Task manager to find out the corresponding process PID and stop the app/ service and verify if you get rid of the error.

I tried checking in different ways, using netstat -ano. i just didn’t know how to find that service. So thank you. It was WDS that was using it so I stopped, even removed the role. Now DHCP is giving me a warnings.

Event ID: 1056 – “The DHCP service has detected that it is running on a DC and has no credentials configured for use with Dynamic DNS registrations initiated by the DHCP service. This is not a recommended security configuration. Credentials for Dynamic DNS registrations may be configured using the command line “netsh dhcp server set dnscredentials” or via the DHCP Administrative tool.

EDIT: I’ve entered credentials in DHCP properties which fixed the problem. Now, when I do ipconfig on client computer, DHCP Server is still pointing to router (192.168.0.1) :/

I know is frustrating when the DHCP server fails, all your network is down, been there. That’s why is recommended to have a fault tolerant DHCP service, so in case one of the DHCP servers fails, the other one takes the job. In this guide I have two servers running Windows 2008 R2 that will hold the DHCP role, and everything happens in a domain environment. To start we need to create the Failover Cluster, and for that I have a guide right here. Now that the Failover Cluster is created and working properly let’s move over with our configuration. If you try to configure the DHCP service in the cluster right now you will get an ugly error:

The required role or feature for this service or application cannot be found on any node. User Server Manager to add roles or features.

and this is because the DHCP server role is not installed on any of the cluster nodes. Log to the every node in the cluster and install the DHCP server role by following this guide, but do not configure the scopes .

It how to set up dhcp in windows server 2008 r2

When you get to the Add or Edit DHCP Scopes screen, just click Next.

It how to set up dhcp in windows server 2008 r2

If the DHCP role is missing on one of the cluster nodes you will be notified with an error message again. The best part is that the message is actually telling you on which cluster node(s) the role is not installed.

The required role or feature for this service or application is either missing or cannot be verified as installed on the following node(s): cluster node(s). Use Server Manager to add roles or features.

It how to set up dhcp in windows server 2008 r2

Now that you have the DHCP role installed on every cluster node, let’s configure the DHCP service in a cluster. Open the Failover Cluster Manager and right-click Services and applications then choose Configure a Service or Application.

It how to set up dhcp in windows server 2008 r2

From the list select DHCP Server and click Next.

It how to set up dhcp in windows server 2008 r2

Give the DHCP cluster a name and IP address. I don’t need to remind you to use a static IP address.

It how to set up dhcp in windows server 2008 r2

Select the storage where the DHCP database will sit.

If you don’t see any storage, it means you either did not configure the cluster in a right way or you didn’t add a storage resource to the cluster.

It how to set up dhcp in windows server 2008 r2

Click Next on the Confirmation screen.

It how to set up dhcp in windows server 2008 r2

The configuration will take just a few seconds and if everything went well you should not get any errors on the report screen.

It how to set up dhcp in windows server 2008 r2 It how to set up dhcp in windows server 2008 r2

The DHCP service is now installed in a Failover Cluster environment. The next step is to configure the DHCP service so clients can get IPs. Right-click the name of the DHCP service in the Failover Cluster Manager and choose Manage DHCP.

It how to set up dhcp in windows server 2008 r2

You can follow this guide on how to configure a DHCP server.

It how to set up dhcp in windows server 2008 r2

Want content like this delivered right to your

By Codrut Nistor

When a DHCP server is installed and scopes are created in it it does not only assigns the IP addresses to the client computers but it also provides the machine with some other information which is helpful in communicating with other machines within the network and outside. IP address of DNS server and the default gateway can be a good example for this. During scope configuration if any administrator has not opted to configure additional settings for the scope he needs to manually do so after the scope is successfully created. As an administrator of a DHCP server in Windows server 2008 if you want to configure default gateway you need to follow the steps given below:

1. Make sure that you are logged on to Windows server 2008 with the administrator privileges and DHCP server and its scope is already configured.

2. Open DHCP snap-in and expand the name of the server to get IPv4 tree.

3. Expand the tree and expand the available scope.

4. Right click on Scope Options and from the available menu click on Configure Options.

5. On Scope Options box locate and check 003 Router checkbox.

It how to set up dhcp in windows server 2008 r2

6. Under IP address section type the IP address of the default gateway and click on Add button.

7. Click on Ok button to save the changes.

8. If required restart DHCP service to make the changes take effect.

By Codrut Nistor

DHCP server plays an important role in both small and large scale industries. In small scale industries DHCP server can be reinstalled several times and this practice would not reflect any negative impact on the network infrastructure as there are very few computers to be taken care of. However in medium to large scale organizations where there are several computers connected to each other and DHCP server is the only source to provide IP addresses to the clients it becomes practically illogical to use it without any backup strategy. In order to protect the loss of configurations and database of DHCP server caused by disaster administrators mostly take the backups. Backups can then be restored in case any disaster occurs. As an administrator of Windows server 2008 if you want to take the backup of the configurations and database of DHCP server you are required to follow the steps given below:

1.      Logon to Windows server 2008 with any account wearing administrative crown.

2.      Ensure that DHCP server role is installed and properly configured.

3.      In the search box at the bottom of start menu type DHCP and press enter key to open DHCP snap-in.

4.      On the opened window right click on the server name and from the appeared menu click on Backup.

5.      On Browse for Folder box browse for and locate for a secured location where you want to keep the backup files of DHCP server and click on Ok button once located.

It how to set up dhcp in windows server 2008 r2

6.      Backup will take place in the background and no message will be displayed on the window. In case you want to check the backup file C:WindowsSystem32dhcpbackup default location can be used to do so.

7.      Default name of the file will be DhcpCfg and it will be without extension.

Note: You can choose Restore in the fourth step in case you want to restore the backed up database of DHCP server.

By Codrut Nistor

When DHCP server is installed and configured on computer it is meant to assign IP addresses to the clients automatically. During the installation and configuration of any scope of DHCP server the default lease duration for any IP address is 8 days. This means that any requesting client computer can only use DHCP assigned IP address for up to 8 days at the most. In some cases where machines are not usually mobile and data traffic is not too high this configuration is quite appropriate and needs not any further modifications. However at some places or in some scenarios where several mobile computers are used and people keep on coming in and going out with the laptop PCs it becomes essential for the administrators to reduce the lease duration in order to maintain the balance of network bandwidth and availability of IP addresses. As an administrator if you want to reduce the lease duration you need to follow the steps given below:

1. Make sure that you are logged on to Windows server 2008 computer with administrator account and DHCP server role and scope is installed and configured.

2. Open DHCP snap-in and expand the server name.

3. Expand IPv4 tree and right click on the available scope.

4. From the menu go to Properties and on the General tab under Lease duration for DHCP clients section make the appropriate changes in the values.

It how to set up dhcp in windows server 2008 r2

5. Once done click on Ok button to make the changes permanent.

By Codrut Nistor

Reservation in DHCP is yet another feature which allows administrators to limit a particular IP address for a specific MAC address only. This means if that the IP address is reserved for a particular MAC address will not be issued to any other computer even if all the IP addresses are leased. The process in the background is that as soon as a client computer requests an IP address from the DHCP server and if the MAC address of the client computer is mapped with a particular IP address DHCP server gives that IP address to the requesting MAC address. This ensures that particular computer receives one IP address every time it starts. This configuration is quite suitable when administrators want to specify a permanent IP address to any important machine in the network for example any server. As a systems administrator if you want to configure reservations in DHCP you need to follow the steps given below:

1. Logon to Windows server 2008 computer with any account that has administrative privileges and make sure that DHCP scope is configured.

2. Open DHCP snap-in by typing DHCP in search box at the bottom of start menu.

3. Expand the name of the server and expand IPv4 tree.

4. Expand the scope in which you want to configure reservations.

5. Right click on Reservations and from the available menu click on New Reservation.

6. On the opened box specify the name of the reservation type the IP address which you want to map to the computer and provide the MAC address of the computer for which you want to map this IP address.

It how to set up dhcp in windows server 2008 r2

7. Leave everything else as default and click on Add button to create a new reservation.

Question

I have question about my DHCP servers, i have to DHCP servers one of Head office and other user for branch office. 2 servers have more than one scope.

Branch office scopes (servers IP 10.200.146.2)

10.200.141.1 to 10.200.141.252

10.200.152. 200 to 10.200.152. 209

10.200.134. 132 to 10.200.134. 142

Head office scope (servers IP 10.200.145.112)

10.200.140.1 to 10.200.140.252

10.200.145. 64 to 10.200.145.99

10.200.152. 11 to 10.200.152.126

10.200.152. 132 to 10.200.152.158

10.200.152. 164 to 10.200.152.190

10.200.170.5 to 10.200.170.200

10.200.171.1 to 10.200.170.30

10.200.171.65 to 10.200.171.126

I want to make my network like this,

Q1. Branch office server primary for the Branch office and if the server fails clients must receive the IP address from the Head office DHCP server

Answers

Unfortunately, there is no ‘automatic’ failover for DHCP. You can create a scope and disable it on the 2 nd DHCP server. If 1 st server goes down, you can enable the scope on the 2 nd DHCP server and change IP Helper address on the router to the 2 nd DHCP server. Clients will receive IP address from the 2 nd sever based on the IP Helper configuration and ‘router’ configuration inside the scope.

Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX http://blogs.sivarajan.com/ http://publications.sivarajan.com/ This posting is provided “AS IS” with no warranties, and confers no rights.

  • Marked as answer by Tiger Li Microsoft employee Thursday, May 27, 2010 2:01 AM
  • Unmarked as answer by Chinthaka.De.Silva Monday, June 28, 2010 1:19 PM
  • Marked as answer by Chinthaka.De.Silva Monday, June 28, 2010 1:19 PM

I agree with Santhosh Sivarajan’s idea. I have also have an idea for you reference.

There is 80/20 design rule for balancing scope distribution of address which deploys the 80% address space on Head Office DHCP’s scope and the other 20% on Branch Office. The delay value configuration will control the priority level of two or more DHCP server.

The Branch DHCP will not assign the address for head office client until the head office’s DHCP down. Once the DHCP service in HQ is down, Breach Office’s DHCP will assign the IP address for HQ office clients.

Please remind that you have to enable the DHCP rely on each subnet’s route of RRAS server, with which DHCP broadcast packet can cross the subnet.

You can easily migration your exist DHCP scopes with the new design “Split Scope” wizard in windows 2008/2008 R2.

Here are the articles for you reference:

DHCP Step-by-Step Guide: Demonstrate DHCP Split Scope with Delay on a Secondary Server in a Test Lab

By Codrut Nistor

While working with DHCP server and its scopes many times administrators may not want DHCP server to assign a single address or range of IP addresses to the client computers when they request. The reason might be that those IP addresses are manually assigned to any computer which might be playing an important role in the network for example file server. When this is the case administrators need to exclude that particular IP address or the range from getting distributed to the clients. As a Windows server 2008 DHCP server administrator if you want to specify exclusion range in the DHCP server you need to follow the steps given as below:

1. Logon to Windows server 2008 computer with administrator account and ensure that DHCP server role is installed on it.

2. Click on Start menu and in the search box type DHCP.

3. Press enter key to open DHCP snap-in.

4. From the left pane expand the name of the server and then expand IPv4 tree.

5. Expand the scope for which you want to specify exclusion range and right click on Address Pool to get the menu.

6. From the available options click on New Exclusion Range and in the Add Exclusion box specify the start and end IP addresses from the range that you want to exclude. (If you want to exclude only one IP address type it in both start and end text boxes).

It how to set up dhcp in windows server 2008 r2

7. Once done click on Ok button to save the changes.