Working with DHCP and BOOTP Clients
Configuring a DHCP client is fairly easy. Once networking is configured, you need to point the startup script for your network card to look for a DHCP server. Once configured, your computer broadcasts a request looking for a DHCP server the next time it boots.
Naturally, you need to make sure that networking is enabled. Check your /etc/sysconfig/network file. It should include the following entry:
NETWORKING=yes
Now revise your network card configuration file. It’s usually in the /etc/sysconfig/network-scripts directory. If the network card is eth0, the filename is ifcfg-eth0, and the file should contain the following:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
There are two alternatives for the BOOTPROTO variable: bootp and dialup. These alternatives are almost self-explanatory; bootp assumes the DHCP server is on a remote network; dialup configures the device for a dial-up connection, such as to an ISP on the Internet.
Once the configuration files are changed, the easiest way to start your computer as a new DHCP client is with the dhclient command. The result should resemble that shown in Figure 24.13.

Figure 24.13: Leasing an IP address
Note | Red Hat has changed the name of its DHCP client a number of times in the past couple of years; previous names included dhcpcd and pump. |