DHCP Client Deamon
- This document covers the compilation, installation and basic configuration of a DHCP client deamon. More advanced configuration is covered in online documents. A good place to start is the dhcpcd man page.
- If you spot any major errors on this page, please e-mail me using the link above.
- It is assumed that this installation takes place on a computer on which Core Linux has been successfully installed.
- No software other than the packages bundled with Core Linux have been installed.
- As described in the installation guide, it is assumed that any downloaded application source code is stored in a directory called
/appson the CD-R. - It is assumed that the Core Linux computer is attached to a network on which there is a DHCP server running, and at least one other machine with internet access and a CD burner.
Preparation
- Perform this stage using your functioning PC.
- Download the dhcpcd (DHCP client daemon) source code from http://www.phystech.com/download/.
- Burn the
.tar.gzfile to a CD. This page assumes that the subdirectory/appsis used for the.tar.gzfile. The CD-ROM can be a multi-session disk.
Booting
- Perform this stage and subsequent stages, unless otherwise stated, using your Core Linux PC.
- Boot your Core Linux PC.
- Login as
root. You will need to enter the password at the prompt.
Extract the source
- Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under
/mnt/cdrom. - Change to the
/appsdirectory on the CD-R. - Copy the
dhcpcd-1.3.22-p14.tar.gzfile to the directory/usr/src. - Change to the
/usr/srcdirectory and extract the source from the.tar.gzfile.
Configure and compile
- Change to the
/usr/src/dhcpcd-1.3.22-p14directory. - Run the
./configurescript. You will need to add an argument specifying the architecture of the system, for example:./configure --build=i686-pc-linux-gnu - Run the
makeprogram. - Run the
makeprogram with the argumentinstall.
Initial Testing
- If your ethernet interface is already up, take it down.
- Start the dhcpcd client using
/usr/local/sbin/dhcpcd eth0. - Use
ifconfigto check the IP address assigned to the interface.
Stopping dhcpcd
- Stop the dhcpcd client using
kill.
Automating dhcpcd
- Append the following line to the
/etc/rc.d/rc.muscript:If you have previously configured the interface to be assigned a static IP address on boot, you will need to remove the/usr/local/sbin/dhcpcd eth0ifconfigline from the script and replace it with the above line. You will also need to remove any lines containingroutecommands, as this information is set dynamically by the dhcp client. You can also add comments and echoes for your own information. - Reboot the system and check that the interface has been assigned an IP address.

The text of this page is licensed under a Creative Commons License.
