Книга: Fedora™ Unleashed, 2008 edition

DHCP Software Installation

DHCP Software Installation

Installation of the DHCP client and server might be easiest during the initial install of Fedora, but you can also use yum later. This section describes configuring the dhclient and setting up and running the dhpcd daemon.

DHCP dhclient

As previously mentioned, using DHCP for an installed NIC is easily accomplished when installing Fedora on your host (read more about installation in Chapter 1, "Installing Fedora"), and during the network step of installation, you can choose to have DHCP initiated at boot time. If you choose to do this (and choose to install the DHCP client package), the DHCP client, dhclient, sends a broadcast message to which the DHCP server replies with networking information for your host. That's it; you're finished.

If you choose to install from source, you will have to (as root) download and install the server packages that include dhclient. Unpack the source file, run ./configure from the root of the source directory, run make, and then run make install. This should put the DHCP client binaries where they will start at the correct time in the boot process.

You can however, fine-tune how dhclient works, and where and how it obtains or looks for DHCP information. You probably will not need to take this additional effort; but if you do, you can create and edit a file named dhclient.conf, and save it in the /etc directory with your settings. A few of the dhclient.conf options include the following:

timeout time; — How long to wait before giving up trying (60 seconds is the default)

retry time; — How long to wait before retrying (5 minutes is the default)

select-timeout time; — How long to wait before selecting a DHCP offer (0 seconds is the default)

reboot time; — How long to wait before trying to get a previously set IP (10 seconds is the default)

renew date; — When to renew an IP lease, where date is in the form of <weekday><year>/<month>/<day><hour>:<minute>:<second>, such as 4 2004/1/1 22:01:01 for Thursday, January 4, 2004 at 10:01 p.m.

See the dhclient.conf man page for more information on additional settings.

DHCP Server

Again, the easiest way to install the DHCP server on your computer is to include the RPMs at install time or to use yum if you have installed your machine without installing the DHCP server. If you are so inclined, you can go to the Internet Software Consortium (ISC) website and download and build the source code yourself (http://www.isc.org/).

If you decide to install from a source downloaded from the ISC website, the installation is straightforward. Just unpack your tar file, run ./configure from the root of the source directory, run make, and finally, if there are no errors, run make install. This puts all the files used by the DHCP daemon in the correct places. It's best to leave the source files in place until you are sure that DHCP is running correctly; otherwise, you can delete the source tree.

NOTE

For whichever installation method you choose, be sure that a file called /etc/dhcpd.leases is created. The file can be empty, but it does need to exist for dhcpd to start properly.

Оглавление книги


Генерация: 0.267. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз