The Internet is a worldwide, networked environment through which information can be exchanged by using a number of well-defined network protocols, such as TCP and UDP. Each host on the Internet can be identified by a single machine friendly number (for example, 184.108.40.206), which is mapped to a human-friendly fully qualified domain name (for example, www.paulwatters.com). This mapping is provided by a globally distributed database, known as the Domain Name Service (DNS), which allows local networks to statically assign IP address ranges to all their local hosts.
When DNS was first introduced, the exponential growth of networks and hosts connected to the Internet was not anticipated. This means that IP addresses allocations initially reserved for Class A, B, and C networks were rather generous in hindsight-many address ranges were not used to their full capacity. Nowadays, there is a critical shortage of available IP address space using the current IPv4 standard. Although the new IPv6 protocol (supported by Solaris 9) will provide many more potential addresses, organizations worldwide are seeking solutions to use their existing resources more efficiently. While IPv6 is currently being adopted by many organizations, widespread deployment is not anticipated in the near future.
As an alternative to static IP address allocation, a practical alternative IP address management strategy is to use the Dynamic Host Configuration Protocol (DHCP). This protocol allows a server to dynamically allocate IP addresses from a central DHCP server, to all configured DHCP clients on the local network. DHCP provides a mechanism by which computers using TCP/IP can obtain protocol configuration parameters automatically by using a lease mechanism, without having to rely on static addresses (which could be incorrect or outdated). This means that only hosts that are up will be taking an IP address from the pool of existing addresses assigned to a particular network, by requesting and accepting an IP address lease from the DHCP server. However, if a machine has been assigned an IP address, it is possible that the lease on that machine has still not expired. Thus, the machine is not up but still has an IP address. For a Class C network, the pool of available addresses is (at most) 254, excluding the broadcast address, which is insufficient for many growing organizations. In addition, if an organization changes ISPs, they ordinarily need to change the network configuration parameters for each client system, a manual and inefficient process that consumes the valuable time of network administrators.
DHCP is not the only protocol to lease out IP addresses in this way. Previously, Solaris clients used the Reverse Address Resolution Protocol (RARP) to obtain an IP address dynamically from a RARP server. This protocol is particularly important for diskless clients that cannot store their IP address locally. However, DHCP is better than RARP because it supports clients from Solaris, Linux, and Microsoft Windows, as well as being able to serve more parameters than just an IP address. In addition, RARP servers can only provide addresses to a single network, while DHCP is capable of serving multiple networks from a single server-provided that routing is correctly set up. On the other hand, Microsoft Windows administrators will be familiar with the Bootstrap Protocol (BOOTP), which provided IP addresses dynamically in the same way that DHCP does. In fact, DHCP can be considered a superset of BOOTP, and DHCP servers are generally backward compatible with BOOTP. The relationship between DHCP and BOOTP is historical: the BOOTP protocol is the foundation on which DHCP was built. Many similarities remain: the packet formats for DHCP and BOOTP are the same, although BOOTP packets are fixed length and DHCP packets are variable length. The DHCP packet length is negotiated between the client and the server.
Another advantage of DHCP over proprietary protocols is that it is an open network standard, developed through the Internet Engineering task Force (IETF). It is based on a client/server paradigm, in which the DHCP client (for example, a PC running Microsoft Windows), contacts a DHCP server (for example, a server running Solaris) for its network configuration parameters. The DHCP server is typically centrally located and is under the control of the network administrator. Since the server is secure, DHCP clients can obtain reliable information for dynamic configuration, with parameters that reflect up-to-date changes in the current network architecture. For example, if a client is moved to a new network, it must be assigned a new IP address for that new network. DHCP can be used to manage these assignments automatically. Readers interested in finding out more about how DHCP works can refer to RFC 2131. There is also a reference implementation of a DHCP server, a client, and a relay agent available from ISC (http://www.isc.org/). The ISC implementation uses a modular API, which is designed to work with both POSIX-compliant and non-POSIX-compliant operating systems. It also includes source code, making it useful for understanding how DHCP works behind the scenes.
In addition to dynamically allocating IP addresses, DHCP also serves other key network configuration parameters, such as the subnet mask, default router, and Domain Name System (DNS) server. Again, this goes beyond the capabilities of competing protocols like RARP. By deploying a DHCP server, network administrators can reduce repetitive client-based configuration of individual computers, often requiring the use of confusing operating system-specific setup applications. Instead, clients can obtain all their required network configuration parameters automatically, without manual intervention, from a centrally managed DHCP server.
Both commercial and freeware versions of DHCP clients and servers are available for all platforms. For example, Checkpoint's DHCP server can be integrated with its firewall product Firewall-1 to maximize the security potential of centralized network configuration management. Advanced network management protocols like the Simple Network Management Protocol (SNMP) are supported by DHCP. In addition, configuration change management issues like IP mobility and managing addresses for multiple subnets can all be handled from a single DHCP server. Implementation of DHCP should always be evaluated in the context of other network management protocols (like SNMP) and other directory services, like the Lightweight Directory Access Protocol (LDAP). Both LDAP and SNMP are crucial to the management of hosts and users in large and distributed networks. Since DHCP is responsible for the allocation of network configuration parameters, it is essential that SNMP agents obtain the correct information about hosts that they manage. In addition, LDAP servers need to be aware that host IP addresses will change over time.
This chapter will cover practical issues associated with installing DHCP servers and configuring DHCP clients on Windows, Linux, and Solaris systems. It is assumed that most readers will be familiar with the Domain Name Service and with TCP/IP stacks implemented on either Solaris, Linux, or Windows systems. Starting with a description of the DHCP protocol and its historical roots in the BOOTP protocol, the chapter aims to provide a reference for DHCP and practical installation and configuration procedures for heterogeneous environments.