DHCP
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway.
Reliable IP address configuration. Reduced network administration. Centralized and automated TCP/IP configuration. The ability to define TCP/IP configurations from a central location. The ability to assign a full range of additional TCP/IP configuration values by means of DHCP options. The efficient handling of IP address changes for clients that must be updated frequently, such as those for portable devices that move to different locations on a wireless network. The forwarding of initial DHCP messages by using a DHCP relay agent, which eliminates the need for a DHCP server on every subnet.
DHCP server port UDP 67 and the DHCP clients port UDP 68.
By default, the DHCP will have the database file in the location: %SystemRoot%System32\DHCP\, in this folder we can find the below file, for more click here.
The automatic backup will happen every 60 minutes %SystemRoot%System32\DHCP\backup.
| Dhcp.mdb | The primary database file for the DHCP server |
| J50.log | A transaction log file used to recover incomplete transactions in case of a server malfunction |
| J50.chk | A checkpoint file used in truncating the transaction log for the DHCP server |
| Res1.log | A reserved log file for the DHCP server |
| Res2.log | A reserved log file for the DHCP server |
| Tmp.edb | A temporary working file for the DHCP server |
We can change the default backup interval time for DHCP database by modifying the Registry value BackupInterval in the following location in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Parameters
DHCP server can provide following information: IP address Subnet mask Default gateway Domain Name Server WINS information Process of DHCP (DORA)? Click here
Discover: The Client discovers DHCP Offers: The DHCP server offers a group of IPs to the clients to pick any Request: The client selects an IP and request DHCP to confirm it Acknowledgement: The DHCP server makes a confirmation by sending an DHCPPACK to the client. DHCP client tries with a maximum of three retries at 4, 8, and 16 seconds Scope: Range of IP Addresses. Need to be activated once configured. IP lease default days is : 8 days DHCP Lease Process: Click here for more.
Renewing
IP addressing information is leased to a client, and the client is responsible for renewing the lease. By default, DHCP clients try to renew their lease when 50 percent of the lease time has expired. To renew its lease, a DHCP client sends a
Rebinding
If the DHCP client is unable to communicate with the DHCP server from which it obtained its lease, and 87.5 percent of its lease time has expired, it will attempt to contact any available DHCP server by broadcasting DHCPRequest messages. Any DHCP server can respond with a DHCPAck message, renewing the lease, or a DHCPNak message, forcing the DHCP client to initialize and restart the lease process.
If the lease expires or a DHCPNak message is received, the DHCP client must immediately discontinue using its current IP address. If this occurs, communication over TCP/IP stops until a new IP address is obtained by the client.
DHCPNak: If the IP address cannot be used by the client because it is no longer valid or is now used by another computer, the DHCP server responds with a DHCPNak packet, and the client must begin the lease process again. Whenever a DHCP server receives a request for an IP address that is invalid according to the scopes that it is configured with, it sends a DHCPNak message to the client.
DHCPDecline:
If the DHCP client determines the offered configuration parameters are invalid, it sends a DHCPDecline packet to the server, and the client must begin the lease process again.