How to Get DHCP Started



How to Get DHCP Started

To start DHCP:

1.
Some older Fedora/Red Hat versions of the DHCP server will fail unless there is an existing dhcpd.leases file. Use the command touch/var/lib/dhcp/dhcpd.leases to create the file if it does not exist:

[root@bigboy tmp]# touch /var/lib/dhcp/dhcpd.leases

2.
Use the chkconfig command to get DHCP configured to start at boot:

[root@bigboy tmp]# chkconfig dhcpd on

3.
Use the service command to instruct the /etc/init.d/dhcpd script to start/stop/restart DHCP after booting:

[root@bigboy tmp]# service dhcpd start
[root@bigboy tmp]# service dhcpd stop
[root@bigboy tmp]# service dhcpd restart

4.
Remember to restart the DHCP process every time you make a change to the conf file for the changes to take effect on the running process. You also can test whether the DHCP process is running with the following command; you should get a response of plain old process ID numbers:

[root@bigboy tmp]# pgrep dhcpd

5.
Finally, always remember to set your PC to get its IP address via DHCP.