Configure DHCP on Windows Server 2008
Pluralsight blog Where devs, IT admins & creative pros go for news, tips, videos and more.
3,500+ tech & creative courses authored by experts - unlimited & online Get it now →
December 11, 2008

Configure DHCP on Windows Server 2008

By

In my last article, Installing DHCP Role, I talked about what DHCP is and how it works then walked you through installing the role on your server.

The problem of course being that since we skipped setting up scopes, the server is unable to service clients.

We are going to fix that with this article because we are going to go through and do some configuration on that DHCP server — by setting up a scope and some common client options that go with it.

DHCP Scopes

The first thing we are going to configure on the server is a scope. You might be wondering what a scope is, so let’s start with that.

A scope is a range of addresses that are allowed to be handed out by the DHCP server. Generally speaking there is only one scope per subnet, but there are exceptions to that called Super Scopes, but that is beyond the scope (no pun intended) of this article.

Within the scope, you can also have Reservations and Exclusions which will do the following:

  • Reservations — You can setup certain IPs to be handed out for certain MAC addresses (a MAC address is the unique number for a network adapter). This is generally used for clients or devices that must always have the same IP but you still want to manage through DHCP Server for other options (DNS or Gateway for example)
  • Exclusions — An exclusion is either a single IP or range that you do not want managed by the DHCP server. You would do this for the IPs that you would assign statically to devices like Servers that should always have the same IP.

Hopefully before you even installed the DHCP server you have your network diagrammed out and should have to just plug-in the values that you have planned.

How to Configure a DHCP IPv4 Scope

I am going to walk you through configuring an IPv4 scope for the following IP range and settings:

192.168.10.2 – 192.168.10.230
Subnet Mask: 255.255.255.0
Exclusions: 192.168.10.200 – 192.168.10.230
Reservation: 1 client computer at 192.168.10.190
DNS: 192.168.10.200
Gateway: 192.168.10.1
Least Duration: 20 Days

Some of these are standard fare and others will be done under options. Let’s go ahead and start.

1. Go to Start, Administrative Tools, and click on DHCP

Configure DHCP on Windows Server 2008 - 1

2. Expand out the server and right click on IPv4, then left click on New Scope

Configure DHCP on Windows Server 2008 - 2

3. The New Scope Wizard starts up, go ahead and click Next

Configure DHCP on Windows Server 2008 - 3

4. Go ahead and name your scope. For this demo I am going to call it DHCPdemo and leave the Description blank. Fill in your name for the scope and click on Next

Configure DHCP on Windows Server 2008 - 4

5. Now we are going to enter the IP range we are assigning to the scope.

In the Start IP address: I am going to place 192.168.10.2 and in the End IP address: I will place 192.168.10.230.

For the subnet mask we are going to use 255.255.255.0, and we can enter this either by using the length 24 or placing the 255.255.255.0 in the fields.

Once you fill in your information click Next

Configure DHCP on Windows Server 2008 - 5

6. Now we are going to setup an exclusion range by entering the Start IP address: as 192.168.10.200 and then in the End IP address: place 192.168.10.230.

After that click Add to place your exclusion range in place.

Configure DHCP on Windows Server 2008 - 6

7. Once the exclude range is in place then click Next

Configure DHCP on Windows Server 2008 - 7

8. The Lease Duration window is now up and we are going to change this to 20 days.

You of course should change this to suit your environment, if you have a lot of mobile users you will want to do shorter lease duration, as you will want IPs to free up quicker as the users come and go. After you set your lease time click Next

Configure DHCP on Windows Server 2008 - 8

9. The wizard will now ask if you want to configure DHCP options. There are quite a few options you can send to the DHCP clients, but there are a couple of major ones that make life simple, so select Yes, I want to configure these options now and then click Next

Configure DHCP on Windows Server 2008 - 9

10. The first option to configure is Router (Default Gateway), and we will put in the Router gateway for this subnet 192.168.10.1, click Add and then click Next.

Configure DHCP on Windows Server 2008 - 10

11. Now we will setup the DNS Server; you can leave the Parent Domain blank and then fill in the DNS IP address of 192.168.10.200 and then click Add, then click Next

NOTE: If you followed the Install DHCP Role article there will already be a DNS server in place. I have removed that so I can demonstrate adding it here.

Configure DHCP on Windows Server 2008 - 11

12. If you need WINS Servers then place the information on this next screen and click on Next

Configure DHCP on Windows Server 2008 - 12

13. The next screen asks you if you want to activate the scope. I am going to go ahead and select Yes, but choose what works for you and click then on Next

Configure DHCP on Windows Server 2008 - 13

14. You have successfully completed the New Scope wizard! Click Finish

Configure DHCP on Windows Server 2008 - 14

That’s it, now that you have configured the DHCP scope you should see it in the DHCP Manager:

Configure DHCP on Windows Server 2008 - 15

How toSetup DHCP Reservation

The one thing we did not do in the wizard is setup our DHCP reservation. As I mentioned above, a reservation guarantees the same IP address to a client using their MAC address as the identifier.

I setup an XP client and used the IPconfig /all cmd to find its MAC address of 00-03-FF-2F-95-0C. You can also see from the screen shot that the XP machine was serviced by our DHCP server and received the very first address of 192.168.10.2, we are going to change this with a reservation to receive 192.168.10.1

Configure DHCP on Windows Server 2008 - 16

Now let’s setup the DHCP reservation.

1. Go into DHCP Manager and expand the scope out, then right click on Reservations and left click on New Reservations…

Configure DHCP on Windows Server 2008 - 17

2. In the New Reservation window input the following information then click Add:

Name: Dave’s Test Client
IP Address: 192.168.10.190
MAC Address: 00-03-FF-2F-95-0C
Description: This Space Blank or whatever you want

Note: please use your own data, don’t use the above MAC and expect this to work.

Configure DHCP on Windows Server 2008 - 18

3. In DHCP Manager you now see your reservation under Reservations

Configure DHCP on Windows Server 2008 - 19

4. Now let’s test this on the client by typing Ipconfig /release, then Ipconfig/renew and you will now see that the client received the reserved IP of 192.168.10.190.

Configure DHCP on Windows Server 2008 - 20

Again you would use this for clients or devices that you always wanted to hand out the same IP to, but still mange through DHCP.

I hope this gave you a good overview of the basics for configuring a DHCP server. There are quite a few options you can configure through DCHP, but outside of these basic ones they are very environment specific and you could go your whole career without needing them.

Ready to test your skills in Computer Networking? See how they stack up with this assessment from Smarterer, the newest addition to the Pluralsight family. Start this Computer Networking test now.

 

About the Author

(MCTS, MCP, A+) has been working in the IT field since leaving the U.S. Army in 1996.  Working his way up from printer hardware repair to running a corporate datacenter for a multinational corporation, Dave has seen many environments throughout the years. Focusing on web sites and search engine optimization the last few years, with the release of Server 2008 it has renewed his passion for the Wintel platform and server technologies. David also runs Windows-Server-Training.com where he posts free videos and walk-throughs for a variety of server technologies. David currently works as a freelance technical consultant and writer for a variety of companies in the Chicago area.

Author's Website: http://www.DaveLawlor.com


Discussion