DHCP (Dynamic Host Configuration Protocol) is usually used in large-scale LAN environment. Its main function is to centrally manage and allocate IP addresses, so that hosts in the network environment can dynamically obtain information such as IP addresses, gateway addresses and DNS server addresses, and can improve the utilization rate of addresses.
DHCP protocol adopts client/server mode, and the dynamic allocation of host addresses is driven by network hosts. When the DHCP server receives the address application information of the network host, it will send the related address configuration information to the network host, so as to realize the dynamic configuration of the address information of the network host.
DHCP protocol uses UDP as the transport protocol. The host sends a request message to port 68 of the DHCP server, and the DHCP server sends a reply message to port 67 of the host as a response.
Extended data:
How DHCP service works:
1, DHCP client sends DHCP Discover message through broadcast.
2. All DHCP servers will respond and send a DHCP Offer message to the DHCP client.
3. The DHCP client will send out a broadcast DHCP request message, and the IP address of the selected DHCP server and the required IP address will be added to the option field.
4. After receiving the DHCP request message, the DHCP server judges whether the IP address in the option field is the same as its own address. If they are the same, the DHCP server will respond a DHCP ACK message to the DHCP client.
5. After receiving the DHCP ACK message, the DHCP client checks whether the IP address allocated by the DHCP server can be used.
6. After the DHCP client successfully obtains the IP address, it can release its IP address at any time by sending a DHCP Release message.
Baidu encyclopedia -DHCP