dhcpcd is an implementation of the DHCP client specified in RFC2131. This is useful for connecting your computer to a network which uses DHCP to assign network addresses.
Download (HTTP): http://roy.marples.name/downloads/dhcpcd/dhcpcd-4.0.11.tar.bz2
Download (FTP): ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-4.0.11.tar.bz2
Download MD5 sum: b9f1ccdaaf23ffea7dd6fd89e932f4ed
Download size: 51 KB
Estimated disk space required: 0.3 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/dhcpcd
Install dhcpcd by running the following commands:
make PREFIX= \
LIBEXECDIR=/lib/dhcpcd \
DBDIR=/var/lib/dhcpcd \
SYSCONFDIR=/etc/dhcpcd
This package does not come with a test suite.
Now, as the root user:
make PREFIX= \
LIBEXECDIR=/lib/dhcpcd \
DBDIR=/var/lib/dhcpcd \
SYSCONFDIR=/etc/dhcpcd install
By default, a plain text lease info file isn't created but the
dhcpcd provides a hook which can
be used for creating such a file. Install the hook by running the
following commands as the root
user:
sed -i "s;/var/lib/dhcpcd-;/var/lib/dhcpcd/dhcpcd-;g" \
dhcpcd-hooks/50-dhcpcd-compat &&
install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/
To configure dhcpcd, you need to first
install the network service script, /etc/sysconfig/network-devices/services/dhcpcd
included in the blfs-bootscripts-20090302 package (as
user root):
make install-service-dhcpcd
Whenever dhcpcd configures or shuts down a network interface, it executes hook scripts. For more details about those scripts, see the dhcpcd-run-hooks as well as the dhcpcd man page.
Finally, as the
root user create the /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd
configuration file using the following commands. Adjust
appropriately for additional interfaces:
install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd << "EOF"
ONBOOT="yes"
SERVICE="dhcpcd"
DHCP_START="<insert appropriate start options here>"
DHCP_STOP="-k <insert additional stop options here>"
# Set PRINTIP="yes" to have the script print
# the DHCP assigned IP address
PRINTIP="no"
# Set PRINTALL="yes" to print the DHCP assigned values for
# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
PRINTALL="no"
EOF
For more information on the appropriate DHCP_START and DHCP_STOP values, examine the man page for
dhcpcd.
The default
behavior of dhcpcd is to overwrite
/etc/resolv.conf. All
modifications on system configuration files like /etc/resolv.conf, /etc/yp.conf and /etc/ntp.conf are done by hooks which are
stored in /lib/dhcpcd/dhcpcd-hooks. Setup dhcpcd by removing or adding
hooks from/to that directory. The execution of hooks can be
disabled by using the -C command line option.
Review the dhcpcd
man page for switches to add to the DHCP_START value.
Last updated on 2009-02-22 15:52:56 +0000