Chapter 27. DHCP

Table of Contents

27.1. Configuring a DHCP Server with YaST
27.2. DHCP Software Packages
27.3. The DHCP Server dhcpd
27.4. For More Information


The purpose of the dynamic host configuration protocol (DHCP) is to assign network settings centrally from a server rather than configuring them locally on each and every workstation. A host configured to use DHCP does not have control over its own static address. It is enabled to configure itself completely and automatically according to directions from the server.

One way to use DHCP is to identify each client using the hardware address of its network card (which is fixed in most cases) then supply that client with identical settings each time it connects to the server. DHCP can also be configured so the server assigns addresses to each interested client dynamically from an address pool set up for that purpose. In the latter case, the DHCP server tries to assign the same address to the client each time it receives a request from it, even over longer periods. This, of course, only works as long as the network does not have more clients than addresses.

With these possibilities, DHCP can make life easier for system administrators in two ways. Any changes, even bigger ones, related to addresses and the network configuration in general can be implemented centrally by editing the server's configuration file. This is much more convenient than reconfiguring numerous workstations. Also it is much easier to integrate machines, particularly new machines, into the network, because they can be given an IP address from the pool. Retrieving the appropriate network settings from a DHCP server can be especially useful in the case of laptops regularly used in different networks.

A DHCP server supplies not only the IP address and the netmask, but also the hostname, domain name, gateway, and name server addresses for the client to use. In addition to that, DHCP allows for a number of other parameters to be configured in a centralized way, for example, a time server from which clients may poll the current time or even a print server.

27.1. Configuring a DHCP Server with YaST

After launching the module for the first time, YaST starts a four-part configuration wizard. You can set up a basic DHCP server by completing this wizard.

Selecting the Network Interface

In the first step, YaST looks for the network interfaces available on your system then displays them in a list. From the list, select the interface on which the DHCP server should listen and select Open Firewall for Selected Interface to open the firewall for this interface. See Figure 27.1, “DHCP Server: Selecting the Network Interface”.

Figure 27.1. DHCP Server: Selecting the Network Interface

DHCP Server: Selecting the Network Interface
Global Settings

In the entry fields, provide the network specifics for all clients the DHCP server should manage. These specifics are the domain name, address of a time server, addresses of the primary and secondary name server, addresses of a print and a WINS server (for a mixed network with both Windows and Linux clients), gateway address, and lease time. See Figure 27.2, “DHCP Server: Global Settings”.

Figure 27.2. DHCP Server: Global Settings

DHCP Server: Global Settings
Dynamic DHCP

In this step, configure how dynamic IP addresses should be assigned to clients. To do so, specify an IP range from which the server can assign addresses to DHCP clients. All these addresses must be covered by the same netmask. Also specify the lease time during which a client may keep its IP address without needing to request an extension of the lease. Optionally, specify the maximum lease time—the period during which the server reserves an IP address for a particular client. See Figure 27.3, “DHCP Server: Dynamic DHCP”.

Figure 27.3. DHCP Server: Dynamic DHCP

DHCP Server: Dynamic DHCP
Finishing the Configuration and Setting the Start Mode

After the third part of the configuration wizard, a last dialog is shown in which to define how the DHCP server should be started. Here, determine whether to start the DHCP server automatically when the system is booted or to start it manually (for example, for test purposes) when needed. Click Finish to complete the configuration of the server. See Figure 27.4, “DHCP Server: Start-Up”.

Figure 27.4. DHCP Server: Start-Up

DHCP Server: Start-Up

SUSE LINUX Administration Guide 9.3