Experience in troubleshooting DHCP server faults

Source: Internet
Author: User

We all know that each computer needs an address to access the Internet normally. This address is what we often call an IP address. How can we effectively manage these IP addresses as network administrators? You can set the corresponding IP address, subnet mask, gateway address, DNS address, and other network parameters for each computer, but it is very cumbersome and heavy workload, conflicts often occur in practical applications.

How can we effectively allocate these network parameters? The DHCP Service can help us a lot. It is very efficient to configure the DHCP service on a professional server and allocate IP addresses and other information to all common clients in the network. However, DHCP also brings some problems while facilitating network management. For example, if the network bandwidth is affected, the client often cannot obtain the correct address information or even any information. In fact, we can solve these faults according to certain rules. Today, I will give you a comprehensive introduction to the methods for troubleshooting DHCP faults.

I. concepts:

Before introducing the troubleshooting of DHCP faults, I would like to clarify a few conceptual things for you. Only theoretically enriched can we better understand the troubleshooting ideas described below.

1. What data does the DHCP service provide? The DHCP Service is not omnipotent. It can only provide network-layer parameters, such as IP addresses, MASK addresses, Gateway Addresses, WINS and DNS server addresses. For lower-layer addresses, such as MAC addresses, information cannot be provided. The MAC address is installed in the computer Nic.

2: Can Multiple DHCP servers run simultaneously? The DHCP server sends network information to the client through a broadcast packet. Therefore, if Multiple DHCP servers exist in the same broadcast domain in the same network, each server provides its own network information, resulting in a conflict of broadcast packets on the network. The client does not know which DHCP server to accept. Therefore, Microsoft sets up only one DHCP server in the same broadcast domain network by default, and then sets up or enables DHCP to work.

Third: What is a lease? When configuring the DHCP server, the number of days of the lease will be set. What is the lease? After the DHCP server sends the network information packet to the client, it will receive the reply packet sent back by the client, then, the DHCP server establishes a correspondence relationship between the allocated IP address and the MAC address of the computer received from the client, and stores the correspondence in the lease pool of the DHCP server. Why is this lease pool required? On the one hand, it increases the speed for the next allocation of network parameter information. However, if the client computer corresponding to the MAC address is moved elsewhere or the MAC address changes, if the relationship established above is always stored in the lease pool of the DHCP server, the number of available IP addresses will decrease, and many valid IP addresses will be occupied by Invalid MAC addresses, therefore, Microsoft introduced the concept of lease. Through the lease, we can force all entries saved in the lease pool of the DHCP server to be cleared at intervals, thus preventing illegal MAC addresses from occupying legitimate IP addresses.

Fourth, my client can obtain IP information in the form of 169. 254. *. * from the DHCP server. This sentence is incorrect. Why? Microsoft provides this function in windows, that is, if no DHCP server exists in the network and the local network information of the client is set to automatically obtain the IP address, then the Windows 169 and later operating systems will automatically allocate. 254. *.. Therefore, if you find that your client can only obtain IP addresses like 169. 254. *. *, it means that your DHCP server is not working properly.

Ii. Client troubleshooting:

DHCP faults mainly involve two aspects: client problems and server problems. First, we will introduce the troubleshooting methods on the client.

Step 1: Go to Start-> Run-> Enter CMD in the task bar to enter the command line mode.
Step 2: Enter ipconfig in command line mode and press enter to check whether the IP address can be automatically obtained.

TIPS: before performing the first two steps, ensure that the IP Address Allocation Method of the client is set to automatically obtain the IP address.

Step 3: If you can obtain the correct IP address, it means that DHCP is normal. If you find that the address is incorrect, it includes 169. 254. *. * In this form, run the ipconfig/release command to release the currently obtained network parameter information.

Step 4: Release the network parameters and run ipconfig again. We can see that the current network parameters are empty and all information is changed to 0.0.0.0. 1)

