Press "Enter" to skip to content

How to Troubleshoot DHCP Misconfigurations Step by Step

In this article “Troubleshooting DHCP Misconfigurations Step by Step” Ticket, Samuel takes you through a P1 ticket where the CEO Mr John Banks PC2 does not connect to the network. He performs a thorough look at the issue and begins to troubleshoot the source of the problem. Your task today is to assist Samuel in resolving this issue as a matter of urgency. Can you help?

Download GNS3 Lab | How to Troubleshoot DHCP Misconfigurations Step by Step

How to Troubleshoot DHCP Misconfigurations Step by Step

===============================================
DHCP Server Configuration
===============================================
ip dhcp excluded-address 172.16.1.1 172.16.1.50
ip dhcp excluded-address 172.16.3.200 172.16.3.254

================================================
DHCP Pool for VLAN 1
================================================
ip dhcp pool Subnet-1610
network 172.16.1.0 255.255.255.0
dns-server 172.16.2.14
default-router 172.16.1.1
domain-name subnetone.com
lease 0 20 30

================================================
DHCP Pool for VLAN 2
================================================
ip dhcp pool Subnet-1630
network 172.16.3.0 255.255.255.128
dns-server 172.16.2.14
default-router 172.16.3.254
lease 1 5 7

================================================
Router 1 – Relay Agent Configuration
================================================

Relay Agent
interface FastEthernet0/1
description “Downlink to Edge Network”
ip address 172.16.1.1 255.255.255.0
ip helper-address 172.16.2.14

===============================================================
Configured Subinterface Gateway for VLAN 2 Subnet 172.16.3.0/24
===============================================================
interface FastEthernet0/1.1
encapsulation dot1Q 2
ip address 172.16.3.254 255.255.255.0
ip helper-address 172.16.2.14

==============================================================
Layer 2 Access Switch Configuration
==============================================================

Trunk Interface
interface FastEthernet1/0
switchport mode trunk

VLAN 1 Member Interface
interface FastEthernet1/1
switchport access vlan 1

VLAN 2 Member Interface – Mr Banks PC2
interface FastEthernet1/2
switchport access vlan 2

===============================================================
Troubleshooting Steps
===============================================================

Check Connectivity States on the Physical Layer
Check Interface State -PC2 Interface up?
Show IP Configuration and VLAN States–
Check DHCP Server Connectivity
Check Gateway Interface Up State

=========================================
Compare with Working System
=========================================
Check if PC1 can get an IP Address

=========================================
Connect another PC to VLAN 2
=========================================
Swap PC2 for another PC to see if it works.

How did I fix the dhcp misconfiguration which made PC2 unable to get an IP Address?

How to Troubleshoot DHCP Misconfigurations Step by Step

How to Troubleshoot DHCP Misconfigurations Step by Step

How to Troubleshoot DHCP Misconfigurations Step by Step PC3

The solution was in changing the network command under the DHCP Pool Subnet-1630. Previously, the network engineer had configured the DHCP Pool as follows;

network 172.16.3.0 255.255.255.128

Now the gateway for VLAN 2 is 172.16.3.254 – Here is the problem! 172.16.3.254 is in another scope and not the 172.16.3.0/25 which has valid hosts from 1 to 126. In order to fix this, I had to make sure that the network subnet mask covered the gateway address where VLAN 2 workstations are attached.

network 172.16.3.0 255.255.255.0

Modify the DHCP Pool to reflect the changes.

ip dhcp pool Subnet-1630
no network 172.16.3.0 255.255.255.128
 network 172.16.3.0 255.255.255.0
dns-server 172.16.2.14 
default-router 172.16.3.254 
lease 1 5 7
!

Verifying and Troubleshooting DHCP Configuration
Router#show ip dhcp binding
Displays a list of all bindings created.

Router#show ip dhcp binding w . x . y . z
Displays the bindings for a specific DHCP client with an IP address of w.x.y.z.

Router#clear ip dhcp binding a . b . c . d
Clears an automatic address binding from the DHCP server database.

Router#clear ip dhcp binding *
Clears all automatic DHCP bindings.

Router#show ip dhcp conflict
Displays a list of all address conflicts recorded by the DHCP server.

Router#clear ip dhcp conflict a.b.c.d
Clears address conflict from the database.

Router#clear ip dhcp conflict *
Clears conflicts for all addresses.

Router#show ip dhcp database
Displays recent activity on the DHCP database.

Router#show ip dhcp server statistics
Displays a list of the number of messages sent and received by the DHCP server.

Router#clear ip dhcp server statistics
Resets all DHCP server counters to 0.

Router#debug ip dhcp server {events | packets | linkage | class }
Displays the DHCP process of addresses being leased and returned.

Related Articles:

Cisco has a good resource on DHCP Configuration.

How to Configure IP Helper on a Cisco Switch for multiple VLANS