How DHCP Works in an Ethernet/IP LAN environment and assumes the client is obtaining a fresh lease without foreknowledge of the DHCP server's IP address. Note that this is highly simplified.
- A client boots and initializes its network hardware
- The client sends out a DHCPDISCOVER message formatted
as follows:
- The source MAC is the client's MAC
- The destination MAC is all 1's indicating a hardware-layer broadcast (FFFFFF-FFFFFF)
- The message type is set to DHCPDISCOVER
- The server hears the DHCPDISCOVER request and responds
- The source MAC is the server's MAC
- The destination MAC is the client's MAC
- The message type is DHCPOFFER containing:
- Client responds with DHCPREQUEST message and does
one or more of the following:
- requests values for the server-offered parameters from a single server (rejecting all offers from other servers)
- confirm the correctness of the previously allocated IP address (after the client had rebooted or lost connection to the network)
- requests extension of the lease on the specific address already supplied.
- The server responds with
- a DHCPACKnowledge to confirm the server-offered
options and IP previously confirmed by the client -
- or- - a DHCPNOACKnowledge to reject the server-offered
options.
- or - - a DHCPDECLINE message to indicate to the server the address is in use.
- a DHCPACKnowledge to confirm the server-offered
options and IP previously confirmed by the client -
- The client retains the information throughout the period of its lease.
- The client sends a DHCPRELEASE message to release its IP address at the DHCP server when it is leaving the network.