Reconfiguring an Existing DHCP Server in YaST

If the DHCP is already configured, and you want to use YaST to change the configuration, the interface of the YaST module differs slightly. Instead of the wizard view, you see a tree view as shown in Figure 20-5. Most of the configuration options here are similar to those in the wizard, but there are some additional possibilities.

To reconfigure an existing DHCP server using YaST, do the following:

1. Start YaST's DHCP server module. You will see the screen shown in Figure 20-5.

2. The first option is simply to control whether the DHCP server should start automatically at boot time. There are also buttons to start or stop the server manually on this screen.

3. The next item (Card Selection) allows you to change the Ethernet interface on which the DHCP server listens for DHCP requests. This has the same functionality as you have seen in Figure 20-1.

4. To change any of the basic network information provided to DHCP clients by your DHCP server, click the Global Settings item from the tree view on the left in the YaST DHCP Server configuration editor. The functionality here is like that seen in Step 2 of the wizard: You can change the domain name, name server information, default gateway, NTP and print server information that will be passed to the clients, as well as the WINS server and default lease time.


The DHCP Server configuration editor's Start-Up screen


The DHCP Server configuration editor's Start-Up screen

5. The Dynamic DHCP screen allows you to change the range of DHCP addresses offered by the server. The functionality here is the same as the third step of the wizard discussed earlier.

6. The Host Management screen (see Figure 20-6) allows you to set up individual hosts with fixed IP addresses based on their MAC addresses. This is a useful way of controlling the IP addresses that individual machines receive, while still getting them via DHCP. For each host that you want to configure in this way, enter the host name, IP address, and hardware (MAC) address. The IP addresses that you configure here should be outside the dynamic range that you set up previously. You can discover the MAC addresses by using a command such as ip link show or ifconfig -a on the client, or, if you know the current IP address of the client, by looking at the arp cache on the server (arp -a). If the client has previously obtained an IP address from the server by DHCP, the details are logged on the server (by default in /var/log/messages).

Before we look at manual configuration of the DHCP server, it is instructive to look at the changes to the system from the configuration we set up through YaST. First, when we configured the Ethernet interface that the DHCP server listens on, this modified the file /etc/sysconfig/dhcpd and wrote an entry in it like this:



The Host Management screen for configuring fixed addresses


The Host Management screen for configuring fixed addresses

A common problem when configuring the DHCP server by hand is that it refuses to start with an error message saying that it is not configured to listen on any interface. If you see that error, the setting for DHCPD_INTERFACE in /etc/sysconfig/dhcpd does not exist.

The configuration file itself, /etc/dhcpd.conf, which was written by the preceding work is as follows:

option domain-name ""; option domain-name-servers,; option routers; option ntp-servers; option lpr-servers; ddns-update-style none; default-lease-time 14400; subnet netmask { range; default-lease-time 14400; max-lease-time 172800; host hatter { fixed-address; hardware ethernet 00:00:1c:b5:5a:58;

host boojum { fixed-address;

hardware ethernet 00:c0:df:01:b7:c0;

host flamingo { fixed-address; hardware ethernet 00:06:5b:57:9f:d1;

Note how each line is terminated by a semicolon, and that braces enclose multiple directives for the fixed hosts.

Was this article helpful?

0 0

Post a comment