Hi, community!
Today, Let's discuss possible reasons why a PC cannot obtain a DHCP address.
If you have any good suggestions, please leave a message or tell me.

TOPO

Fault Diagram
Gateway Fault:
1. Check whether the DHCP address pool is correctly configured. (The DHCP configuration and VLANIF invoking configuration are correct.)

DHCP Configuration

Vlanif Configuration
2. Check whether the gateway interface is correctly configured. (The interface permits packets from all VLANs, and the configuration is correct.)

3. Check whether DHCP snooping is configured on the device. (If DHCP snooping is not configured, the cause is excluded.)
![]()
4. Check whether the gateway interface is Up. (Both the interface and VLANIF interface are Up.)

Interface status

Vlanif status
5. Check whether the MAC address of the terminal is learned. (The MAC address of the terminal can be learned, indicating that the Layer 2 network is normal.)

6. Check whether the STP status of the gateway is correct. (The status is forwarding.)
![]()
7. Check whether there are idle addresses in the address pool. (Check whether there are remaining addresses in the address pool.)

8. Check whether ARP conflicts exist. (Sorry, because ensp cannot view logs. You can run the display logbuffer command to view logs.)
![]()
For example
9. Check whether a MAC loop alarm is generated. (Sorry, because ENSP cannot view logs. You can run the display logbuffer command to view logs.)
![]()
For example
10. Check whether the ACL and traffic policy is configured on the gateway. (It can be ruled out that the IP address cannot be obtained due to security restrictions.)

11. Check whether the CPU usage and memory usage are too high. DHCP packets are discarded. (The CPU and memory usage is low. Therefore, packet loss is not caused by the CPU and memory.)

CPU-usage

memory-usage
12. Check DHCP statistics to see whether the gateway receives DHCP discovery packets. (The DHCP server has received discover packets from the PC.)

Access Fault:
1. Check whether the interface permits the corresponding VLAN. (VLAN 10 is allowed to pass through the interface.)

2. Check whether port security is configured on the interface. (Check the interface configuration and find that port security is not configured.)

3. Check whether the interface is Up. (The interface is in the Up state.)

4. Check whether the device can communicate with the gateway. (The test is successful, and the network between the access and gateway is normal.)

5. Check whether the STP status of the gateway is correct.

6. Check whether ARP conflicts exist. (Sorry, because ENSP cannot view logs. You can run the display logbuffer command to view logs.)
![]()
For example
7. Check whether a MAC loop alarm is generated. (Sorry, because ensp cannot view logs. You can run the display logbuffer command to view logs.)
![]()
For example
8. Check whether the ACL and traffic policy is configured. (ACLs and traffic policies are not configured on access devices.)

PC Fault:
1. Check whether the PC has multiple network adapters. If the other network adapter has obtained an IP address that conflicts with the DHCP address, it will not obtain the IP address again.
2. Check the firewall of the PC. It is found that DHCP packets are permitted.
3. Replace the PC and try to obtain the IP address. Check whether the terminal is faulty.
4. Capture packets on the PC and check DHCP packets.


