Installing and Implementing DHCP
The first question many managers ask when presented with a request to install Windows Server 2003 DHCP is this: "Can't we just use our existing DHCP?" The answer to this question is both yes and no. If you are maintaining a legacy domain and WINS network, Windows Server 2003 can receive DHCP information from any DHCP server with which Windows NT 4.0 or Windows 2000 Server works. However, if you want to take advantage of the features of Active Directory and possibly migrate away from the legacy WINS architecture, you need the Windows Server 2003 DHCP service.
The following sections discuss how to install and configure DHCP for a network.
Installing the DHCP Server Service
When you install Windows Server 2003, you can install DHCP as one of the optional services. To prepare for Exam 70-293, you need to know how to install DHCP on an existing server that does not already have DHCP installed.
Before you install DHCP, you must configure the server with a static IP address. When the DHCP server's network adapter is configured with a static IP address, you can install the DHCP service on the server. To install the DHCP service on your server, perform the steps described in Step by Step 3.1.
After you've installed the DHCP service, you need to begin configuring the DHCP server so that it can service network clients. Before you can begin the configuration process, you need to understand the types of DHCP scopes in Windows Server 2003.
Understanding DHCP Scopes
A scope is a range of IP addresses that are available for dynamic assignment to hosts on a given subnet. The scope for a particular subnet is determined by the network address of the broadcast DHCP request. In addition to address information, a scope can include a set of configuration parameters to be assigned to client computers when the address is assigned. This list of configuration parameters can include DNS servers, WINS servers, default gateways, the subnet mask, a NetBIOS scope ID, IP routing information, and WINS proxy information.
You should make the scope as large as you can. Later in the scope-creation process, you can exclude addresses and define reservations for particular addresses that exist within the scope.
Understanding DHCP Superscopes
The superscope type of scope was introduced to the Windows NT product family with Service Pack 2 for Windows NT 4.0. A superscope enables you to support a supernetted or multinetted network with a Windows Server 2003 DHCP server.
A supernetted network is a network that has multiple network addresses or subnets running on the same segment. This configuration is common in a network environment with more than 254 hosts on a subnet and in an environment in which certain hosts need to be isolated from the rest of the logical network for security or routing reasons. Superscopes support a local multinet or a multinet that is located across a router and configured to use the BOOTP forwarder service.
Understanding Multicasting and Multicast Scopes
Multicasting is the act of transmitting a message to a select group of recipients. This is in contrast to the concept of a broadcast, in which traffic is sent to every host on the network, or a unicast, in which the connection is a one-to-one relationship and there is only one recipient of the data.
Let's look at an example using an email message. If you send an email message to your manager, that email is a unicast message. If you send an email message to every user on the system, you have sent a broadcast. If you send an email message to a mailing list, you have sent a multicast message, which falls between a unicast message and a broadcast message. Teleconferencing and videoconferencing use the concept of multicasting, as does broadcast audio, in which the connection is from one source computer to a selected group of destination computers. At this time, only a few applications take advantage of multicasting, but with the growing popularity of multicast applications, we might see more multicast applications in the future.
The following are a few terms you need to understand before we discuss the Windows Server 2003 multicast capabilities:
- Multicast DHCP (MDHCP)—An extension to the DHCP standard that supports dynamic assignment and configuration of IP multicast addresses on TCP/IP–based networks.
- Multicast forwarding table—The table used by an IP router to forward IP multicast traffic. An entry in the IP multicast forwarding table consists of the multicast group address, the source IP address, a list of interfaces to which the traffic is forwarded (that is, the next-hop interfaces), and the single interface on which the traffic must be received to be forwarded (that is, the previous-hop interface).
- Multicast group—A group of member TCP/IP hosts configured to listen for and receive datagrams sent to a specified destination IP address. The destination address for the group is a shared IP address in the Class D address range (18.104.22.168 to 222.214.171.124).
- Multicast scope—A scope of IP multicast addresses in the range 126.96.36.199 to 188.8.131.52. Multicast addresses in this range can be prevented from propagating in either direction (send or receive) through the scope-based multicast boundaries.
Windows Server 2003 makes use of the concept of a multicast scope. The DHCP service has been extended to allow the assignment of multicast addresses in addition to unicast (single-computer) addresses. A proposed IETF standard (RFC 2730, "Multicast Address Dynamic Client Allocation Protocol [MADCAP]") defines multicast address allocation. MADCAP (also known as MDHCP in Microsoft lingo) would enable administrators to dynamically allocate multicast addresses to be assigned in the same fashion as unicast addresses. The Windows Server 2003 DHCP multicasting capability also supports dynamic membership, which allows individual computers to join or leave a multicast group at any time. This is similar to registering to receive an Internet broadcast or joining and leaving an email mailing list. Group membership is not limited by size, and computers are not restricted to membership in any single group.
How do client computers join and leave a multicast group? The answer is via MDHCP and the MDHCP application programming interface (API). Client computers using MDHCP must be configured to use the MDHCP API. MDHCP assists in simplifying and automating configuration of multicast groups on a network, but it is not required for the operation of multicast groups or for the DHCP service. Multicast scopes provide only address configuration and do not support or use other DHCP-assignable options. MDHCP address configuration for client computers should be done independently of how the client computers are configured to receive their primary IP addresses. Computers using either static or dynamic configuration through a DHCP server can also be MDHCP clients.
Now that you know the different types of scopes supported in Windows Server 2003, you can move forward to creating scopes on a DHCP server.
Creating a DHCP Scope
Now that you are familiar with the different types of scopes, you can create one. To create a standard DHCP scope, you perform the steps described in Step by Step 3.2.
Configuring Scope Properties
After you've created a scope, you might want to modify its properties. To modify a scope's properties, you perform the steps described in Step by Step 3.3.
Authorizing a DHCP Server in Active Directory
For security reasons, a new DHCP server must be authorized in Active Directory before it can assign IP addresses by an administrator with Enterprise Admin credentials. This prevents unauthorized DHCP servers from running on the network. One of the nastiest things a troublemaker can do is put up a rogue DHCP server and have it issue addresses that conflict with infrastructure devices' addresses. The nice thing about this feature is that if you are running Windows 2000 or better client computers and they are using Active Directory, the computers will not accept DHCP addresses from an unauthorized server. To authorize a DHCP server in Active Directory, you perform the steps described in Step by Step 3.4.
Windows Server 2003 and Windows 2000 Server DHCP servers that are not authorized do not provide DHCP services to network clients. These unauthorized servers also check every 5 minutes to see if their authorization status has changed, thus allowing them to begin servicing clients.
You have now installed, configured, and authorized a Windows Server 2003 DHCP server. We next examine configuring DHCP for DNS integration.
Configuring DHCP for DNS Integration
One of the keys to effectively implementing an Active Directory environment is the capability for Windows 2000 and Windows XP workstations using DHCP to be automatically registered in DNS. You can set the following settings for DNS integration (see Step by Step 3.5):
- Dynamically Update DNS A and PTR Records Only If Requested by the DHCP Clients—This is the default behavior of the Windows Server 2003 DHCP server. It causes the DHCP server to register and update client information with the authoritative DNS server of the zone in which the DHCP server is located, according to the DHCP client's request. The DHCP client can request the way in which the DHCP server performs updates of its host (A) and pointer (PTR) resource records. If possible, the DHCP server accommodates the client's request for handling updates to its name and IP address information in DNS. This selection requires you to select the Enable Dynamic DNS Updates According to the Settings Below option.
- Always Dynamically Update DNS A and PTR Records—When this option is selected, the DHCP server always updates the client's fully qualified domain name (FQDN), IP address, and both A and PTR resource records, regardless of whether the client has requested to perform its own updates. This selection requires you to select the Enable Dynamic DNS Updates According to the Settings Below.
- Discard A and PTR Records When Lease Is Deleted—This option, which is selected by default, instructs the DHCP server to cause the DNS server to delete the client's A and PTR records when the lease has expired or otherwise has been deleted. This selection requires you to select the Enable Dynamic DNS Updates According to the Settings Below option.
- Dynamically Update DNS A and PTR Records for DHCP Clients That Do Not Request Automatic Updates—This option allows legacy clients, such as Windows NT 4.0 and Windows 9x clients, to participate in DNS dynamic updates. This selection requires you to select the Enable Dynamic DNS Updates According to the Settings Below option.
Because the DHCP server controls DNS dynamic updating, you need to perform all the applicable DNS configuration from the DHCP console. The DHCP server automatically updates any DNS server configured as part of the server's TCP/IP network properties. It is important to be sure that the primary DNS server is configured as one of the DNS servers because any updates sent to it are propagated to the rest of the DNS servers for that domain. However, the DNS server in question must support DDNS. The Windows Server 2003 DNS server supports these updates, as do a number of other DNS servers.
To configure a DHCP server for DNS integration, you perform the steps described in Step by Step 3.5.
DHCP option code 81 is required to make dynamic updates work. Let's look at two examples that explain the basic dynamic update process.
The first example looks at a Windows 2000 Professional client computer that has requested a DHCP lease from a Windows Server 2003 DHCP server configured with the default options:
- During the DHCP lease-negotiation process, the Windows 2000 Professional client sends a DHCPREQUEST message. By default, the client includes DHCP option 81 in this message, informing the DHCP server that it is requesting that the DHCP server register its PTR record in DNS. The client is responsible for registering its A record on its own.
- The DHCP server replies with a DHCPACK message, granting the requested DHCP lease. This message includes DHCP option 81. With the default DHCP server settings, the DHCP server informs the client that it will register the PTR record and that the client is responsible for registering the A record in DNS.
- The client registers its A record, and the DHCP server registers the client's PTR record in DNS.
The second example looks at a Windows NT 4.0 Workstation client computer that has requested a DHCP lease from a Windows Server 2003 DHCP server configured with the default options:
- During the DHCP lease-negotiation process, the Windows NT 4.0 Workstation client sends a DHCPREQUEST message. DHCP option 81 is not included in this message.
- The server returns a DHCPACK message to the client, granting its DHCP lease request.
- The DHCP server updates the DNS server with the client's A and PTR records.
Configuring and Implementing a DHCP Relay Agent
Today most networks that use DHCP are routed. As discussed previously, DHCP messages are broadcast messages. By default, nearly all routers do not pass broadcast traffic, in the interest of reducing overall network traffic levels. Fortunately, you can get around this design limitation by configuring a DHCP relay agent to pass BOOTP messages across routers.
You can set up a DHCP relay agent in three basic configurations. The first involves entering the IP address or addresses of the DHCP server(s) into the router itself, instructing it to pass DHCP messages to a specified IP address for action. The second method involves using the Windows Server 2003 Routing and Remote Access Service (RRAS) component as a router (in place of a hardware-based router) and configuring the DHCP relay agent within it. The third solution, and the one that we examine in this section, uses a Windows Server 2003 computer located on a subnet without a DHCP server to act as a DHCP relay agent. This option requires RRAS components, but it does not involve creating or configuring a router, as the second solution would. What's important to understand is that the server providing the DHCP relay agent service does not have to be dedicated to that purpose; it could be a file server, a print server, or any other type of Windows Server 2003 (or Windows 2000 Server) server on that subnet. Figure 3.24 shows how this arrangement would look on a network.
Figure 3.24 The DHCP relay agent allows clients on the other side of a router to communicate with the DHCP server.
In Step by Step 3.6, you enable the DHCP relay agent on a Windows Server 2003 computer. This exercise assumes that you have not previously configured and enabled RRAS on the computer.
Configuring Security for DHCP
Although no administrative tasks outwardly appear to help secure your DHCP infrastructure, you can follow some best practices and take other actions to provide a more secure (and, thus, more reliable) DHCP implementation in your environment. We briefly examine them here:
- Use the 80/20, 70/30, or 50/50 address-allocation rule—By using one of these configurations, you can ensure that leases will still be made available to clients requesting them if a single server is under a DoS attack or otherwise becomes unavailable.
- Create and use DHCP server clusters—By enabling a DHCP server cluster, you remove a single server as a single point of failure (SPOF). By having two (or more) servers in a cluster acting as a single DHCP entity, a failure of a single server (or multiple servers, depending on your configuration) will not result in a failure to provide leases to clients.
Examine the DHCP audit logs regularly—Ensure that audit logging is enabled, as shown in Figure 3.33. The audit logs are stored in the location defined on the Advanced tab, which was shown in Figure 3.22. The location is %systemroot%\system32\dhcp\ by default.
Figure 3.33 DHCP audit logging is enabled from the General tab of the DHCP server Properties dialog box.
- Harden servers—You can get detailed information and assistance on hardening Windows Server 2003 servers from the "Windows Server 2003 Security Guide."