- [Instructor] Now we want to look at troubleshooting DHCP
from the perspective of iOS.
To start with, let's go over a few basic steps
that you should check starting with the DHCP pool itself.
If the DHCP pool is too small,
it's very possible that the pool is out of IP addresses.
This should be checked on your DHCP Server.
So if you're using a Windows Server for example,
you want to check it there or you want to check it within iOS,
if you have a router or layer three switch
acting as the DHCP Server.
Make sure that address pool isn't exhausted.
It's also a good idea, to check for duplicate IP addresses.
This can very easily happen if you have hosts
or servers configured with a static IP address.
It's possible that the DHCP Server can hand out
an IP address to a client,
which is already set as a static IP address
to a different client on the network.
This is especially true, if a DHCP reservation
hasn't been properly configured on the DHCP Server.
So obviously we want every host
to have a unique address on the network,
so this would pose a problem for communication.
With a router or layer three switch acting as a DHCP Server.
You also want to make sure
that you have an interface configured
with an address that is part of the DHCP pool's subnet
for which addresses are being handed out.
The device will only hand out addresses in the pool
to clients that are reachable.
So if an interface is miss-configured,
this would cause a problem.
Note that this limitation can be overcome
by using a DHCP relay agent,
which we'll discuss in a future video.
It's also common on large enterprise environments
to have multiple DHCP Servers running
as a fail safe redundancy measure.
I've seen cases where redundant DHCP Servers
lost connectivity with one another, for whatever reason,
and so they were not able to properly synchronize
their DHCP pools.
This can cause the servers to hand out
overlapping addresses in some cases.
Now let's look specifically at some troubleshooting commands
within iOS.
Here, I'm connected into a router
and I have this router configured as a DHCP Server.
If we wanted to examine for IP address conflicts,
we can say show IP DHCP conflict.
And in my case, we don't have any conflicts,
but if there were any detected,
those would be displayed here.
Once you resolve an IP address conflict,
you can clear this database out with the command
clear IP DHCP conflict.
And if we look at context sensitive help,
you can see that the asterisk option
will clear all of the conflicts.
Or you can do that for a specific conflict if you want.
So hitting Enter will clear out the conflict database
and that will also return all of the IP addresses
back to the DHCP pool.
If you want to see all of the IP addresses
that have been handed out by an iOS device,
acting as a DHCP Server,
you can say show IP DHCP binding.
And again, we don't have any bindings at the moment.
So we'll come back to this in just a bit.
We can also use debug commands to troubleshoot DHCP from iOS
as we can with many other things.
So let's say debug IP DHCP Server events.
In this particular debug command will show any updates
to the DHCP database on this router.
So I'm now going to jump over to router two,
which is connected to router one.
I'm already under interface gig 0/1
and that's connected to router one
and it is already configured
to pull an IP address through DHCP.
So all I'm going to do here, is I'm going to bring up this port,
I'm going to say no shut to administratively
bring up the port on this router.
We see that we have a message saying
the state has changed to up.
Let's jump back over to our DHCP Server.
We can see messages populated from our debug output.
And right here we see a DHCP address is assigned
of 192.168.1.6 to the client,
which is the client router two for the interface
that I just brought up.
So that's good, that's exactly what we would expect to see.
I'm going to go ahead and say no debug all
to turn off all of our debugging.
And now let's say show IP DHCP bindings.
Actually I need to say binding without the S.
So we see our single DHCP binding there,
for 192.168.1.6.
That's the interface that we just brought online.
Let's go ahead and do another debug output.
Let's say debug IP DHCP Server and let's say packet.
This is going to give us insight
into the DHCP message exchange.
Let's go back to the host that we just brought up
the interface on and let's shut down that interface.
So we'll say shut.
If we go back to our DHCP Server,
we can see those debug messages begin to populate
and we can see what has happened,
is we've received a DHCP release message from that client.
Let's jump back to the client and let's say no shut.
So we'll bring that interface back online.
Give that just a moment to come back up.
We'll go back to our DHCP Server
and we'll watch those messages populate,
looks like that is completed.
And from here, we can now see the entire
DHCP message exchange happening.
Remember that is a four step process
and we can see that taking place here.
We have our DHCP discover message,
that's been received from the client,
followed by the DHCP offer message
that was sent over to the client from this DHCP Server.
We can see the client responds with a DHCP request message.
We see that receive from the client here
and the final step we see that we sent a DHCPACK message
to acknowledge this over to the host.
So that means that we now have
a valid DHCP address assignment on this host.
And again, this debug command
lets us see that entire process happen.
So if we were having an issue,
we could see exactly where in this process that this failed
and we could begin to troubleshoot from there.
So for example, if we never received
any DHCP discover message from the host,
that means that either the host can't communicate
over layer two with this DHCP Server
or perhaps the client isn't configured for DHCP properly.
Maybe the interface is configured statically.
So that's a look at troubleshooting and iOS device,
acting as a DHCP Server.