TCP/IP and Data Communications Administration Guide

Chapter 15 Moving to DHCP

This chapter discusses the differences between DHCP, BOOTP or RARP protocols. It describes the advantages of DHCP and explains how to migrate to DHCP.

Why Move to DHCP?

A user who is used to BOOTP or RARP might wonder about the differences and advantages of DHCP. The main difference between DHCP and the older protocols is that the older protocols were designed for manual pre-configuration of the host information in a server database, while DHCP allows dynamic allocation of IP addresses and configurations to newly attached hosts.

In addition, DHCP's leasing mechanism permits automatic recovery and reallocation of IP addresses. DHCP is a superset of BOOTP, offering greater flexibility. DHCP builds on BOOTP using the same protocol packet format and mechanisms with certain additions. In this way, DHCP can leverage the BOOTP relay agent functionality already built into routers, and support BOOTP clients directly.

RARP allows a machine to discover its own IP address, which is one of the protocol parameters typically passed to the client system by DHCP or BOOTP. The disadvantage of RARP is that it doesn't support other parameters, and a server providing it can serve only directly attached networks.

DHCP and BOOTP traffic can utilize BOOTP relay agent functionality built into common routers. This means the network administrator does not have to place a BOOTP service on every network segment.

When administrators try to support manually configured IP addresses, they are faced with a number of difficulties:

Advantages of DHCP

DHCP servers offer a number of advantages over earlier methods of getting IP addresses. Here are the features a DHCP server can offer.

  1. Automatic management of IP addresses, including the prevention of duplicate IP address problems

  2. Allows support for BOOTP clients, so you can easily transition your networks from BOOTP to DHCP

  3. Allows the administrator to set lease times, even on manually allocated IP addresses.

  4. Allows limiting which MAC addresses are served with dynamic IP addresses

  5. Allows the administrator to configure additional DHCP option types, over and above what is possible with BOOTP

  6. Allows the definition of the pool or pools of IP addresses that can be allocated dynamically. A user might have a server that forces the pool to be a whole subnet or network. The server should not force such a pool to consist of contiguous IP addresses.

  7. Allows the association of two or more dynamic IP address pools on separate IP networks (or subnets). This is the basic support for secondary networks. It allows a router to act as a BOOTP relay for an interface which has more than one IP network or subnet IP address.

Here are some features that are not part of the DHCP server itself, but related to the way it is administered.

  1. Central administration of multiple servers

  2. The ability to make changes while the server is running and leases are being tracked. For example, you can add or take away IP addresses from a pool, or you can modify parameters.

  3. The ability to make global modifications (those that apply to all entries) to parameters, or to make modifications to groups of clients or pools

  4. The maintenance of a lease audit trail, such as a log of the leases granted

DHCP supports four strategies for IP address allocation. These are independent features. A particular server can offer any or none of them.

Migration

Since DHCP is based on BOOTP and the BOOTP packet structure, migrating to DHCP is easy for most sites. Many DHCP servers support both old BOOTP and new DHCP clients.

Since the Solaris 2 DHCP server handles BOOTP queries as well as DHCP queries, a BOOTP client can boot from a DHCP server. If a DHCP client is written to use the answers from a BOOTP server, a DHCP client can boot from a BOOTP server. The TCP/IP stack included with Windows 95 does not have this capability.

Subnets

DHCP client messages are sent to remote servers by BOOTP relay agents, which are often a feature of an IP router. Through the BOOTP relay agent, the DHCP server can tell which subnet a request came from. The BOOTP relay agent records which subnet the message came from in the DHCP message header. Then the DHCP server can use it to determine which network the client is on.

You cannot run a BOOTP server and a DHCP server on the same machine, because they both use the same port number. You can use the Solaris 2 DHCP server to serve BOOTP clients by turning on BOOTP compatibility mode.

With the DHCP protocol, a client that already has a leased or permanent IP address can get another lease on a temporary basis on another subnet. This is helpful for machines that sometimes must be moved from one location to another. This option is available if the server implementation supports such a feature.

Routers

DHCP requires non-volatile storage. This makes the task of DHCP service compatible with servers, but incompatible with dedicated routers. There are a number of server types that can be configured to both relay and serve DHCP, especially all-in-one Internet Gateways designed to be web servers, firewalls, and so forth. But there are no dedicated routers.

The DHCP RFC specifies that DHCP is not intended for use in configuring routers. The reasons are that in maintaining and troubleshooting a router, it is important to know its exact configuration, rather than leaving that to be established automatically, and that you do not want your router's operation to depend on the working of yet another server.

You may be able to configure some types of more general purpose computers or servers to get their IP addresses from DHCP and to act as routers. In addition, there are remote access servers, which are usually not true routers, which use DHCP to get IP addresses to give to their clients.