What is DHCP?

Source: Internet
Author: User

What is the DHCP protocol when I first access DHCP? Here we will take a look at the specific introduction. DHCP: Dynamic Host Configuration Protocol; Chinese name: Dynamic Host Configuration Protocol; Introduction:

(1) Introduction

What is DHCP? In common small networks, such as the home network and Student Dormitory Network), network administrators use the method of manually assigning IP addresses. However, in medium and large networks, this method is not suitable. In medium and large networks, especially large networks, there are often more than 100 clients. It is not appropriate to manually assign IP addresses. Therefore, we must introduce an efficient IP Address Allocation Method. Fortunately, DHCPDynamic Host Configuration Protocol solves this problem for us.

(2) Advantages and Disadvantages of DHCP

After learning about what the DHCP protocol is, let's take a look at the characteristics of DHCP. DHCP service has many advantages: the network administrator can verify the IP address and other configuration parameters, instead of checking each host. DHCP does not lease the same IP address to both hosts; the DHCP administrator can restrict specific computers to use specific IP addresses. Multiple options can be set for each DHCP scope. clients do not need to reset IP addresses when moving between different subnets.

But there are also many disadvantages: DHCP cannot find IP addresses that are already in use by non-DHCP clients on the network; When Multiple DHCP servers exist on the network, a DHCP server cannot find the IP address that has been rented out by other servers. The DHCP server cannot communicate with clients across vrouters unless the vrobooallows BOOTP forwarding.

(3) Workflow

Now we know what the DHCP protocol is. The DHCP Service works like this:

1. Discovery stage: the stage in which the DHCP Client searches 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.

2. The provision phase, that 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.

3. Select the phase, that is, the IP address provided by a DHCP server is selected by the DHCP client. 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.

4. confirmation stage: the stage in which the DHCP server confirms the IP address provided. 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.

5. log on again. In the future, each time a DHCP client logs on to the network again, 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.

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.

We have learned about what the DHCP protocol is, and then explained how it works. For ease of understanding, we compare the DHCP client to a guest in a restaurant, and the DHCP server can have multiple waiters in a restaurant). The IP address is better than the food the customer needs. The whole process can be described as follows: When a guest walks into a restaurant, he asks, "Is there a waiter ?" DHCP discover), multiple waiters also replied: "Yes, I have chicken wings" "Yes, I have a hamburger" DHCP offer ). The guest said, "Okay, I want a hamburger." DHCP request, this guest is rigid and always chooses the food he heard for the first time.) The waiter with the hamburger responded: "Come" DHCP ack), and bring the food to the guests for them to enjoy and bind the NIC and IP address ). When the next time you come, you can directly ask the waiter to order a DHCP request for his favorite hamburger.) If there is a hamburger, the waiter will confirm it again and pick up DHCP ack ), if you have sold out, the waiter will tell the guest: "Sorry, you have sold out" DHCP nack ). Of course, the waiter will clean up the table every other time, unless the guests specifically state that the food will continue to eat, the waiter will take the leftovers away.

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.