


Abstract
This chapter explores DHCP, focusing primarily on Microsofts implementation. The chapter also describes and discusses some Unix and third-party DHCP packages and related issues.
Dynamic Host Configuration Protocol (DHCP) allows the dynamic leasing of IP addresses to those computers configured as DHCP clients. By using DHCP, you are freed from the burden of manually assigning IP addresses to most of your workstations.
The primary focus of this chapter is Microsofts implementation of DHCP. However, we also describe and discuss some Unix and third-party DHCP packages and related issues.
DHCP FUNDAMENTALS
In the following sections, we cover the fundamentals of DHCP configuring the server, configuring the client, how DHCP works, using DHCP over routers (DHCP/BOOTP), and maintaining DHCP. Later in the chapter we address more complex issues, such as planning DHCP configuration and integrating DHCP with Unix.
Configuring the Server
Server computers running Windows NT 4.0 and Windows 2000 Server are configured with a DHCP database when TCP/IP is installed. To enable a computer to act as a DHCP server, you must first install the DHCP service from the CD-ROM and then use DHCP Manager to add the server and configure the scope and options.
Special Note: A DHCP scope is used to provide IP addresses as well as other parameters, such as lease duration and subnetwork masks, to clients that participate in a subnetwork. All these clients must run the DHCP client software.
Several address ranges or scopes can be combined to create a superscope. A superscope may be useful in situations where you are combining two networks for example two departments into one network and want to pool the IP addresses. Combining scopes is described in greater detail in Superscopes later in this chapter.
|
Scopes
To configure a scope, you must first add a server to the Server List of the DHCP Manager. To get to the DHCP Manager, click Start, Administrative Tools, DHCP Manager. Then select Server, click Add from the main task bar, and type the host name or the IP address of the server.
Then, to configure the scope, select Scope, Create Scope from the DHCP Manager to bring up a dialog box similar to Figure 8.1.
For the IP Address Pool, add the range of addresses available for lease by the DHCP server in the Start Address and End Address boxes, and type the subnetwork mask of the network for Subnet Mask. Because many computers cant be DHCP clients for example, WINS servers and DHCP servers themselves must have their IP addresses added statically its important to add exclusion ranges that is, IP addresses not available for lease. You may add as many ranges and as many other specific addresses as necessary.
Its also important to note that if another DHCP server is on the same network, the scope of included addresses must not be the same on the two DHCP servers. Allowing different servers to assign the same addresses may lead to confusion because different clients could contact the servers at the same time and be issued duplicate IP addresses. Where a backup DHCP server is used on the same subnetwork, its best to set the included ranges on both servers, then specifically exclude the range of the other server on each.
By default, the lease duration is three days, but you can change this time to meet your network requirements. In general, the more volatile the network (that is, the more frequently changes occur), the shorter the lease should be. A short lease lets computers that are moved to new subnetworks quickly obtain new IP addresses from the appropriate DHCP server on the new subnetwork. If the number of IP addresses is large compared to the number of computers, a longer lease time can be tolerated. Dont select an unlimited lease time without a specific reason for doing so, because the IP address wont be released even if the computer associated with the address is taken off line.
To help select an appropriate lease time, determine how often you change your network (how often you move a network interface card (NIC) from one computer to another or how often you move a computer from one subnetwork to another). As a rule of thumb, assign a lease time that is half of that interval. For example, if you make such changes about once every ten working days, consider using a lease time of five days.
DHCP traffic is minimal under normal conditions. It typically takes less than a second to get the initial IP address and configuration information. When 50 percent of the lease period has expired, the client sends a request to renew the lease. If the DHCP server fails to respond, and if the lease time is too short lets say 30 minutes the potential for network traffic increases because of the short time between renewal requests.
Special Note: Almost all documentation warns against using an unlimited lease time. But the checkbox still beckons! Here are two situations in which you may want to use an unlimited lease.
You may have a subnetwork for highly-available servers (clusters) or data-acquisition devices, and may have created a scope for these machines. In this case, the objective in using a DHCP server is to propagate changes in DNS and WINS, default routes, and other configuration information easily. An unlimited lease in this case reduces any potential for communication problems as a result of DHCP delays.
Your organization may have always used static IP addresses and may prefer to reserve IP addresses for every network interface card (NIC). Some administrators dislike the of lack of control when addresses are assigned arbitrarily or, because of the complexity of their networks, prefer that every computer have a predetermined IP address. In this case, you may want to create scopes where an address is reserved for a specific NIC. Unlimited lease time may be the best option here. DHCP is still useful because TCP/IP configuration parameters, such as DNS server addresses and default gateways, can be changed easily across the network.
|
In one of our tests, we had 30 clients requesting an IP address every 30 minutes. When we added a number of network services to the server, including Network Monitor, we were able to create a situation where the DHCP server was consistently dropping packets. Traffic increased significantly because every 15 minutes clients were requesting lease renewal. When they received no response when 87.5 percent of the lease time had expired, these same clients broadcast four dhcpdiscover messages throughout the network.
Superscopes
In NT 4.0 and beyond, the DHCP Manager lets you create superscopes on DHCP servers. (To create a superscope, select the server from the DHCP Manager, then select Scopes, Superscopes). This feature makes it possible for several child scopes (address ranges) to be defined on one DHCP server and then be grouped under the umbrella of a superscope. Superscopes may be useful in the following situations:
- More computers must be added to a network and the total number of new network interfaces exceeds the capacity of the current scope.
- Several networks have been combined into one physical network for example, two departments, Marketing and Sales, are merged into one and you want to have IP addresses from both scopes available to all. Interestingly, there appears to be no way of keeping these two scopes separate with a single DHCP server. For example, Marketing and Sales (on the same subnetwork) cant arrange to draw IP addresses only from their own original scopes because the only option most clients have is to Obtain an IP address from a DHCP server; there is no provision for defining which DHCP server to use or which scope to use.
When you have a superscope defined, the client automatically attempts to renew or request a lease from any available DHCP server or scope. If it cant renew its current lease from within one child scope (within the superscope), it may try to obtain a lease from within another child scope. Some non-Microsoft DHCP servers have a user-class option that lets clients request an address from a specified DHCP server or within a specified scope, but this isnt the case with Microsoft DHCP.
DHCP Options
You can configure Microsoft DHCP to give a DHCP client more than an IP address. In fact, a DHCP server can give a DHCP client a total of 68 parameters. Using DHCP to assign these parameters can eliminate much of the repetitious administrative work of configuring the clients manually. These parameters are called DHCP options.
In Microsoft DHCP, you have three categories of options to choose from global, scope, or default.
- Global Option configurations pertain to all scopes on a DHCP server unless otherwise configured within the scope or configured manually from the client. Use Global options when most of the scopes will have the same parameters.
- Scope Option configurations pertain to only one scope on the DHCP server. Scope configuration overrides global configuration, but it is superceded by manual configuration. Use scope options for any scopes that have parameters that differ from the global options.
- Default In the absence of conflicting options (global, scope, or manual), the default options apply.
Within these categories, some options are available to Windows-based DHCP clients while others are available only to third-party clients that support these options. According to the Microsoft Windows NT Server Networking Guide (Microsoft Press,1996), the options available to Windows clients include
- DNS servers lists the IP addresses for DNS name servers.
- Domain name specifies the DNS domain name that the client should use for DNS resolution.
- Lease time provides the time of the lease in a read-only format. Lease time is configured in the Scope Properties dialog box shown in Figure 8.1. Lease time is the time from the address assignment until the address expires.
- NetBIOS scope ID specifies NetBIOS over TCP/IP (NBT) scope ID as a text string.
- Rebinding time shows the time from address assignment until the rebinding state in a read-only format. Rebinding occurs after the client updates its configuration values after a renewal state.
- Renewal time provides the renewal time in a read-only format. Renewal time is the time from address assignment until the client enters the renewal state. The renewal state starts at one half the time to live (time to live is the same as lease time).
- Router lists the IP addresses for routers on the subnetwork.
- Subnet Mask provides the subnetwork mask in a read-only format. The subnetwork mask is actually added in the Create Scope dialog box or Scope Properties dialog box, as shown in Figure 8.1.
- WINS/NBNS servers specifies IP addresses for WINS name servers.
- WINS/NBT node type assigns a node type to a client, where 1=B node, 2=P node, 4=M node, 8=H node.
According to the Microsoft Windows NT Server Networking Guide, the options available to Unix clients include
- Boot file size the size of the default boot image file.
- Bootfile name the file that is to be used as the bootfile.
- Merit dump file the file and directory where clients core image is dumped after a crash.
- NIS domain name the name of the Network Information Service domain as an ASCII string.
- NIS servers a list of IP addresses for NIS servers to be used by clients.
- NIS+Domain name the Network Information Service domain name.
- NIS+Servers Network Information Service server name.
- NTP servers a list of IP addresses for Network Time Protocol (NTP) servers available to clients.
- Root path ASCII path for the clients root disk.
- Swap server the IP address for a swap server for a client.
- X Window system display a list of IP addresses for X Window System Display Manager servers.
- X Window system font a list of IP addresses for X Window font servers.
Note that these lists arent all-inclusive. (Recall that you can set a total of 68 options in Microsoft DHCP Manager.) See the Microsoft Windows NT Server Networking Guide (version 4) for complete lists.
To set any of these options, open the DHCP Manager and select Options, Global (or Scope or Default, depending on how you want to assign the options) from the menu to bring up a dialog box similar to Figure 8.2.
In Figure 8.2, the Active options (the ones configured) are
- Router
- Name Servers
- DNS Servers
- Domain Name
- WINS/NBNS Servers
- WINS/NBT Node Type
To change the values of these options, select the option from the Active Options list, then click Value. Edit the value (where more than one value is possible, the Edit Array button appears), then return to the DHCP Manager screen.
In addition, you can set the options for clients with reserved IP addresses. To do so, open DHCP Manager, highlight the scope, then select Scope, Active Leases from the menu. Select the Reserved IP address for which you wish to set the option, then select Properties, Options to bring up a dialog box similar to Figure 8.3.
|
Tip: When you use non-Microsoft DHCP server products with NT clients, 312 bytes is the maximum space allocated for options. Even if the server can support options that take up more than 312 bytes, this information is truncated at the NT client. Normally, 312 bytes is more than adequate for most configurations. The only way to check the size of the option configurations is to check the size of the Options portion of the DHCP packet using a protocol analyzer. |
|
Page: 1, 2, 3, 4 |
next page  |
|
|
|
|