DHCP : Starting the DHCP Server

You can use the simple service command to start the DHCP server:

service dhcpd start

It doesn’t hurt to do this first, and see if clients are getting addresses. Then you can use chkconfig to start it upon boot from now on (runlevels 2, 3, 4 and 5):

chkconfig dhcpd on

Now take a look at the /var/lib/dhcp/leases file. You should see bracketed lease statements for each client using DHCP.

For another test, assuming you have Ethereal installed (you should, always), perform a packet capture in promiscuous mode from a client (not the server). Do a restart on the DHCP service on the server. Now, on the client, you should see this sequence:

  • DHCP Offer
  • DHCP Discover
  • DHCP Offer
  • DHCP Request

Finally, on a client, issue the command:

ifconfig -a

and check your NIC information. You should have an address from the DHCP range you configured.