| [library/resources_menu.htm]
|
Figure 2 shows the messages exchanged during the four basic DHCP operational phases. Like most TCP/IP applications, DHCP uses a client-server model and the client initiates the activity. Although not shown here, all DHCP messages are transported in User Datagram Protocol (UDP) datagrams; client-to-server messages are sent to UDP port 67 (DHCP server) at the server and server-to-client messages are sent to UDP port 68 (DHCP client) at the client. The Initialization phase occurs when a client first requests an IP address:
The DHCP client maintains two timers, called T1 (the address renewal timer) and T2 (the server rebinding timer). By default, T1 is set to 50% of the lease period and T2 is set to 87.5% of the lease period. Both timer values may be set to another value by the host when the address is assigned (although T1 must be less than T2). When the T1 timer expires, the client enters the Renewal phase and tries to renew its address lease:
As long as the server renews the address lease within the T1 period, the T2 timer will never expire. If T2 does expire, the client enters the Rebind phase and tries to find any other server that will renew the address:
At some point, the client is ready to relinquish the address and disconnect from the network. If the client supports Graceful Shutdown, it will send a DHCPRELEASE to the server, giving up the claim on its address. This description, while providing the basic operation of the DHCP protocol, is purposefully brief and leaves out many of the details. It should also be noted that DHCP is an insecure protocol since it is difficult to securely protect the systems that DHCP is intended to serve. Additionally, a nefarious user can easily setup an unauthorized DHCP server which can then send disruptive information to clients, such as incorrect or duplicate IP addresses, and incorrect gateway or name server addresses. For that matter, a malicious DHCP client could claim all of the available addresses for itself, denying those addresses for other users. For these and other reasons, DHCP use across a firewall should be implemented only where absolutely necessary. Installing and Managing DHCP on a Windows NT ServerInstalling the DHCP Server service on a Windows NT Server is relatively simple. The DHCP service can be installed by anyone logged in as a member of the Administrators group by clicking on the Network icon in the Control Panel, choosing the Services tab, selecting Microsoft DHCP server, and then clicking Add.
The DHCP service is administered using the DHCP Manager (located in the Administrative Tools group on the server system). The DHCP Manager can be used only to manage Windows NT-based DHCP servers within a Windows NT domain (Figure 3). Selections under the Server pulldown menu allow the manager to add or remove DHCP servers to be managed, or to display the properties of a particular server.
The first order of business after installing the DHCP Server service is to define one or more scopes. A scope is a range of IP addresses that the server can assign to client systems. Creation, deletion, configuration, and activation/deactivation of individual scopes is accomplished via the Scope pulldown menu in the DHCP Manager. When a scope is created, a dialog box such as the one in Figure 4 will appear. The information to be supplied here is rather straight forward:
Once the scope has been defined, it must be activated before it can be used by the DHCP service. A scope can be activated when created or via the DHCP Manager. When selecting the range of addresses in the assignment pool, do not include addresses for the router (gateway); DHCP, Web, FTP, e-mail, DNS, SNMP, and other servers; SNMP-managed devices; printers; and other devices where addresses are statically assigned and managed. Addresses for these devices should be excluded from the DHCP address pool. Finally, determining the lease duration may be the hardest task for the DHCP administrator. A number of factors have to be considered in determining the best lease times, including the number of available IP addresses versus the number of potential clients, as well as the frequency of DHCP option and network changes, and the frequency of client additions and removals from the network. If leases are too short, traffic on the network increases and additional time is spent exchanging DHCP renewal messages; if leases are too long (and clients do not employ graceful shutdown), addresses may stay allocated even though the client is no longer on the system. It is a good idea, however, never to assign an infinite-time lease; although that might sound like a way to permanently assign an IP address, it can actually cause problems over time as the client and server go up and down. Administrators need to understand their network environment and the patterns of usage to best choose a lease duration, and lease durations can vary from as short as a few hours or days (e.g., for a very dynamic network with frequent changes) to several months (e.g., for a relatively stable network). The most efficient address assignments, of course, are when the clients relinquish addresses when they disconnect from the network. The Scope pulldown menu is also used by a network manager to examine the currently active leases within a scope and to reserve a specific address for a specific host. As mentioned above, DHCP can be used to do much more than assign addresses, although that is the most common purpose and addresses are typically the scarcest resource associated with DHCP. The NT version of the DHCP server can, in fact, be used to assign nearly 50 different network settings, such as the ones shown in the figure:
The DHCP Options pulldown menu manages the assignment of DHCP optional network settings; global settings are assigned to all scopes managed by a particular server (denoted by the globe icon) and scope options are limited to a single scope. The complete list of DHCP options supported by the Windows NT DHCP Service will be found here, as well. As an aside, the number preceding the setting name (such as the "003" before "Router") refers to the DHCP option identifier. A complete list of DHCP options per the Internet Engineering Task Force (IETF) can be found on the Internet at http://www.isi.edu/in-notes/iana/assignments/bootp-dhcp-parameters. (Table 1 below lists all of the DHCP options supported in the Windows NT DHCP Service). DHCP Client-Server Environments There are four basic network topologies that exemplify DHCP network scenarios. The simplest, and most common, scheme is to employ a single DHCP server to assign addresses and other parameters to clients that are all on a single network segment. In this scenario, the server receives and responds to all requests. One potential problem with this single-server model is that clients cannot access the information if the server is down, and the network can grow unstable if the server's downtime is lengthy. A common work-around, then, is to employ two DHCP servers on the network segment to provide redundancy. While this obviates the problem of an unavailable DHCP server, it potentially adds another problem; namely, the two servers will have to control two disjoint address scopes. The reason for this is that DHCP servers, even on the same network, do not communicate with each other. Therefore, if the scopes overlap, it is quite possible that the same address will be assigned to two different clients. (The IETF DHCP Working Group and a number of vendors, however, are currently working on a specification to store configuration information in a common directory that can be accessed by multiple DHCP servers. This would mean that multiple servers could provide true redundancy over a single address pool.)
In those networks with multiple LAN segments connected via a router, the DHCP service can be handled in a couple of ways; namely a single server for all segments or a server on each segment. Using a single DHCP server to support clients across multiple networks connected by a router is quite common and an example of this scenario is shown in Figure 5:
The DHCP server system (at 192.168.88.5) can be set up as described above. In this example, two different scopes will be defined:
Remote subnet (192.168.99.50-192.168.99.75) This means that addresses in the range 192.168.88.16-192.168.88.100 may be assigned to a client on the 192.168.88.0 segment and clients on the 192.168.99.0 segment can be allocated addresses in the range 192.168.99.50-192.168.99.75. It is easy enough to see how the DHCP server assigns addresses correctly to clients on the 192.168.88.0 segment, but it is worth a more detailed look at how the server correctly assigns addresses to clients on the 192.168.99.0 side of the router. When a client on the 192.168.99.0 network broadcasts a DHCP message, it must be passed to the other subnet to be seen by the server. This is accomplished by using proxy DHCP, software which must be implemented at the router. If the router supports proxy DHCP, the router will accept DHCP messages and forward them to the server. In the Cisco environment, for example, a DHCP proxy capability could be enabled and a DHCP server identified for this example using one of the following router commands:
set dhcp relay 192.168.88.5 (Cisco 2500 IOS after V11.0) When a request comes to the DHCP server that can assign addresses on multiple subnets, the server must determine which address pool to use. This is accomplished simply by determining which scope matches the requester. In particular, if the request was passed along by a DHCP relay agent, the request will include relay agent's IP address. Since a router will always have at least two addresses, it is important that the relay agent advertise the address of the subnet where the DHCP request originated; in this example, the router will advertise its 192.168.99.1 address. Given this information, the operation of the DHCP server is straight forward:
The final topology scenario -- using multiple servers across the multiple segments -- is just a more general case of the scenarios above. But be careful! The address scopes still should not overlap. In addition, if DHCP relays are employed (for example, if you use two servers in a three-segment network), be sure that your clients carefully select the most appropriate server (via the router, of course). Conclusion DHCP is not appropriate nor necessary for all user sites or for all situations. But it is an important tool for the network administrator, particularly if IP address space is at a premium, and the Windows NT implementation works well. Most good network management books discuss DHCP in more detail, including those on Windows NT Server. In addition, DHCP: A Guide to Dynamic TCP/IP Network Configuration by Berry Kercheval (Prentice Hall) is a good detailed reference on this subject. SIDEBAR: Other Address Conservation SchemesThere are actually a number of methods that have been introduced in the last few years to more cleverly use the available IP address space. Classless Interdomain Routing (CIDR), for example, was designed to aggregate IP addresses and decrease the size of routing tables, but also allows a network to be assigned a sub-Class C address, or just a portion of a Class C address space. This capability, employed by most Internet service providers (ISPs) and address registrars (at least in North America), means that several very small networks can share a single Class C address. Network Address Translation (NAT) and Port Address Translation (PAT) are two other schemes supported by some routers which will extend the life of the IP address space by hiding the addresses actually used on the internal addresses from those addresses advertised and accessible from the Internet. CIDR, however, is much more applicable to large networks, ISPs, and the Internet backbone than to individual user nets. NAT and PAT, while supported on many routers, is not yet in widespread use. DHCP, on the other hand, is well-known, well-understood, easy to use, and widely available in most server operating systems. IP version 6 (IPv6), of course, obviates the address exhaustion problem by employing 128-bit addresses -- a large enough space to address every molecule in the solar system! But schemes such as CIDR, NAT, PAT, and DHCP are actually extending the life of the current version of IP (IPv4) because of their address handling capabilities.
About The Authors: Gary C. Kessler is the Director of Information Technology at Hill Associates (http://www.hill.com), a telecommunication training and consulting firm with headquarters in Colchester, VT. Carol A. Monaghan is the Network Administrator at Hill Associates. Their e-mail addresses are kumquat@hill.com and c.monaghan@hill.com, respectively. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||