Troubleshooting DHCP

This topic is to discuss the following lesson:

Hi Rene,

I also noticed that subnet needs to be the same between the “giaddr” and the pool you create. Otherwise DHCP server won’t offer an IP address to the client. Just my observation. Please correct me if I’m wrong. Thanks.

Hi Neldien,

Normally the DHCP server should be in the same subnet since the DHCP discover messages are broadcasts. If your DHCP server is in another subnet then you’ll have to use DHCP Relay:

https://networklessons.com/network-services/cisco-ios-dhcp-relay-agent/

Rene

I have setup a dhcp pool on my switch… It will work for maybe 10 min and stop working… Any Idea what is causing the switch to do that…

When an IP has been reserved for a device? What would cause the device not to pick up the reserved IP?

Hello David

There are no special conditions that would cause a reserved IP to fail to be assigned to the host it was reserved for. The same errors or faults that may be encountered for a normal DHCP assignment may also cause a reserved DHCP assignmnent to fail.

The only additional error that may occur is a mistake in the configuration of the static binding.

I hope this has been helpful!

Laz

Hello,
How can I debug specific client mac for dhcp?
Now when I type

debug ip dhcp server event/packet

I get a lot of data and is very difficult to find spcecific mac .

Hello Marcin

It is true that some debug commands show a lot of data. However, there are tools and methods that you can use to simplify you searching through the output. One of the most beneficial is to send the output you see to a local text file. This can be done using your terminal software’s capabilities (Putty and SecureCRT both have this feature, as do most terminal software packages). Once you have that you can then more easily search through using a text editor like Windows Notepad, but preferably a more advanced text editor such as Notepad2, or Sublime which have better search and text editing features that can help you.

If you are looking for a particular MAC address within the output, then you can easily find it and its associated debug output within such saved text.

Some additional helpful information for debugging best practices can be found here:


Although it is specific to voice applications, the principles are the same.

I hope this has been helpful!

Laz

1 Like

Hi,
Is there any other reason for the client not getting an IP except the one explained in the article. I have a scenario where a wireless client is not getting an IP address ( toggles between discover and offer ). Routing is fine because the wired host gets DHCP IP and works fine.

Hello Rahul

There may be many reasons for which a client does not receive an IP address via DHCP. The scenarios in the lesson are only examples and are not exhaustive. In your particular case, when you say it toggles between discover and offer, do you mean you are only seeing discover and offer messages? You’re not seeing request and ACK messages?

Please give us some more information about your particular case, the topology, as well as what DHCP messages you are seeing so that we can further help you troubleshoot.

I hope this has been helpful!

Laz