You are on page 1of 20

"Dynamic Host Configuration Protocol (DHCP) is an IP standard designed to reduce the complexity of administering IP address configurations." - Microsoft's definition.

A DHCP server would be set up with the appropriate settings for a given network. Such settings would include a set of fundamental parameters such as the gateway, DNS, subnet masks, and a range of IP addresses. Using DHCP on a network means administrators don't need to configure these settings individually for each client on the network. The DHCP would automatically distribute them to the clients itself. The DHCP server assigns a client an IP address taken from a predefined scope for a given amount of time. If an IP address is required for longer than the lease has been set for, the client must request an extension before the lease expires. If the client has not requested an extension on the lease time, the IP address will be considered free and can be assigned to another client. If the user wishes to change IP address then they can do so by typing "ipconfig /release", followed by "ipconfig /renew" in the command prompt. This will remove the current IP address and request a new one. Reservations can be defined on the DHCP server to allow certain clients to have their own IP address (this will be discussed a little later on). Addresses can be reserved for a MAC address or a host name so these clients will have a fixed IP address that is configured automatically. Most Internet Service Providers use DHCP to assign new IP addresses to client computers when a customer connects to the internet - this simplifies things at user level.

The above diagram diplays a simple structure consisting of a DHCP server and a number of client computers on a network. The DHCP Server itself contains an IP Address Database which holds all the IP addresses available for distribution. If the client (a member of the network with a Windows 2000 Professional/XP operating system, for example) has "obtain an IP address automatically" enabled in TCP/IP settings, then it is able to receive an IP address from the DHCP server.

Setting up a DHCP Server


This will serve as a step-by-step guide on how to setup a DHCP server. Installing the DHCP server is made quite easy in Windows 2003. By using the "Manage your server" wizard, you are able to enter the details you require and have the wizard set the basics for you. Open to "Manage your server" wizard, select the DHCP server option for the list of server roles and press Next. You will be asked to enter the name and description of your scope.

Scope: A scope is a collection of IP addresses for computers on a subnet that use DHCP.

The next window will ask you to define the range of addresses that the scope will distribute across the network and the subnet mask for the IP address. Enter the appropriate details and click next.

You are shown a window in which you must add any exclusions to the range of IP addresses you specified in the previous window. If for example, the IP address 10.0.0.150 is that of the company router then you won't want the DHCP server to be able to distribute that address as well. In this example I have excluded a range of IP addresses, 10.0.0.100 to 10.0.0.110, and a single address, 10.0.0.150. In this case, eleven IP's will be reserved and not distributed amongst the network clients.

It is now time to set the lease duration for how long a client can use an IP address assigned to it from this scope. It is recommended to add longer leases for a fixed network (in the office for example) and shorter leases for remote connections or laptop computers. In this example I have set a lease duration of twelve hours since the network clients would be a fixed desktop computer in a local office and the usual working time is eight hours.

You are given a choice of whether or not you wish to configure the DHCP options for the scope now or later. If you choose Yes then the upcoming screenshots will be of use to you. Choosing No will allow you to configure these options at a later stage.

The router, or gateway, IP address may be entered in next. The client computers will then know which router to use.

In the following window, the DNS and domain name settings can be entered. The DNS server IP address will be distributed by the DHCP server and given to the client.

If you have WINS setup then here is where to enter the IP Address of the WINS server. You can just input the server name into the appropriate box and press "Resolve" to allow it to find the IP address itself.

The last step is to activate the scope - just press next when you see the window below. The DHCP server will not work unless you do this.

The DHCP server has now been installed with the basic settings in place. The next stage is to configure it to the needs of your network structure.

Configuring a DHCP server


Hereunder is a simple explanation of how to configure a DHCP server. The address pool displays a list of IP ranges assigned for distribution and IP address exclusions. You are able to add an exclusion by right clicking the address pool text on the left hand side of the mmc window and selecting "new exclusion range". This will bring up a window (as seen below) which will allow you to enter an address range to be added. Entering only the start IP will add a single IP address.

DHCP servers permit you to reserve an IP address for a client. This means that the specific network client will have the same IP for as long as you wanted it to. To do this you will have to know the physical address (MAC) of each network card. Enter the reservation name, desired IP address, MAC address and description - choose whether you want to support DHCP or BOOTP and press add. The new reservation will be added to the list. As an example, I have reserved an IP address (10.0.0.115) for a client computer called Andrew.

