Deploy the DHCP server to the end (1)

Source: Internet
Author: User

Some important service components in the network are easy to forget because they consistently complete their work and are never so eye-catching. Only when they encounter problems can the true value of these "scalpers" be reflected and people begin to pay attention to them. Dynamic Host Configuration Protocol, DHCP) and Windows Internet Name Service, WINS) are representative of them. They are often left in the corner and work on old servers with grievance. Although they do not look as good as the Active Directory technology, their functions are indeed very important in the network environment, and a lot of planning work should be done for their planning and configuration.

Case 1: Strange DHCP Phenomenon

Dynamic Host Configuration Protocol (DHCP) is a communication Protocol that ensures that network administrators can centrally manage and automatically allocate IP addresses. In an IP network, each connected device must be assigned a unique IP address. Therefore, DHCP deployment enables the network administrator to monitor and allocate IP addresses from the central node, DHCP ensures that a new IP address is automatically received when a computer moves to another location in the network. However, although DHCP looks "beautiful" and is easy to implement, problems still occur when configuring applications. Once I migrated the DHCP server, I found that the DHCP server has been closed, but some clients that use the automatically obtained IP Address can still get the IP address after it is started.

To find out the cause, you can analyze the problem step by step based on the process of obtaining the IP address from the client. The time for a DHCP server to provide an IP address to a DHCP Client generally has a validity period. Once the time ends, the DHCP server will reclaim the IP address rented. If a DHCP Client wants to extend its IP lease, it must re-or extend its IP lease period. When the DHCP Client is started and half of the IP Lease Term expires, the DHCP Client automatically sends an update message to the DHCP server. As for the lease term of IP addresses, it is not as simple as renting a house. In addition to sending a DHCPREQUEST request when the DHCP Client is started, it also sends a DHCPREQUEST when the lease term is half. If no confirmation is obtained from the DHCP server, the workstation can continue to use the IP address. Then, 75% of the lease will be made when the remaining lease term reaches half.) If the lease term is not confirmed, the workstation will not be able to own the IP address. If you want to cancel the lease, you can send the DHCPRELEASE command to cancel the contract at any time, even if your lease was obtained in the first second.

Why is the DHCP server in the network closed, and the client can continue the previous IP address? Let's take a look at what happened after the DHCP Client is restarted. It will try to update the IP address lease that it had when it was shut down last time. If the update fails, the client will try to contact the Default gateway already included in the existing IP address lease ), for example, if the last time the Default gateway is obtained is 192.168.1.254, if the client can successfully contact this device, the client considers that it is still located on the same subnet as it obtained the existing IP address rent and has not been removed), and continues to use the existing IP address. If you fail to contact the default gateway, the client considers that you have been moved to a different subnet and will start a new round of IP leasing. Because I disabled the DHCP server and did not disable the gateway device, the client can contact the gateway, so it follows the previously obtained IP parameters, which also appears the strange phenomenon mentioned above.

Case 2: IP conflict detection

When a small company was just established, the deputy general manager took the Broadband Router from his home to the public. When only five clients needed to connect to the Internet at first, this router was praised for its excellent performance. As the number of employees increases, the company has enabled the DHCP service provided by the Broadband Router to facilitate the use of other users.

Conflict Cause Analysis

However, the trouble also arises, and Client IP address conflicts often occur. Because the client uses the configuration scheme to automatically obtain the IP address, the startup is slow. Some technical staff manually configure the IP addresses allocated by dhcp in the vro, which often conflicts with other users, resulting in the company's frequent "ghost capture.

Based on the analysis of IP address classification features, this company chooses to allocate an IP address based on the dedicated network ID 192.168.0.0. This solution provides a maximum of 254 computers per network segment, enough to meet the requirements of all clients of the company. Why does an IP address conflict occur when the IP address range assigned by the original DHCP server is reasonable? This is because the IP address 192.168.0.1 of the vro itself is usually excluded from the Home Router manual. If the IP address range 192.168.0.x provided by the vro is used before no one manually configures its own IP address, automatically obtain the IP address, and the conflict will not occur.

However, some new employees who have studied computer science in the company are very personalized. They know that setting fixed network parameter IP addresses and DNS servers is faster than Automatically Obtaining a computer. In the above example, if 10 users use fixed network parameters, assume they occupy 192.168.0.2 ~ 192.168.0.11. If the host of the user whose fixed IP address is 192.168.0.5 is not started for a period of time, another user uses DHCP to obtain network parameters. When the DHCP server sees that 192.168.0.5 is an idle address, the IP address is assigned to the user. At this time, if the original user goes online again, the IP address may conflict because it is occupied. Some hosts with fixed IP addresses, such as financial personnel hosts, may prompt IP address conflicts.


Table 1 VLAN and IP Address Allocation


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.