Why are dhcp ip addresses always the same?

Source: Internet
Author: User

We know that DHCP is a powerful IP management protocol. Some problems may occur when we set up servers and network applications. This article will answer questions about the same IP address and DHCP address. I hope this article will help you.

Q: Why is the same ip address obtained through DHCP? The home computer shares the Internet through the home tplink router. It uses DHCP to automatically obtain the ip address. The vroip ip address is 192.168.1.1, And the allocation area of the DHCP address pool is 192.168.1.100-192.168.1.200, the strange thing is, why is the IP address of my machine fixed every time I start up, And 192.168.1.100 every time? Note: There are only two computers in the LAN.

A: Read the DHCP protocol RFC2131.

The DHCP server first distributes unrented IP addresses to the original IP addresses. DHCP clients do not need to send DHCP discover to find information each time they log on to the network again, instead, it directly sends DHCP request information that contains 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, 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 .) In addition, the IP addresses rented by the DHCP server to the DHCP Client generally have a lease term. After the lease term expires, the DHCP server will reclaim the IP addresses. 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.

For ease of understanding, compare the DHCP client with the guests in a restaurant. The DHCP server can have multiple waiters in a restaurant than the waiter), and the IP address is better than the food required by the customer. 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 select the top food from the food that has not been sold (the top IP address that has not been rented), and then answer: "" yes, I have a hamburger "DHCP offer)," Yes, I have chicken wings "". 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.

It is possible that the IP address of your machine is fixed at 192.168.1.100 every time it is started. when your machine is started for the first time, another machine in the network segment is not started or a fixed IP address is manually set, so it is allocated to 192.168.1.100. in the future, when your machine re-logs on to the network, it will directly send the DHCP request information containing the IP address that was previously assigned, and the IP lease has not expired.

You can set the expiration time of an IP lease during the DHCP service period to specify how long a client can use it after renting an IP address from the DHCP server. For example, in Windows 2000 DHCP server configuration, you can select the "limit to" option in the "select DHCP Lease Term assigned to this server" option area, in the following "day", "Hour", and "Minute" splitters, specify the length of time the client uses the address. If you want the client to continue using the address, you can select the "unlimited" radio button.
 

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.