
Book IX
Chapter 4
Running DHCP
and DNS
709
Running a DHCP Server
4. Click Apply.
The Add/Remove Software program grinds and whirs for a moment and
then installs the package you selected.
5. Close the Add/Remove Software program.
You’re done! DHCP is now installed.
Configuring DHCP
You configure DHCP settings through a file called dhcpd.conf that lives
in the /etc directory. Fedora provides you with a sample configuration file
located in the directory /usr/share/doc/dhcp-version/dhcpd.conf.
sample. Open this file in the text editor and then save it to the /etc direc-
tory, changing its name from dhcpd.conf.sample to just dhcpd.conf.
Then, edit the file to reflect the settings that you want to use.
Listing 4-1 shows the sample configuration file that comes with Fedora. (The
exact contents of this file vary from release to release and include additional
comments that I’ve removed for the sake of brevity.)
Listing 4-1: A Sample dhcpd.conf File
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option nis-domain “domain.org”;
option domain-name “domain.org”;
option domain-name-servers 192.168.1.1;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don’t change this
# -- unless you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.0.128 192.168.0.255;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
66_625873-bk09ch04.indd 70966_625873-bk09ch04.indd 709 9/21/10 10:46 PM9/21/10 10:46 PM