If you right click scope options and press "configure options" you will be taken to a window in which you can configure more servers and their parameters. These settings will be distributed by the DHCP server along with the IP address. Server options act as a default for all the scopes in the DHCP server. However, scope options take preference over server options. In my opinion, the DHCP server in Windows 2003 is excellent! It has been improved from the Windows 2000 version and is classified as essential for large networks. Imagine having to configure each and every client manually - it would take up a lot of time and require far more troubleshooting if a problem was to arise. Before touching any settings related to DHCP, it is best to make a plan of your network and think about the range of IPs to use for the computers.

DHCP server role: Configuring a DHCP server


Updated: January 21, 2005

DHCP server role: Configuring a DHCP server


DHCP servers centrally manage IP addresses and related information and provide it to clients automatically. This allows you to configure client network settings at a server,

instead of configuring them on each client computer. If you want this computer to distribute IP addresses to clients, then configure this computer as a DHCP server. This topic explains the basic steps that you must follow to configure a DHCP server. When you have finished setting up a basic DHCP server, you can complete additional configuration tasks, depending on how you want to use the DHCP server. This topic covers: Before you begin Configuring your DHCP server Next steps: Completing additional tasks

Before you begin


Before you configure your computer as a DHCP server, verify that: You are familiar with DHCP concepts such as scopes, leases, and options. For more information, see DHCP terminology . The operating system is configured correctly. In the Windows Server 2003 family, DHCP depends on the appropriate configuration of the operating system and its services. If you have a new installation of a Windows Server 2003 operating system, then you can use the default service settings. No further action is necessary. If you upgraded to a Windows Server 2003 operating system, or if you want to confirm that your services are configured correctly for best performance and security, then verify your service settings using the table in Default settings for services . This computer has a static IP address. For more information, see Configure TCP/IP for static addressing . All existing disk volumes use the NTFS file system. FAT32 volumes are not secure, and they do not support file and folder compression, disk quotas, file encryption, or individual file permissions. Windows Firewall is enabled. For more information, see Help: Turn Windows Firewall on with no exceptions . The Security Configuration Wizard is installed and enabled. For information about the Security Configuration wizard, see Security Configuration Wizard Overview . When you add the DHCP server role, you create one scope that defines the range of IP addresses that the DHCP server allocates to the clients on one subnet. You need to create

one scope for each subnet that has clients that you want to manage using DHCP. The following table lists the information that you need to know before you add the DHCP server role, so that you can create the first scope. You need to collect the same information for each additional scope. Before adding a DHCP server Comments role Review DHCP security issues. Security issues might affect the way you deploy DHCP servers. For more information about DHCP security best practices, see Security information for DHCP . Identify the range of IP addresses that the DHCP server should allocate to the clients. Use the entire range of consecutive IP addresses that make up the local IP subnet. In many cases, a private address range is the best choice. For more information and a list of all the IP address ranges approved for use on private networks, see RFC 1918, "Address Allocation for Private Internets", at the Internet Engineering Task Force Web site . Web addresses can change, so you might be unable to connect to the Web site or sites mentioned here.

Determine the correct subnet When the DHCP server leases an IP address to a client, mask for the clients. the server can specify additional configuration information, including the subnet mask. Identify any IP addresses that For example, a server or a network-connected printer the DHCP server should not often has a static IP address, and the DHCP server must allocate to clients. not offer this IP address to clients. Decide the duration of the lease of the IP addresses. The default is eight days. In general, the duration of the lease should be equal to the average time that the clients on this subnet are active. For example, the ideal duration may be longer than eight days if the clients are desktop computers that are rarely turned off, or it may be shorter than eight days if the clients are mobile devices that frequently leave the network or are moved between subnets.

(Optional) Identify the IP When the DHCP server leases an IP address to a client, address of the router (default the server can specify additional configuration gateway) that the clients information, including the IP address of the router. should use to communicate with clients on other subnets. (Optional) Identify the name of the DNS domain of the When the DHCP server leases an IP address to a client, the server can specify additional configuration

Before adding a DHCP server Comments role clients. information, including the name of the DNS domain to which the clients belong.

(Optional) Identify the IP When the DHCP server leases an IP address to a client, address of the DNS server that the server can specify additional configuration the clients should use. information, including the IP address of the DNS server that the clients should contact to resolve the name of another computer. (Optional) Identify the IP address of the WINS server that the clients should use. Top of page When the DHCP server leases an IP address to a client, the server can specify additional configuration information, including the IP address of the WINS server that the clients should contact to resolve the NetBIOS name of another computer.

Configuring your DHCP server