Click to view the chart

Step 5: Release the error message and execute ipconfig/renew to automatically obtain the new information. 2)
Click to view the chart

TIPS: If you run ipconfig/renew without executing the command to release IP information, you will not be able to obtain IP information again. Therefore, step 3 is indispensable.

Step 6: after obtaining the IP information again, we can view the current address parameters. If we cannot obtain any information, we should start from the local machine to solve the problem, if an error message is returned, find the DHCP server and check it.

Step 7: Disable the local Nic and enable it again. Perform the preceding steps again.

Step 8: If you know the ip address of the DHCP server, you can run the ping command "ping SERVER ip Address" on the client to view network connectivity.

Step 9: search for any fault records related to the DHCP service in the system "Event Viewer. Choose Start> Control Panel> Administrative Tools> event viewer ". 3)

Click to view the chart

Step 10: Go to Start> Control Panel> Administrative Tools> services to open the service settings window and find the dhcp client service in the service list. 4) double-click it, click the stop button, and then click the start button to restart it. If the service is not enabled, the root cause of the fault is displayed. You can directly start the service and set the startup mode to "automatic. 5)
Click to view the chart

Step 2: enable the local connection of the network to fix the problem. The solution is "network neighbor-> properties-> Local Connection-> Repair ". The system automatically clears the ARP cache and NETBS information, and then updates the DNS and DHCP service components and related information. 6)
Click to view the chart

Step 2: If the problem persists in Step 11, we can only use static IP addresses and DNS and other network information to configure the Local Machine for detection. If you have configured the static IP address to access the Internet and connect to the LAN, the problem lies in the connection between the client and the DHCP server or the DHCP server itself. We need to place the cause of the problem on the DHCP server.

TIPS: Sometimes you can set another user for the client and use the user to log on to the client to solve some DHCP faults. In addition, you can use lspfix.exeor winsockxpfix.exe to fix stack errors in the tcpip, scanning the system file again with "start-> Run-> input sfc/scannow" produces unexpected results.

Iii. Server troubleshooting:

We have already introduced the troubleshooting methods for DHCP servers. Interested readers can refer to previous articles on server channels. The main method is to check whether the dhcp server settings on the server are normal. If it is not enabled, enable it. In addition, you need to disable the DHCP server from time to check whether there are other DHCP servers in the network, resulting in conflicts. In addition, if you want to enable the DHCP server when creating a domain on the network, you must authorize the DHCP server by the domain control. Therefore, do not forget the authorization work.

The lease problem also needs to be raised. If DHCP works properly, some clients cannot obtain IP information. If ipconfig/renew is executed, the system prompts that the DHCP server cannot be found, if the other part can be obtained normally, 90% is due to the lease. If too much information is saved in the lease, We need to manually clear it once. If so, the lease time is too long, as a result, a large number of illegal MAC addresses occupy valid IP addresses.

TIPS: any server that provides the DHCP service must have a fixed IP address. It is not allowed to enable the DHCP service on a computer that dynamically obtains IP information. In addition, Microsoft has made regulations on the restriction of DHCP service. For example, two DHCP servers are not allowed in the same network. However, there are currently many third-party software that can be used to build DHCP servers, and even broadband routers integrate DHCP functions into their own configurations, therefore, in this case, it is impossible to clearly query whether several DHCP servers exist in the network, we can only disable the suspicious objects one by one or filter out the suspicious objects on the vswitch and vro. In short, it is very difficult to solve network faults caused by illegal DHCP servers in the network, and it is necessary to investigate and step by step.

Summary:When a problem occurs in the DHCP service, do not blindly search for the result on the server. Most of the time it is caused by client failure. In addition, the media between the client and the server should also be worth noting, whether the network cable is connected normally or whether the switch is working normally requires consideration. If necessary, replace it with several network cables or several switch ports. Remember not to take it for granted. You must make a down-to-earth measurement to get real results.


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.