About DHCP protocol

Source: Internet
Author: User

We have explained a lot about the DHCP protocol, and you may feel confused about this part. It doesn't matter. Let's take a look at the definition of this agreement. We can look back and see that there may be unexpected gains.

DHCP protocol Introduction

DHCP, full name: Dynamic Host Configuration Protocol, Chinese name: Dynamic Host Configuration Protocol, its predecessor is BOOTP, it works at the OSI application layer, it is a proprietary protocol that helps computers obtain their configuration information from a specified DHCP server.

DHCP uses the Client/Server mode. The computer requesting configuration information is called the DHCP client, and the server providing information is called DHCP. DHCP can assign addresses to clients in three ways: manual configuration, automatic configuration, and dynamic configuration.

The most important function of DHCP is dynamic allocation. In addition to IP addresses, DHCP groups also provide other configuration information for clients, such as subnet masks. This allows the client to automatically configure the network connection without manual operation.

1. DHCP workflow

Discovery phaseThat is, the stage in which the DHCP client looks for the DHCP server. The DHCP Client sends DHCP discover discovery information to find the DHCP server in broadcast mode because the IP address of the DHCP server is unknown to the client. That is, it sends specific broadcast information to the IP address 255.255.255.255. Each host installed with the TCP/IP protocol on the network will receive this broadcast information, but only the DHCP server will respond.

Provision stageThat is, the IP address provided by the DHCP server. The DHCP server that receives the DHCP discover discovery information in the network will respond, it selects a DHCP client from the IP address that has not been rented, send an IP address that contains the lease and other DHCP offer settings to the DHCP client.

Select stageThat is, the DHCP Client selects the IP address provided by a DHCP server. If Multiple DHCP servers provide information to DHCP offer, the DHCP client accepts only the information provided by the first DHCP offer, then, it answers a DHCP request information in broadcast mode, which contains the content that requests IP addresses from the selected DHCP server. The answer is broadcast to notify all DHCP servers that they will select the IP address provided by a DHCP server.

Validation phaseThat is, the DHCP server confirms the stage of the provided IP address. When the DHCP server receives the DHCP request from the DHCP client, it sends a dhcp ack confirmation 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 the TCP/IP protocol to the NIC. In addition, all the DHCP servers except the selected server of the DHCP client will reclaim the IP address.

Log on againLater, each time 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 cannot be assigned to the original DHCP client, then 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 DHCP discover information to request a new IP address.

Update leaseThe 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 will automatically send 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.