To configure a DHCP server, start the Configure Your Server Wizard by doing either of the following: From Manage Your Server, click Add or remove a role. By default, Manage Your Server starts automatically when you log on. To open Manage Your Server, click Start, click Control Panel, double-click Administrative Tools, and then double-click Manage Your Server. To open the Configure Your Server Wizard, click Start, click Control Panel, doubleclick Administrative Tools, and then double-click Configure Your Server Wizard. On the Server Role page, click DHCP server, and then click Next. This section covers: Summary of Selections Using the New Scope Wizard Completing the Configure Your Server Wizard Removing the DHCP server role Top of page

Summary of Selections
On the Summary of Selections page, view and confirm the options that you have selected. If you selected DHCP Server on the previous page, the following appears: Install DHCP Server Run the New Scope Wizard to configure a new DHCP scope To apply the selections shown on the Summary of Selections page, click Next. After you click Next, the Configuring Components page of the Windows Components Wizard appears, and then closes automatically. You cannot click Back or Next on this page. Top of page

Using the New Scope Wizard


After you click Next, the Configure Your Server Wizard installs the DHCP Server service, and then starts the New Scope Wizard to collect information and add the DHCP server role. If you cancel the New Scope Wizard, the DHCP Server service remains installed, but it cannot distribute IP addresses to clients until you create a scope. If you choose to create a scope later, you can do so using the DHCP console. This section describes the following steps in the New Scope Wizard: Scope Name IP Address Range Add Exclusions Lease Duration Configure DHCP Options Router (Default Gateway) Domain Name and DNS Servers WINS Servers Activate Scope

Completing the New Scope Wizard Top of page

Scope Name
On the Scope Name page, in Name, type a name for the scope that you are creating. In Description, type a description (this is optional). Most networks have several subnets, and each subnet requires its own scope, so a DHCP server usually manages multiple scopes. Choose a name and description that help you distinguish between the various scopes. After you finish, click Next. Top of page

IP Address Range
On the IP Address Range page, define the range of IP addresses in this scope by typing the IP addresses at the start and the end of that range. The wizard uses the IP addresses that you type to determine the correct subnet mask. The correct subnet mask automatically appears in Subnet mask. In the unusual case where the clients on this subnet need to use a subnet mask other than the one that the wizard provides, you must type it in Subnet mask, or type the number of bits of the subnet mask in Length. After you finish, click Next. Top of page

Add Exclusions
On the Add Exclusions page, you can define the IP addresses that the DHCP server should not allocate to clients. For example, the DHCP server itself has a static IP address that must not be allocated to clients. The same is true of the default gateway and of various network devices, such as network-connected printers. You must exclude these IP addresses so that the DHCP server does not allocate them to clients. It is recommended that you exclude more IP addresses than you currently need because it is easier to truncate an exclusion range than it is to expand it. Exclude IP addresses from the beginning or the end of the range of possible IP addresses, not from the middle. For example, if the range of IP addresses on this subnet is from 10.0.0.1 to 10.0.0.255, and you want to exclude ten IP addresses, then define the exclusion range as either of the following:

10.0.0.1 to 10.0.0.10 10.0.0.245 to 10.0.0.255 For each range of IP addresses that you want to exclude, type the IP address at the beginning of the range in Start IP address, type the IP address at the end of the range in End IP address, and then click Add. This step eases client administration, but it is optional. If you leave all fields of this page blank and click Next, clients will still be able to obtain IP addresses from the DHCP server. After you finish, click Next. Top of page

Lease Duration
On the Lease Duration page, you can define how long a client can use an IP address from this scope. The DHCP server leases IP addresses to its clients. Each lease has an expiration date and time. The client must renew the lease if it is going to continue to use that IP address. The default duration of the lease is eight days. This step eases client administration, but it is optional. If you leave all fields of this page blank and click Next, clients will still be able to obtain IP addresses from the DHCP server. After you finish, click Next. Top of page

Configure DHCP Options


On the Configure DHCP Options page, you can specify whether to configure DHCP options. It is recommended that you accept the default, Yes, I want to configure these options now, and click Next, even if you do not want to configure the options. If you choose No, I will configure these options later, then the following occurs: The New Scope Wizard creates the scope but does not activate it, and you must use the

DHCP console to activate the scope in order for clients to receive IP addresses from this scope. For information about how to activate a scope using the DHCP console, see Activate a scope . You will not see the next four wizard pages described below. Continue reading at Completing the New Scope Wizard . Top of page

Router (Default Gateway)


On the Router (Default Gateway) page, you can specify the routers (also known as default gateways) that clients should use. You can add as many IP addresses as there are routers on this subnet. This step eases client administration, but it is optional. If you leave all fields of this page blank and click Next, clients will still be able to obtain IP addresses from the DHCP server. After you finish, click Next. Top of page

Domain Name and DNS Servers


