In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
The main content of this article is to explain "what are the management methods and allocation principles of DHCP to IP addresses". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what is the way DHCP manages IP addresses and what are the principles for assigning them?"
DHCP (Dynamic Host Configuration Protocol, dynamic Host configuration Protocol) is used to dynamically assign network configuration parameters such as IP addresses to network devices.
Introduction to DHCP
DHCP (Dynamic Host Configuration Protocol, dynamic Host configuration Protocol) is used to dynamically assign network configuration parameters such as IP addresses to network devices.
DHCP adopts client / server communication mode, in which the client requests to assign network configuration parameters to the server, and the server returns the configuration information such as IP address assigned to the client to realize the dynamic configuration of IP address and other information.
In typical DHCP applications, it generally includes a DHCP server and multiple clients (such as PC and laptops).
IP address assignment of DHCP
IP address allocation Policy
According to the different needs of clients, DHCP provides three IP address allocation strategies:
(1) manually assign addresses: administrators bind fixed IP addresses statically for a small number of specific clients (such as WWW servers, etc.). Assign the configured fixed IP address to the client through DHCP.
(2) automatically assign addresses: DHCP assigns IP addresses with infinite leases to clients.
(3) dynamic address allocation: DHCP assigns an IP address with a certain validity period to the client. After the expiration date, the client needs to reapply for the address. The vast majority of clients get this dynamically assigned address.
IP address acquisition process
The DHCP client obtains the IP address from the DHCP server through four phases:
(1) Discovery phase, that is, the stage in which the DHCP client looks for the DHCP server. The client sends DHCP-DISCOVER messages in broadcast mode.
(2) the provision stage, that is, the stage in which the DHCP server provides the IP address. After receiving the DHCP-DISCOVER message from the client, the DHCP server selects an IP address according to the priority of the IP address allocation, and sends it to the client through the DHCP-OFFER message together with other parameters.
(3) selection stage, that is, the stage in which the DHCP client selects the IP address. If multiple DHCP servers send DHCP-OFFER messages to the client, the client only accepts the first received DHCP-OFFER message, and then sends the DHCP-REQUEST message by broadcast, which contains the IP address assigned by the DHCP server in the DHCP-OFFER message.
(4) confirmation stage, that is, the stage in which the DHCP server confirms the IP address. After the DHCP server receives the DHCP-REQUEST message from the DHCP client, only the server selected by the DHCP client will do the following: if it confirms that the address is assigned to the client, it returns the DHCP-ACK message; otherwise, it returns the DHCP-NAK message, indicating that the address cannot be assigned to the client.
After receiving the DHCP-ACK confirmation message returned by the server, the client will send a free ARP message in the way of broadcast to detect whether a host uses the IP address assigned by the server. If the client does not receive a response within the specified time, the client will use this address. Otherwise, the client will send a DHCP-DECLINE message to the DHCP server and reapply for the IP address.
If there are multiple DHCP servers in the network, the unassigned IP addresses in other DHCP servers can still be assigned to other clients except the servers selected by the DHCP client.
Lease update for IP addr
The DHCP address assigned to the client by the IP server has a certain lease term (except for the automatically assigned IP address), which is called a lease. The server takes back the IP address when the lease expires. If the DHCP client wants to continue to use this address, the DHCP client needs to apply for an extension of the IP address lease.
When the IP address lease term of the DHCP client reaches about half of the time, the DHCP client will send a DHCP-REQUEST message to the DHCP server that assigned the IP address to unicast to update the IP lease. If the client can continue to use this IP address, the DHCP server responds to the DHCP-ACK message, informing the DHCP client that a new IP lease has been obtained; if the IP address can no longer be assigned to the client, the DHCP server responds to the DHCP-NAK message, informing the DHCP client that a new lease cannot be obtained.
If the renewal operation in about half the time of the lease fails, the DHCP client will broadcast and send a DHCP-REQUEST message to renew the lease when the lease term reaches 7 prime 8.
At this point, I believe you have a deeper understanding of "DHCP to IP address management and allocation principles". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.