Basic knowledge-DHCP Process

Source: Internet
Author: User

Master An agreement and have an understanding of its work process. Now let's talk about how DHCP works. An important part of learning about DHCP is understanding the DHCP process. First, DHCP is divided into two parts: one is the server side and the other is the client side. The IP address settings of all clients are centrally managed by the DHCP server and are responsible for handling the DHCP requirements of the client. The client uses the IP address allocated from the server.

The DHCP server provides three IP Address Allocation methods: Automatic Allocation of Automatic Allocation), Dynamic Allocation of Dynamic Allocation), and manual Allocation. Automatic allocation means that when the DHCP Client successfully assigns an IP address from the DHCP server for the first time, it will always be used. Dynamic Allocation is when the DHCP client does not use the IP address permanently after it is assigned from the DHCP server for the first time. After each use, the DHCP Client must release the IP address, for other clients, the IP address is manually assigned by the DHCP server administrator.

When a DHCP Client is started, it searches for whether a DHCP server exists in the network. If yes, a request is sent to the DHCP server. After receiving the request, the DHCP server selects the TCP/IP configuration parameters for the DHCP Client and sends these parameters to the client. If you have configured the conflict detection settings, the DHCP server will try to Ping the connectivity of each available address in the test scope before providing the addresses in the lease to the client. This ensures that each IP address provided to the customer is not used by another non-DHCP computer with manual TCP/IP configuration.

DHCP works differently depending on whether the client logs on to the network for the first time. The client obtains the IP address from the DHCP server in the following six steps:

DHCP process 1. Find the DHCP server

When the DHCP client logs on to the network for the first time, the computer finds that there is no IP address set on the local machine, and sends the DHCP discover discovery information in broadcast mode to find the DHCP server, send specific broadcast information to zookeeper 255.255. This broadcast information is introduced to each host installed with TCP/IP protocol on the network, but only the DHCP server will respond.

DHCP process 2. IP Address Allocation

The DHCP server that receives the DHCP discover discovery information in the network will make a corresponding response, it selects an allocated IP address from the unallocated IP address to the DHCP client, send a DHCP offer containing the assigned IP address and other settings to the DHCP client.

DHCP process 3. Accept IP addresses

After the DHCP client receives the information provided by DHCP offer, it selects the first provided information received, and then broadcasts the information to answer a DHCP request, this information contains the IP Address requested from the selected DHCP server.

DHCP process 4. Confirm IP Address Allocation

When the DHCP server receives the DHCP request from the DHCP client, it sends a DHCP ack message containing the IP address provided by the DHCP Client and other settings to the DHCP client, the IP address provided by the DHCP client. Then, the DHCP client binds its TCP/IP protocol to the NIC. In addition, other DHCP servers except the selected server of the DHCP client will reclaim the IP address that was previously provided.

DHCP process 5. Log On again

In the future, when the DHCP Client re-logs on to the network, it does not need to send the DHCP discover discovery information, but directly sends the DHCP request information containing the previous IP address. When the DHCP server receives this information, it will attempt to allow the DHCP client to continue using the original IP address and answer a DHCP ack confirmation message. If the IP address is no longer available for use by the original DHCP client, the DHCP server returns a DHCP nack denial message to the DHCP client. When the original DHCP client receives the DHCP nack denied information, it must resend the DHCPdiscover information to request a new IP address.

DHCP process 6. Update the lease

The IP address rented by the DHCP server to the DHCP Client generally has a lease term. After the lease term expires, the DHCP server will reclaim the IP address. If the DHCP Client wants to extend its IP lease, it must update its IP lease. When a DHCP Client is started and half of the IP Lease Term expires, the DHCP Client automatically sends an update message to the DHCP server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.