On the Domain Name and DNS Servers page, you can specify the name of the domain that clients on this subnet should use when they resolve DNS names. You can also specify the DNS server that clients should use to resolve DNS names. You can type the IP address of that DNS server, or you can type its name and click Resolve, and the wizard will determine the IP address for you. You can add several DNS servers. This step eases client administration, but it is optional. If you leave all fields of this page blank and click Next, clients will still be able to obtain IP addresses from the DHCP server. After you finish, click Next. Top of page

WINS Servers
On the WINS Servers page, you can specify the WINS server that clients should communicate with to register and resolve NetBIOS names. You can type the IP address

of that WINS server, or you can type its name and click Resolve, and the wizard will determine the IP address for you. You can add several WINS servers. This step eases client administration, but it is optional. If you leave all fields of this page blank and click Next, clients will still be able to obtain IP addresses from the DHCP server. After you finish, click Next. Top of page

Activate Scope
On the Activate Scope page, you can activate the scope or choose to activate it later. In most cases, you should accept the default and activate the scope now. If you choose to activate the scope later, you can do so using the DHCP console. You must activate the scope to allow clients on the subnet of this scope to obtain IP addresses from the DHCP server. After you finish, click Next. Top of page

Completing the New Scope Wizard


On the Completing the New Scope Wizard page, you can click Back to change any of the settings. To apply your selections, click Finish. Top of page

Completing the Configure Your Server Wizard


After you complete the New Scope Wizard, the Configure Your Server Wizard displays the This Server is Now a DHCP Server page. To review all of the changes made to your server by the Configure Your Server Wizard or to ensure that a new role was installed successfully, click Configure Your Server log. The Configure Your Server Wizard log is located at systemroot\Debug\Configure Your Server.log. To close the Configure Your Server Wizard, click Finish. To verify that your server is secure and has the most recent updates, do the following: 1Run Windows Update. For more information, see Windows Update . .

2Run the Security Configuration Wizard. For more information, see Security . Configuration Wizard Overview . Top of page

Removing the DHCP server role


If you need to reconfigure your server for a different role, you can remove existing server roles. If you remove the DHCP server role, you must reconfigure clients to obtain IP addresses from another DHCP server. Also, if you want clients to continue using the IP addresses distributed by this server, you must configure another DHCP server to distribute those addresses. To remove the DHCP server role, restart the Configure Your Server Wizard by doing either of the following: From Manage Your Server, click Add or remove a role. By default, Manage Your Server starts automatically when you log on. To open Manage Your Server, click Start, click Control Panel, double-click Administrative Tools, and then double-click Manage Your Server. To open the Configure Your Server Wizard, click Start, click Control Panel, doubleclick Administrative Tools, and then double-click Configure Your Server Wizard. On the Server Role page, click DHCP server, and then click Next. On the Role Removal Confirmation page, review the items listed under Summary, select the Remove the DHCP server role check box, and then click Next. After you click Next, the Configuring Components page of the Windows Components Wizard appears, and then closes automatically. You cannot click Back or Next on this page. On the DHCP Server Role Removed page, click Finish. Top of page

Next steps: Completing additional tasks


After you complete the Configure Your Server Wizard, the computer is ready for use as a basic DHCP server that can manage IP addresses and related information. Up to this point, you have installed the DHCP Server service and created one scope that manages IP addresses and related information for the clients on one subnet. If you want to manage clients on other subnets, you must create additional scopes. If you have not activated the scope, then you must activate the scope to allow clients on the subnet of this scope to obtain IP addresses from the DHCP server.

When you complete the Configure Your Server Wizard, it automatically installs the DHCP console, which you use to manage your DHCP server. To open DHCP, click Start, click Settings, click Control Panel, double-click Administrative Tools, and then double-click DHCP. The following table lists some of the additional tasks that you might want to perform on your DHCP server. Task Activate existing scopes. Authorize the DHCP server in Active Directory. Add support for a routed network. Assign a server-based scope option. Purpose of task Reference

To activate scopes that you created with the Activate a scope New Scope Wizard that are not currently active. To detect unauthorized DHCP servers and prevent them from starting or running on your network. Authorizing DHCP servers

To enable the DHCP server to act as a relay Configure the agent, which forwards DHCP messages DHCP Relay Agent between subnets. To simplify administration by setting defaultAssign a servervalues that all new scopes will inherit. based option Change or view scope properties Create a new scope

Change or view scope To change or view the properties of an properties. existing scope. Create new scopes. Add a client reservation. Configure ports to allow remote administration. Top of page To create scopes that support clients on other subnets.

To define an IP address that the DHCP Add a client server should not allocate to a client because reservation another client is permanently using it. To manage the DHCP server from other computers on the network. Windows Firewall Settings

You might also like