Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol
The Microsoft Windows 2000 Server network operating system includes an enhanced implementation of Dynamic Host
Configuration Protocol (DHCP). This includes integration of DHCP with domain name system (DNS), enhanced
monitoring and statistical reporting for DHCP servers, new vendor-specific options and user-class support, multicast
address allocation, and rogue DHCP server detection. Also included is a discussion of Windows Clustering, a part of
Windows 2000 Advanced Server. DHCP for Windows 2000 is open and based on industry standards, supporting
Requests for Comments (RFCs) 2131 and 2132.
Introduction
The Microsoft® Windows® 2000 Server network operating system builds on the longstanding Microsoft support for
Dynamic Host Configuration Protocol (DHCP), an open, industry standard that reduces the complexity of administering
networks based on TCP/IP. Each host computer connected to a TCP/IP network must be assigned a unique IP address.
DHCP frees network administrators from having to configure all of the computers by hand.
TCP/IP is the global network protocol of choice, especially for corporate intranets adopting Internet technology.
However, configuring and administering TCP/IP network clients have traditionally been time-consuming and costly. This
is why Microsoft, as a member of the Internet Engineering Task Force (IETF), was an early advocate for having
dynamic IP addressing technology and worked closely with other IETF members to create the DHCP solution.
DHCP is open and standards-based, as defined by IETF Requests for Comments (RFCs) 2131 and 2132. DHCP can
automatically configure a host while it is booting on a TCP/IP network, as well as change settings while the host is
attached. This lets all available IP addresses be stored in a central database along with associated configuration
information, such as the subnet mask, gateways, and address of DNS servers.
DHCP makes life easier for network administrators, and the larger the network, the greater the benefit. Without
dynamic address assignment, clients have to be configured one by one. IP addresses must be managed to avoid
duplicate use. Changes must be applied to clients by hand. Configuration information is not centralized; and it is
difficult to get a view of all client configurations.
In contrast, DHCP provides benefits including the following:
• Windows Clustering for high availability (after IETF release of the server-to-server communications protocol).
• Windows Clustering.
• The DHCP server always registers the DHCP client for both the forward (A-type records) and reverse lookups (PTR-
type records) with DNS.
• The DHCP server never registers the name-to-address (A-type records) for DHCP clients.
• The DHCP server registers the DHCP client for both forward (A-type records) and reverse lookups (PTR-type
records) only when requested to by the client.
DHCP and static DNS service are not compatible for keeping name-to-address mapping information synchronized. This
may cause problems with using DHCP and DNS together on a network if older, static DNS servers are employed, which
are incapable of interacting dynamically when DHCP client configurations change.
To avoid failed DNS lookups for DHCP-registered clients where static DNS service is in effect, the following
workarounds may be performed:
• If WINS servers are used on a network, enable WINS lookup for DHCP clients that use NetBIOS.
Assign IP address reservations with an infinite lease duration for DHCP clients that use DNS only and do not
•
support NetBIOS.
Wherever possible, upgrade or replace older static DNS servers with DNS servers supporting dynamic DNS service.
•
Dynamic DNS service is supported by the Microsoft DNS server included in Windows 2000 Server.
• DHCP Servers
• DHCP Clients
• Subnet masks that are used to identify the IP network portion from the host portion of the IP address.
• Default gateways (routers), which are used to connect a single network segment to others.
Additional configuration parameters that can optionally be assigned to DHCP clients (such as IP addresses for DNS
•
or WINS servers a client may use).
One or more computers on a network must run Windows NT Server with the TCP/IP protocol and the DHCP server
installed to provide clients with dynamic IP addresses. After the DHCP server service is installed on a computer
running Windows NT Server, a Microsoft DHCP server database is automatically created once scopes are created and
activated.
DHCP Clients
Many low-cost industry standard platforms can act as DHCP clients, as defined with the updated RFC 2132
specification.
The four steps necessary for a DHCP client to acquire a lease from a DHCP server are initiated automatically when the
computer is first booted. The minimal client configuration that DHCP requires can be enabled quickly during client
setup and installation or by performing a brief manual resetting of client TCP/IP properties. Hosts running the following
Microsoft operating systems can act as DHCP clients:
• Windows 98
• Windows 95
• Windows for Workgroups version 3.11 (with the Microsoft 32-bit TCP/IP VxD installed)
• Microsoft Network Client version 3.0 for the Microsoft MS-DOS® operating system (with the real-mode TCP/IP
driver installed)
• LAN Manager version 2.2c
In addition to supplying configuration information through DHCP, Network Administrators may also override dynamic
settings with manual ones. Any information manually entered into a client's TCPIP configuration overrides dynamic
settings.
Figure 2: Three DHCP configurations showing the use of the DHCP BOOTP relay agent
See full-sized image.
BOOTP/DCHP Relay Agent
The BOOTP and DHCP Protocols rely on Network Broadcasts to perform their work. Routers in normal routed
environments do not automatically forward Broadcasts from one interface to another; therefore, a relay agent must be
used to pass along this communication. A DHCP relay agent is either a router or a host computer configured to listen
for DHCP/BOOTP broadcast messages and direct them to a specific DHCP Server(s). Using relay agents eliminates the
necessity of having a DHCP server on each physical network segment. Relay agents not only direct local DHCP client
requests to remote DHCP servers but also return remote DHCP server responses to the DHCP clients.
RFC 2131–compliant routers (supersedes RFC 1542) contain relay agents that allow them to forward DHCP packets.
Windows NT Server also comes with a DHCP Relay Agent that may be installed and configured as a service. Three
common designs are shown.
Managing DHCP
DHCP Manager helps network administrators configure and monitor DHCP servers. Network administrators may define
global and scope-specific configuration settings to identify routers and set DHCP client configurations.
The Microsoft DHCP server database is automatically created when Microsoft DHCP server is installed on a computer
running Windows NT Server and TCP/IP.
DHCP Scopes
A DHCP scope is an administrative grouping that identifies the full consecutive ranges of possible IP addresses for all
DHCP clients on a physical subnetwork. Scopes define a logical subnetwork for which DHCP services are to be offered,
and also allow the server to identify configuration parameters that are given to all DHCP clients on the subnetwork. A
scope must be defined before DHCP clients can use the DHCP server for dynamic TCP/IP configuration.
Address Pools
Once a DHCP scope is defined and exclusion ranges are applied, the remaining addresses form what is called an
available address pool within the scope. Pooled addresses may then be dynamically assigned to DHCP clients on the
network.
ExclusionRanges
An exclusion range is a limited sequence of IP addresses within a scope range that are to be excluded from DHCP
service offerings. Where exclusion ranges are used, they ensure that any addresses within the defined exclusion range
are not offered to clients of the DHCP server.
Reservations
Reservations allow permanent address lease assignment by the DHCP server. Where reservations are used, they
ensure that a specified hardware device on the subnetwork can always use the same IP address.
Superscopes
An administrative feature included within the Microsoft DHCP Manager tool can be used to create a number of distinct
scopes, which are grouped together into a single administrative entity called a superscope. Superscopes are useful for
solving several different DHCP service issues.
Leases
As noted, a lease is the length of time that that a DHCP server specifies that a client computer can use an assigned IP
address. When a lease is made to a client, it is described as active. At half-lease period, the client must renew its
address lease assignment with the server. The duration of leases affects how often clients attempt to renew those they
have been assigned with the DHCP server.
DHCP Options
DHCP Options are other client-configuration parameters that a DHCP server can assign when serving leases to DHCP
clients. For example, IP addresses for a router or default gateway, WINS servers, or DNS servers are commonly
provided for a single scope or globally for all scopes managed by the DHCP server. Many DHCP options are predefined
through RFC 2132, but the Microsoft DHCP server also allows defining and adding custom options.
Top of page
DHCP Deployment
DHCP has become such an important element of efficient network design that network administrators want to ensure
proper DHCP deployment. Basic considerations of DHCP deployment include:
• Using superscopes.
• Reserving IP addresses.
• BOOTP tables.
• A range of possible IP addresses from which to include or exclude addresses used in DHCP service lease offerings.
• Lease duration values to be assigned to DHCP clients that receive dynamically allocated IP addresses.
• Reservations.
• Options.
A DHCP scope consists of a pool of IP addresses on a subnetwork, such as 10.223.223.1 to 10.223.223.200, that the
DHCP server can lease to DHCP clients. Each physical network can have only one DHCP scope or a superscope with
one or more ranges of IP addresses.
To use several address ranges within a single scope or subnetwork for DHCP service, it is necessary to do the
following:
• Define the scope. Use the entire range of consecutive IP addresses that make up the local IP subnetwork for which
DHCP service is being enabled.
• Set exclusion ranges as needed. Exclusions should be set for any IP addresses within the scope that are not to be
offered or used for DHCP assignment by the DHCP server. For example, the first 10 addresses in the previous
example scope can be excluded by creating an exclusion for 10.223.223.1 to 10.223.223.10. Doing so specifies
that no DHCP clients ever receive these addresses for leased configuration. The only way an excluded IP address
range can be active on a network is if these addresses are manually configured for use on other devices that
cannot use DHCP.
• A defined scope can be further configured via the following additional tasks.
Select further exclusion ranges as needed. Choices can be made to further exclude any IP addresses not to be
•
leased to DHCP clients. Exclusions should be used for all devices that are not DHCP-capable, such as printers.
Create reservations as needed. A choice can be made to reserve some IP addresses for permanent lease
•
assignment to specified computers or devices on a network. Reservations should only be made for devices that are
DHCP-enabled and that must be reserved for special reasons on the network, such as special server computers
(servers used for DHCP, WINS, or DNS) and routers.
Adjust the duration of leases. The lease duration to be used when assigning IP address leases can be modified. The
•
default lease duration is three days. In most cases, the default value is acceptable, and no further adjustment is
needed, although this setting can be modified.
• Define options.
After a scope has been defined and fully configured, as outlined above, it must then be activated before dynamic
service begins for DHCP-enabled clients. Once a scope is active, the server can begin processing IP lease requests and
offering IP leases to DHCP-enabled clients on the network.
Using Superscopes
The superscope feature described earlier is useful for solving several different DHCP service issues. Superscopes let
Microsoft DHCP servers:
• Support DHCP clients on a single physical network segment having multiple logical IP subnets, often called
multinets.
• Support remote DHCP clients located on the far side of BOOTP/DHCP relay agents (where the network on the far
side of the agent uses multinets).
On Windows NT 4.0 Service Pack 2 and later, the DHCP server versions may assign addresses from more than one
scope to a physical subnet.
Situations for which superscopes are useful include the following:
• Two DHCP servers are used to manage separate logical subnets on the same physical subnet.
The following table, Figure 2, shows two DHCP servers that are both reachable on the same physical subnet and
configured with a single scope.
• Nothing prevents a client from having its attempt to renew a previous address rejected each time it connects to the
network.
• In the process of rejecting and re-obtaining an address lease, the client may be offered an address that places it on
a different subnet from the one for which it was previously configured.
Using superscopes on both DHCP servers avoids both of these problems and allows addresses be managed more
predictably and effectively.
Superscopes can be used to avoid such problems by taking the following steps:
1. Create a new scope on a server that contains the respective scope information for the other. For example, on
DHCP-Server A, create a new scope with the range of 222.222.222.1 to 222.222.222.255. Be sure to also create
an exclusion range for the new scope for all scope addresses (222.222.222.1 to 222.222.222.255).
2. Repeat the previous step for the other DHCP server. For example, on DHCP-Server B, create a new scope with the
range of 211.111.111.1 to 211.111.111.255, as well as an exclusion range for this new scope for all scope
addresses (211.111.111.1 to 211.111.111.255).
3. Create a superscope on each DHCP server by using the Add Superscope wizard. Add both the old and the new
scopes to the superscopes thus created.
4. Activate the new scopes on each server.
By configuring superscopes as described, DHCP-Servers A and B each recognize IP addresses assigned by the other.
This prevents either server from negatively acknowledging attempts by DHCP clients to renew their same IP address
or to obtain an address from the same logical range of addresses, in other words, a different address within the same
logical subnet. Before a superscope can be created, DHCP Manager must be used to define all scopes to be included in
the superscope. (Guidance on creating superscopes is provided in DHCP Manager online Help.)
Reserving IP Addresses
DHCP Manager allows the reservation of a specific IP address for a computer or other IP addressable device on the
network. Reserving selected IP addresses for special-function devices on the network ensures that DHCP does not
duplicate or reassign the address. Reservations can be useful for the following types of devices and computers:
• Other Windows NT Server–based computers on the network that require static IP addresses, such as WINS servers.
• UNIX, or other, clients that use IP addresses assigned by another TCP/IP configuration method.
BOOTP Tables
As noted, the Bootstrap protocol lets diskless clients obtain their own IP addresses and other boot information needed
for network startup. BOOTP preceded DHCP and is now used mainly in UNIX environments. For this reason, many
Windows NT-based installations do not need BOOTP, so the BOOTP table need not be configured.
BOOTP lets diskless clients use User Datagram Protocol (UDP) packets to request and retrieve an IP address and a
small boot image file from a Trivial File Transfer Protocol (TFTP) server.
The Microsoft DHCP server offers BOOTP support in the form of pointer records contained in the BOOTP table. Data
stored there is returned to any BOOTP clients on the network that broadcast a BOOTP request message. If a BOOTP
record exists in the BOOTP table, the Microsoft DHCP server returns a BOOTP message to the requesting BOOTP client,
and if no BOOTP records are configured, the Microsoft DHCP server silently ignores BOOTP request messages.
The reply message returned by the Microsoft DHCP server indicates the name and location of a TFTP server on the
network that the client can then contact to retrieve its boot image file. Each record in the BOOTP table contains the
following three fields, which contain the information returned to the BOOTP client:
The Boot Image identifies the generic file name of the boot file requested, based on the BOOTP client's computer
•
type.
• The File Name identifies the full path of the boot file returned by TFTP by the BOOTP server to the client.
• The File Server identifies the TFTP server used to source the boot file.
The DHCP Manager can add, remove, and edit records in the BOOTP table.
Unlike DHCP, BOOTP does not permit dynamic address leases, so BOOTP clients assume any IP address granted to
them to be permanent. This resembles address management for reserved DHCP clients. Where BOOTP is used, the
range of IP addresses that are reserved for BOOTP service on a network must be excluded from any DHCP scopes that
are set up and configured. If the BOOTP client does not request options, none are provided, possibly rendering the
BOOTP client inoperative because it did not receive a default gateway or a DNS server.
Top of page
Best Practices
Certain practices that optimize the functionality and performance of the Microsoft DHCP server are described below.
Upgrading Routers
Where routers connect multiple physical networks, it is useful to configure them to relay BOOTP/DHCP messages if
possible. Many routers employ vendor-specific router commands or configurable router settings to enable
BOOTP/DHCP relay, such as the IP HELPER command used in some Cisco routers. If a router does not support
BOOTP/DHCP relay, a router upgrade from the vendor might. DHCP and BOOTP message traffic may be relayed on the
same router because they have a common message format.
If a router upgrade is not possible, an additional Windows NT-based platform can be configured to serve as a DHCP
relay agent for its network segment. This computer then relays traffic between DHCP-enabled clients on the local
physical network and a remote DHCP server located on another physical network.
• Which computers are immediately configurable as DHCP clients for dynamic TCP/IP configuration and which must
be manually configured with static TCP/IP configuration parameters, such as static IP addresses.
• The DHCP option types and their values to be predefined for DHCP clients.
Fault-Tolerant Planning
It is a good idea to split a scope between two or three servers. In this way, one can handle DHCP traffic flood more
easily. In addition, if a server goes down, the network is not affected. . A 70/30 split seems to offer the optimum
benefit.
For example, consider a Class B scope 132.255.0.0 with address range from 132.255.0.1-132.255.255.255 and subnet
mask 255.255.0.0. One setup would be to distribute the load between two servers (SRV1 and SRV2). SRV1 has a
scope of 132.255.0.1-132.255.255.255 with a mask of 255.255.0.0. The exclusion range for this scope is
132.255.128.0-132.255.255.255. SRV2 has a scope of 132.255.0.1-132.255.255.255 with a mask of 255.255.0.0.
The exclusion range for this scope is 132.255.0.1-132.127.255.255. A scope can also be divided between three
servers in a similar way.
Figure 4: This network design causes eight packets to be sent to the DHCP server for every packet sent from the
client
See full-sized image.
Figure 5: This network design eliminates duplicate packets, while providing enough fault-tolerant redundancy
that any single part of the network can fail and clients still get leases
See full-sized image.
Top of page
Future
Looking into the future, Microsoft DHCP is designing Dynamic BOOTP, authenticated DHCP, and DHCP version 6.
Top of page
Summary
As the world of networking continues to converge on the TCP/IP protocols, Dynamic Host Configure Protocol becomes
an ever more important element in efficient network design.
DHCP provides safe and reliable TCP/IP network configuration. DHCP service also helps prevent IP address conflicts
and conserves the use of IP addresses through centralized management of address allocation. In contrast to manual
configuration, where each client computer must have its IP address information individually set before it can join the
network, DHCP offers a form of instant access for supported clients that use DHCP.
The Microsoft DHCP server for Windows 2000 builds on a long history of support for DHCP and adherence to open
industry standards, while introducing features that make DHCP easier to deploy and manage. Network managers
benefit from the integration of DHCP with the domain name system (DNS), enhanced monitoring and statistical
reporting for DHCP servers, new vendor-specific options and user-class support, multicast address allocation,
unauthorized DHCP server detection, and plans for Windows Clustering.
The Microsoft DHCP server combines with the Windows NT operating system and other Windows NT services to give
network administrators the tools that they need to deploy robust, high-performance, scalable, and easily configurable
networks.
Top of page
Appendix A: Predefined Options for DHCP CLients
The tables in this section describe the predefined options available for configuring DHCP clients. These options are
defined in RFC 1533. Options listed in bold are options that Microsoft DHCP clients receive by default.
Basic Options
Code Option name Meaning
1 Subnet Mask
2 Time offset Specifies the Universal Coordinated Time (UCT) offset in seconds.
4 Time server Specifies a list of IP addresses for time servers available to the client.¹
5 Name servers Specifies a list of IP addresses for name servers available to the client.¹
6 DNS servers Specifies a list of IP addresses for DNS name servers available
to the client.¹
7 Log servers Specifies a list of IP addresses for MIT_LCS User Datagram Protocol
(UDP) log servers available to the client.¹
8 Cookie servers Specifies a list of IP addresses for RFC 865 cookie servers available to
the client.¹
9 LPR servers Specifies a list of IP addresses for RFC 1179 line-printer servers
available to the client.¹
10 Impress servers Specifies a list of IP addresses for Imagen Impress servers available to
the client.¹
11 Resource location Specifies a list of RFC 887 Resource Location servers available to the
servers client.¹
12 Host name Specifies the host name of up to 63 characters for the client. The name
must start with a letter, end with a letter or digit, and have as interior
characters only letters, numbers, and hyphens. The name can be
qualified with the local DNS domain name.
13 Boot file size Specifies the size of the default boot image file for the client, in 512-
octet blocks.
14 Merit dump file Specifies the ASCII path name of a file where the client's core image is
dumped if a crash occurs.
15 Domain name Specifies the DNS domain name that the client should use for
DNS host name resolution.
17 Root path Specifies the ASCII path for the client's root disk.
20 Nonlocal source routing Enables or disables forwarding of datagrams with nonlocal source
routes. 1 enables forwarding; 0 disables it.
21 Policy filter masks Specifies policy filters that consist of a list of pairs of IP addresses
and masks specifying destination/mask pairs for filtering nonlocal
source routes. Any source routed datagram whose next-hop
address does not match a filter is discarded by the client.
22 Max DG reassembly size Specifies the maximum size datagram that the client can
reassemble. The minimum value is 576.
23 Default time-to-live Specifies the default time-to-live (TTL) that the client uses on
outgoing datagrams. The value for the octet is a number between
1 and 255.
24 Path MTU aging time-out Specifies the time-out in seconds for aging Path Maximum
Transmission Unit (MTU) values (discovered by the mechanism
defined in RFC 1191).
25 Path MTU plateau table Specifies a table of MTU sizes to use when performing Path MTU
Discovered as defined in RFC 1191. The table is sorted by size
from smallest to largest. The minimum MTU value is 68.
The following table lists IP parameters on a per-interface basis. These options affect the operation of the IP layer on a
per-interface basis. A client can issue multiple requests, one per interface, to configure interfaces with their specific
parameters.IP Parameters per Interface
26 MTU option Specifies the MTU discovery size for this interface. The minimum
MTU value is 68.
27 All subnets are local Specifies whether the client assumes that all subnets of the
client's internetwork use the same MTU as the local subnet where
the client is connected. 1 indicates that all subnets share the
same MTU; 0 indicates that the client should assume some
subnets may have smaller MTUs.
28 Broadcast address Specifies the broadcast address used on the client's subnet.
29 Perform mask discovery Specifies whether the client should use Internet Control Message
Protocol (ICMP) for subnet mask discovery. 1 indicates that the
client should perform mask discovery; 0 indicates that the client
should not.
30 Mask supplier Specifies whether the client should respond to subnet mask
requests using ICMP. 1 indicates that the client should respond; 0
indicates that the client should not respond.
31 Perform router discovery Specifies whether the client should solicit routers using the router
discovery method in RFC 1256. 1 indicates that the client should
perform router discovery; 0 indicates that the client should not
use it.
Code Option name Meaning
32 Router solicitation address Specifies the IP address to which the client submits router
solicitation requests.
33 Static route Specifies a list of IP address pairs that indicate the static routes
the client should install in its routing cache. Any multiple routes to
the same destination are listed in descending order or priority. The
routes are destination/router address pairs. (The default route of
0.0.0.0 is an illegal destination for a static route.)
The following table lists link layer parameters per interface. These options affect the operation of the data link layer on
a per-interface basis.
Link Layer Parameters per Interface
34 Trailer encapsulation Specifies whether the client should negotiate use of trailers (RFC
983) when using the ARP protocol. 1 indicates that the client
should attempt to use trailer; 0 indicates that the client should not
use trailers.
35 ARP cache time-out Specifies the time-out in seconds for ARP cache entries.
36 Ethernet encapsulation Specifies whether the client should use Ethernet version 2 (RFC
894) or IEEE 802.3 (RFC 1042) encapsulation if the interface is
Ethernet: 1 indicates that the client should use RFC 1042
encapsulation; 0 indicates that the client should use RFC 894
encapsulation.
The following table shows TCP parameters. These options affect the operation of the TCP layer on a per-interface
basis.
TCP Parameters
37 Default time-to-live Specifies the default TTL the client should use when sending TCP
segments. The minimum value of the octet is 1.
38 Keep-alive interval Specifies the interval in seconds the client TCP should wait before
sending a keep-alive message on a TCP connection: 0 indicates
that the client should not send keep-alive messages on
connections unless specifically requested by an application.
39 Keep-alive garbage Specifies whether the client should send TCP keep-alive messages
with an octet of garbage data for compatibility with older
implementations: 1 indicates that a garbage octet should be sent;
0 indicates that it should not be sent.
The following table shows application layer parameters. These miscellaneous options are used to configure applications
and services.
Application Layer Parameters
40 NIS domain name Specifies the name of the Network Information Service (NIS) domain
as an ASCII string.
41 NIS servers Specifies a list of IP addresses for NIS servers available to the client.¹
Code Option name Meaning
42 NTP servers Specifies a list of IP addresses for Network Time Protocol (NTP)
servers available to the client.¹
¹ List is specified in order of preference.
The following options are for vendor-specific information.
43 Vendor-specific info Binary information used by clients and servers to exchange vendor-
specific information. Servers not equipped to interpret the information
ignore it. Clients that do not receive the information attempt to
operate without it.
NetBIOS over TCP/IP
45 NetBIOS over TCP/IP NBDD Specifies a list of IP addresses for NetBIOS datagram distribution
servers (NBDD).¹
47 NetBIOS scope ID Specifies a string that is the NetBIOS over TCP/IP Scope ID
for the client, as specified in RFC 1001/1002.
48 X Window system font Specifies a list of IP addresses for X Window font servers available
to the client.¹
49 X Window system display Specifies a list of IP addresses for X Window System Display
Manager servers available to the client.¹
¹ List is specified in order of preference.
DHCP Extensions
58 Renewal (T1) time value Specifies the time, in seconds, from address assignment until the
client enters the renewing state.
• 256 MB of RAM
11:00 0
12:00 61740
13:00 123420
14:00 185460
15:00 247320
16:00 308100
17:00 370020
18:00 431580
19:00 493020
20:00 554640
21:00 615960
22:00 677100
23:00 737340
Total number of scopes Average leases per minute issued by the server for 10,000
renewals, new leases.
2 960
100 960
1000 960
10000 960
20000 960
0399