1 00:00:09,240 --> 00:00:17,370 This is one of multiple videos discussing dynamic host configuration protocol or DHCP, and specifically 2 00:00:17,610 --> 00:00:21,090 how to troubleshoot DHCP. In this topology 3 00:00:21,120 --> 00:00:28,650 we've got a client connected to a router connected to a DHCP server, and we've been told that the client 4 00:00:28,920 --> 00:00:35,910 is not receiving IP addresses from the DHCP server. In this example, rather than using physical PCs 5 00:00:35,910 --> 00:00:43,500 I've got iOSV Routers acting as our DHCP server and DHCP client. 6 00:00:44,570 --> 00:00:48,740 So here's the client, show IP interface brief. 7 00:00:49,740 --> 00:00:57,120 Notice the client hasn't got an address assigned to gigabit00 DHCP is being used 8 00:00:58,040 --> 00:01:06,230 but no address has been assigned. So let's shut the interface down and then no shut it 9 00:01:07,260 --> 00:01:08,790 to test what's happening. 10 00:01:10,880 --> 00:01:19,190 Interfaces come up, show IP interface, brief interfaces, up up no address has been assigned through 11 00:01:19,190 --> 00:01:27,110 DHCP. So on the DHCP server, let's run a debug, so debug IP DHCP 12 00:01:28,590 --> 00:01:36,120 server, and I'm going to go for packets to see detailed information. We're already seeing something 13 00:01:36,120 --> 00:01:36,450 here. 14 00:01:37,580 --> 00:01:48,710 Says clients VPN is something no option 125 DHCP Discover received from a client through a relay of 10. 15 00:01:48,710 --> 00:01:50,830 1.1.254. 16 00:01:51,530 --> 00:01:56,660 So a DHCP message is being relayed by the router. 17 00:01:57,830 --> 00:02:03,380 We can see in this example that router 2 has this IP address on the interface facing the client, 18 00:02:03,740 --> 00:02:06,370 and that's the address that we see on the DHCP server 19 00:02:06,770 --> 00:02:10,870 but we're told that option 125 is not present in the message. 20 00:02:11,420 --> 00:02:14,540 There's a problem with option 125. 21 00:02:15,350 --> 00:02:22,710 You can find information about option 125 in this RFC, vendor identifying vendor options for DHCP. 22 00:02:23,990 --> 00:02:28,370 The problem here is that option 125 is vendor-dependent. 23 00:02:29,280 --> 00:02:35,730 So we're seeing a lot of messages stating that Option 125 is not present in the message. 24 00:02:36,360 --> 00:02:41,340 So let's have a look at the relay agent show run interface Gigabit00. 25 00:02:42,560 --> 00:02:50,690 Now, we do see the IP helper address on the relay agent, which is router 2 but we're still seeing problems 26 00:02:50,840 --> 00:02:52,310 on the DHCP server. 27 00:02:53,300 --> 00:03:02,660 We're getting information at the DHCP server based on this configuration. So we can ping the DHCP server, 28 00:03:02,780 --> 00:03:09,910 DHCP messages are being forwarded to the server, but there's a problem on the DHCP server. 29 00:03:09,920 --> 00:03:13,180 So let's have a look at the DHCP server configuration. 30 00:03:13,790 --> 00:03:15,850 We have a pool configured. 31 00:03:16,430 --> 00:03:17,330 This looks right. 32 00:03:17,660 --> 00:03:21,230 Network default gateway or default router. 33 00:03:22,070 --> 00:03:27,800 That needs to be in the same subnet as the interface where the client is configured. 34 00:03:28,430 --> 00:03:29,510 So that looks right. 35 00:03:29,870 --> 00:03:32,600 DNS server is 10.1.2.1 36 00:03:33,640 --> 00:03:41,320 that is the IP address of the DHCP server, so that looks right, there are no excluded addresses in 37 00:03:41,320 --> 00:03:41,870 the pool. 38 00:03:42,370 --> 00:03:47,650 So we've got a very basic pool and an IP address configured on the gigabit interface. 39 00:03:49,490 --> 00:03:56,030 Everything else looks standard, but I'm going to go through the show run slowly to see if you can 40 00:03:56,030 --> 00:03:57,230 find the problem. 41 00:03:57,650 --> 00:04:00,740 What is the issue in this configuration? 42 00:04:02,450 --> 00:04:11,240 Pause the video if you need to, but there's a problem in this config show, IP, DHCP, Pool. 43 00:04:14,150 --> 00:04:25,490 We have a pool next address to be allocated is 10.1.1.3 show IP, DHCP binding. 44 00:04:26,060 --> 00:04:32,390 There is an address allocated to a client somewhere, but no address has been allocated to this client. 45 00:04:33,380 --> 00:04:38,540 Now, this is something you need to remember for DHCP notice what happens when I type show IP route. 46 00:04:39,620 --> 00:04:45,490 We're told that there's no gateway of last resort, there's no routing on the DHCP server. 47 00:04:46,070 --> 00:04:51,410 The DHCP server has to have a route back to the subnet of the relay 48 00:04:51,410 --> 00:04:57,560 agent, router 2 is receiving a DHCP broadcast on Gigabit 00. 49 00:04:58,520 --> 00:05:09,440 But the DHCP server doesn't know how to get back there, so notice here, it can't get to that subnet because 50 00:05:09,440 --> 00:05:11,330 it doesn't have a route in the routing table. 51 00:05:12,470 --> 00:05:21,950 So IP route and I'll simply create a default route and point it to this IP address on router 2 which 52 00:05:21,950 --> 00:05:23,210 is gigabit01. 53 00:05:24,980 --> 00:05:26,180 So on the client 54 00:05:28,180 --> 00:05:34,180 show IP interface brief, no IP addresses allocated yet, I'll force this by shutting the interface 55 00:05:34,180 --> 00:05:36,580 down and then no shutting it. 56 00:05:38,750 --> 00:05:41,810 Show IP interface brief 57 00:05:43,260 --> 00:05:50,040 let's see if we get an IP address now and there we go, we've just been allocated an IP address by the 58 00:05:50,090 --> 00:05:51,030 DHCP server. 59 00:05:51,570 --> 00:05:54,000 This address has been allocated to the client. 60 00:05:54,720 --> 00:06:02,580 Now, the reason that the binding was shown previously is that this address was allocated previously 61 00:06:02,580 --> 00:06:05,240 to the client and then I broke the network. 62 00:06:05,580 --> 00:06:10,590 So the same address has been allocated back to the client now since we fixed the network. 63 00:06:11,220 --> 00:06:15,110 So this is the thing about DHCP servers on Cisco. 64 00:06:15,570 --> 00:06:18,800 Make sure that they have a route back to the client. 65 00:06:19,440 --> 00:06:26,850 In other words, they need to know how to get to the relay agent's IP address, otherwise they will 66 00:06:26,850 --> 00:06:29,650 not allocate addresses to clients. 67 00:06:30,600 --> 00:06:31,380 So now 68 00:06:32,900 --> 00:06:39,800 we have a default route, and if we look at the binding, we should be able to ping the client and there 69 00:06:39,800 --> 00:06:42,310 you go, we can ping 10.1.1.2. 70 00:06:42,980 --> 00:06:45,600 So that was an example of how to troubleshoot DHCP. 71 00:06:46,280 --> 00:06:52,180 Don't forget that your DHCP servers need rocks back to the relay agents in your topology. 72 00:06:52,940 --> 00:06:54,530 I hope you found this video useful. 73 00:06:54,980 --> 00:07:00,200 If it's been of benefit to you, please like it and please subscribe to my YouTube channel. 74 00:07:00,620 --> 00:07:02,270 I wish you all the very best.