Overview of DHCP (Dynamic Host Configuration Protocol)
- DHCP Leases
- Clients lease IP addresses from a DHCP server.
- The client goes through four steps to obtain an IP address. To remember the four steps,
think of Aunt DORA:
- Discover
- Offer
- Request
- Acknowledgement
- The DHCP Lease Process
- DHCPDiscover: At initialization, the DHCP client broadcasts a DHCPDiscover message to
the local segment, and all DHCP servers on the segment respond. The client provides its
hostname, DHCP option codes, a message ID, and the hardware type of the clients NIC
(network Interface card).
- Offer: The DHCPOffer message is sent by the DHCP server, offering the client an IP
address from its pool of addresses.
- Request: The client issues a DHCPRequest to one DHCP server, and other offers are
rejected.
- ACK/NACK: The address is marked as leased by the DHCP server and can not be used by
another client during the active lease period.
- Lease Renewal
- The default lease period is eight days, which can be changed.
- The DHCP client must renew its lease. The DHCPOffer message includes not only the lease
period, but also a Renewal Time Interval (T1) and the Rebinding Time Value (T2).
D. Renewal and Rebinding Intervals
- The Renewal Time Interval (T1) represents 50% of the lease period.
- To renew its address, the DHCP client will broadcast a DHCPRequest message containing
its IP address.
- If the same DHCP server which issued the IP is not available, the client will continue
to use its lease for the remainder of the period.
- The rebinding time is 87.5% of the lease period. If the lease period is six days, then
the rebinding interval is 126 hours. At this time the DHCP client will attempt to rebind
its IP address if it was unable to renew the lease at the Renewal Time (T1).
- If the DHCP server which issued the original IP address does not respond to the request,
the client will begin the DHCPDiscover process, attempting to renew its IP address with
any DHCP server. If it cannot find a DHCP server to renew the IP address, TCP/IP services
are shut down on the client.
- Perform the steps in Exercise 4-2 on page 216: Installing the DHCP Server Service.
- DHCP Server Configuration
- DHCP Scopes
- A scope is a collection, or pool, of IP addresses. There can be only one scope for each
subnet, but a single DHCP server can manage several scopes.
- The DHCP server and DHCP client do not have to be on the same subnet.
- To access the DHCP server, a remote host (on a subnet other than the DHCP server) can
use RFC-compliant routers or DHCP relay agents.
- Each scope must contain at least the scope name, beginning and ending IP addresses,
lease duration, and subnet mask.
- DHCP Options
- Server options apply to all scopes configured on a single DHCP server.
- Server options on the Windows NT 4.0 DHCP server were known as global options.
- Examine Figure 4-1 on page 220 to see the WINS configuration option on the DHCP server
using the subnets given in the example on page 220.
- Scope Options
- Scope options allow you to specify DHCP options that apply to a single scope.
- Use Figure 4-2 on page 221 to see the Scope Options configuration box.
- Client Options
- You must create a reserved client to use client options. A reserved client is a DHCP
client that always receives the same IP address.
- Reserved clients allow you to assign functionally static IP addresses to computers that
require these, such as WINS and DNS servers.
- Use Figures 4-3 through 4-5 on pages 222-224 to see dialog boxes for creating a client
reservation.
- DHCP Options Order Precedence
- The DHCP Options order of precedence (from highest to lowest):
- Locally configured options (for manual configurations)
- Vendor/user class options
- Client options
- Scope options
- Server options
- Vendor-Specific Options
- Vendor-Specific Options allow hardware and software vendors to add their own options to
the DHCP server.
- Microsoft vendor-specific options include the following:
- Disable NetBIOS over TCP/IP (NetBT)
- Release DHCP lease on shutdown
- Default router metric base
- Proxy Autodiscovery
- Figure 4-6 on page 226 shows vendor class options
- User Class Options
DHCP clients identify their class membership to a DHCP server through user classes.
This process is the same as requesting vendor class options (see Figure 4-7 on page 227).
- Follow the steps on page 228 to create a new user class.
- BOOTP Tables
BOOTP (Bootstrap Protocol) is the predecessor of DHCP, which was developed to improve
on the host configuration services offered by BOOTP and to handle some of the problems
encountered in using it.
- Similarities between DHCP and BOOTP
- The messages used for request and reply are basically the same, using one 576-byte UDP
datagram for each.
- They use the same ports for communication between server and client.
- Differences between DHCP and BOOTP
- BOOTP normally allocates one IP address per client and reserves it permanently, while
DHCP leases addresses for a period of time dynamically, assigning the clients
address from a pool.
- Unlike BOOTP, DHCP was originally designed to configure addressing information for
computers with bootable hard drives.
- To renew the configuration with the server, the BOOTP client must restart. DHCP clients
can automatically renew their leases with their servers at preset intervals.
- Superscopes
- A Superscope is a Windows 2000 feature that allows you to use more than one scope for a
subnet. This is useful for fault tolerance.
- Through the use of superscopes the administrator gains the flexibility to support DHCP
clients in multinet configurations. Multinets are network configurations in which multiple
logical networks occupy the same physical segment.
- Perform Exercise 4-3 on page 236: Creating a New Scope.
- Perform Exercise 4-4 on page 238: Configuring Options.
III. DHCP Relay Agents in a Routed Environment
A. Using BOOTP Forwarding or DHCP Relay Agents
- Tip: use fewer DHCP servers and place these machines in central locations.
- Routers can be configured to pass DHCP/BOOTP messages selectively. This is called a
BOOTP Relay.
- DHCP relay agents can also be used in environments where non-BOOTP compliant routers
exist.
- Use the steps on page 241 to follow the exchange when an RFC-compliant router acts as a
relay agent via BOOTP Relay.
- Configuring the DHCP Relay Agent
- The RRAS (Routing and Remote Access Service) must be installed prior to configuring the
DHCP relay agent.
- Perform the steps given in Exercise 4-5 on page 245: Configuring a DHCP Relay Agent.
IV. Integrating DHCP with DDNS
- The Windows 2000 DHCP server can deliver host name and IP addressing information to a
Windows 2000 Dynamic DNS (DDNS) server, unlike Windows NT 4.0.
- Once the DHCP server assigns the DHCP client an IP address, the Windows 2000 DHCP server
and Windows 2000 Dynamic DNS server can interact in any of these ways:
- The DNS server will be updated so a Host (A) record and a PTR (Pointer) record can be
created.
- Regardless of the client request, the DHCP server will update both the Host (A) and the
Pointer (PTR) records.
- The DHCP server will never register information about the DHCP client, although the
client itself may directly update its information with the DDNS server. (See Figure 4-16
on page 247.)
- Change the default settings to prevent the client from registering directly with the
DDNS server. (See Figure 4-17 on page 248.)
- Integrating Downlevel DHCP Clients and Dynamic DNS
- Downlevel clients cannot communicate directly with a DDNS server. The Windows 2000 DHCP
server acts as a "proxy" that forwards both Host (A) and Pointer (PTR)
information to the DDNS server.
- An update to a clients entry in the DDNS server can be forced by issuing the
ipconfig /registerdns command.
- Perform Exercise 4-6 on page 249: Enabling a DHCP Server to Update Downlevel DHCP Client
Information.
- Integrating DHCP with RRAS
- RRAS (Routing and Remote Access Service), when initiated, allocates a group of IP
addresses from the DHCP server. It uses this pool of IP addresses to allocate to the RRAS
clients that connect.
- RRAS clients and the DHCP server do not directly interact. RRAS clients receive their
DHCP option information (WINS, DNS, Gateway, etc.) from the RRAS server, each port of
which can be specifically configured with this information.
- Any option information sent from a DHCP server to the RRAS server is ignored when the
RRAS server obtains its group of IP addresses.
- There is no effective lease period for the RRAS client, so once the connection is
terminated, the lease immediately expires.
- Perform Exercise 4-7 on page 251: Configuring RRAS to use DHCP to Assign IP Addresses.
Integrating DHCP with Active Directory
"Authorizing" is the process of approving DHCP servers that have not been
approved by the network administrator.
- Authorizing DHCP Servers
- A DHCP server that has not been approved by the IT department is called a rogue DHCP
server.
- A rogue server is likely to contain invalid scopes and DHCP options.
- Windows 2000 networks running only Windows 2000 DHCP servers can block rogue servers by
keeping a list of authorized DHCP servers in the Active Directory.
- Rogue DHCP Server Detection
- A DHCP server broadcasts a DHCPInform message to the local segment.
- The DHCPInform message sends queries to other DHCP servers.
- The DHCP server responds by sending a DHCPAck that includes Directory Services
Enterprise Root information.
- A query is placed to the Active Directory, which maintains a list of authorized DHCP
servers. If the machines IP address is on the list, it will successfully initialize
DHCP Server Services.
- Perform Exercise 4-8 on page 254: Authorizing a DHCP server in the Active Directory.
- DHCP and APIPA
- APIPA (Automatic Private IP Addressing) allows Windows 2000 computers which are DHCP
clients to assign their own IP addresses.
- APIPA is useful in the following two situations:.
- The first is described in Steps 1 to 4 on page 255, and occurs when the machine has not
previously bound an IP address.
- The second situation occurs when a DHCP client with an active lease starts up and cannot
contact a DHCP server. (See the second set of four steps at the bottom of page 255.)
- Perform Exercise 4-9 on page 256: Disabling Automatic Private IP Addressing.
Monitoring and Troubleshooting DHCP
Using Event Viewer
Using System Monitor
Using Logs
Perform Exercise 4-10 on page 259: Enabling DHCP Server Logging