I. Introduction to the DHCP service
DHCP is based on the customer/Server mode. When the DHCP Client is started, it automatically communicates with the DHCP server. The DHCP server provides the DHCP client with a service that automatically allocates IP addresses. A server installed with the DHCP service software is called a DHCP server, and a client with the DHCP function enabled is called a DHCP client. The DHCP server provides services for the DHCP client in the form of address lease. There are two ways for the DHCP server.
1. Limited lease period
2. permanent lease
Ii. Working Principles of the DHCP service
1. Request a new IP address from the DHCP server
1) DHCPDISCOVERDHCP discovery)
2) provided by DHCPOFFERDHCP)
3) DHCPREQUESTDHCP request)
4) DHCPACKDHCP confirmation)
2. Update the IP address lease
① When the IP address of the DHCP Client reaches half of the lease period, it will send a new DHCPREQUEST to the DHCP server. If the server does not reject the request after receiving the information, it will send a DHCPACK message. When the DHCP client receives the response, it starts a new lease period.
② When either of the following two special cases occurs during the renewal of an IP address, additional processing is required.
When the DHCP Client restarts
When the IP address lease period exceeds half but the renewal fails