This is one of multiple videos discussing dynamic host configuration protocol or DHCP, and specifically
how to troubleshoot DHCP. In this topology
we've got a client connected to a router connected to a DHCP server, and we've been told that the client
is not receiving IP addresses from the DHCP server. In this example, rather than using physical PCs
I've got iOSV Routers acting as our DHCP server and DHCP client.
So here's the client, show IP interface brief.
Notice the client hasn't got an address assigned to gigabit00 DHCP is being used
but no address has been assigned. So let's shut the interface down and then no shut it
to test what's happening.
Interfaces come up, show IP interface, brief interfaces, up up no address has been assigned through
DHCP. So on the DHCP server, let's run a debug, so debug IP DHCP
server, and I'm going to go for packets to see detailed information. We're already seeing something
here.
Says clients VPN is something no option 125 DHCP Discover received from a client through a relay of 10.
1.1.254.
So a DHCP message is being relayed by the router.
We can see in this example that router 2 has this IP address on the interface facing the client,
and that's the address that we see on the DHCP server
but we're told that option 125 is not present in the message.
There's a problem with option 125.
You can find information about option 125 in this RFC, vendor identifying vendor options for DHCP.
The problem here is that option 125 is vendor-dependent.
So we're seeing a lot of messages stating that Option 125 is not present in the message.
So let's have a look at the relay agent show run interface Gigabit00.
Now, we do see the IP helper address on the relay agent, which is router 2 but we're still seeing problems
on the DHCP server.
We're getting information at the DHCP server based on this configuration. So we can ping the DHCP server,
DHCP messages are being forwarded to the server, but there's a problem on the DHCP server.
So let's have a look at the DHCP server configuration.
We have a pool configured.
This looks right.
Network default gateway or default router.
That needs to be in the same subnet as the interface where the client is configured.
So that looks right.
DNS server is 10.1.2.1
that is the IP address of the DHCP server, so that looks right, there are no excluded addresses in
the pool.
So we've got a very basic pool and an IP address configured on the gigabit interface.
Everything else looks standard, but I'm going to go through the show run slowly to see if you can
find the problem.
What is the issue in this configuration?
Pause the video if you need to, but there's a problem in this config show, IP, DHCP, Pool.
We have a pool next address to be allocated is 10.1.1.3 show IP, DHCP binding.
There is an address allocated to a client somewhere, but no address has been allocated to this client.
Now, this is something you need to remember for DHCP notice what happens when I type show IP route.
We're told that there's no gateway of last resort, there's no routing on the DHCP server.
The DHCP server has to have a route back to the subnet of the relay
agent, router 2 is receiving a DHCP broadcast on Gigabit 00.
But the DHCP server doesn't know how to get back there, so notice here, it can't get to that subnet because
it doesn't have a route in the routing table.
So IP route and I'll simply create a default route and point it to this IP address on router 2 which
is gigabit01.
So on the client
show IP interface brief, no IP addresses allocated yet, I'll force this by shutting the interface
down and then no shutting it.
Show IP interface brief
let's see if we get an IP address now and there we go, we've just been allocated an IP address by the
DHCP server.
This address has been allocated to the client.
Now, the reason that the binding was shown previously is that this address was allocated previously
to the client and then I broke the network.
So the same address has been allocated back to the client now since we fixed the network.
So this is the thing about DHCP servers on Cisco.
Make sure that they have a route back to the client.
In other words, they need to know how to get to the relay agent's IP address, otherwise they will
not allocate addresses to clients.
So now
we have a default route, and if we look at the binding, we should be able to ping the client and there
you go, we can ping 10.1.1.2.
So that was an example of how to troubleshoot DHCP.
Don't forget that your DHCP servers need rocks back to the relay agents in your topology.
I hope you found this video useful.
If it's been of benefit to you, please like it and please subscribe to my YouTube channel.
I wish you all the very best.