Describes the relationship between DHCP and IP addresses.

Source: Internet
Author: User

We know that DHCP is an IP address management protocol. DHCP is used in many network structures. For example, two computers connected to the Internet must have their own IP addresses for communication. However, due to the limited IP Address Resources, broadband Access operators cannot assign a fixed IP address to each user who installs broadband. The so-called fixed IP address is that even if you do not access the Internet, others cannot use this IP address, this resource is always exclusive to you), so you need to use DHCP to assign temporary addresses to online users. That is, when your computer is connected to the Internet, the DHCP server will temporarily assign you an IP address from the address pool. The IP addresses allocated each time may be different, which is related to the IP address resources at that time. When you go offline, the DHCP server may allocate this address to other computers that will be launched later. In this way, you can effectively save IP addresses, which not only ensures your communication, but also increases the IP address usage.

If you want to apply for a fixed IP address to access the Internet, the charges are much higher. Therefore, common customers generally use DHCP to dynamically allocate addresses. If you are not a commercial user, you must install DHCP to access the Internet. DHCP (Dynamic Host Configure Protocol ),

It is a Dynamic Host Configuration Protocol widely used in TCP/IP networks. Using DHCP protocol, it has many simple and easy-to-use advantages, mainly manifested in: the network administrator can verify the IP address and other configuration parameters without checking each host. DHCP does not lease the same IP address to the two hosts at the same time. The DHCP administrator can restrict specific computers to use specific IP addresses; you can set many options for each DHCP scope. When the client moves between different subnets, you do not need to reset the IP address.

DHCP protocol Workflow

1. The DHCP client looks for the DHCP server stage, which can be called the discovery stage: the DHCP Client is broadcast because the IP address of the DHCP server is unknown to the client) send DHCP discover information to find the DHCP server, that is, send 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 DHCP server provides an IP address. It can be called a provision phase. DHCP servers that receive DHCP discover and discover information in the network will respond, it selects an IP address allocated to the DHCP client from the IP address that has not been rented, and sends a IP address containing the rented IP address and other DHCP offer settings to the DHCP client to provide information.

3. The DHCP Client selects the IP address stage provided by a DHCP server. This can be called the selection stage. If Multiple DHCP servers provide information to the DHCP offer sent by the DHCP client, then, the DHCP client only accepts the information provided by the first DHCP offer, and then replies to a DHCP request in broadcast mode, this information contains the IP Address requested 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. the DHCP server confirms the stage of the provided IP address, which can be called the validation stage: After the DHCP server receives the DHCP request information answered by the DHCP client, it sends a DHCP ack confirmation message containing the IP address provided by the DHCP Client and other settings, telling the DHCP client to use the IP address provided by the DHCP client. Then, the DHCP client binds its TCP/IP protocol to the NIC. In addition, all other DHCP servers except the server selected by the DHCP client will reclaim the IP addresses they have provided.

5. In the future, each time the 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. 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. If the client keeps occupying the IP address allocated by DHCP and is online within the time specified by the lease, the IP address will be used by the client all the time.

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.