1 00:00:08,830 --> 00:00:15,190 This is one of multiple videos discussing the troubleshooting of dynamic host configuration protocol, 2 00:00:15,490 --> 00:00:18,190 or DHCP. In this topology 3 00:00:18,220 --> 00:00:26,590 I've got a iOSV router acting as a PC and an iOSV acting as a DHCP server. 4 00:00:27,430 --> 00:00:33,280 I've also got a router that's simply doing routing from one subnet in the network to another. 5 00:00:34,230 --> 00:00:41,970 We've been told that the DHCP client in this topology is not receiving an IP address and we need to troubleshoot 6 00:00:41,970 --> 00:00:42,610 this issue. 7 00:00:43,200 --> 00:00:44,670 So let's look at what's going on. 8 00:00:45,960 --> 00:00:55,770 OK, so here's the client show, IP interface brief, the client is configured for DHCP, so Gigabit 9 00:00:55,770 --> 00:01:02,030 00, the interface used by the router to connect to the network is currently up, up. 10 00:01:02,760 --> 00:01:07,200 In other words, layer 1 and layer 2 are working, but no IP address is 11 00:01:07,200 --> 00:01:15,840 assigned. Show run interface Gigabit00 shows us that the interface is configured for DHCP, but once again 12 00:01:15,840 --> 00:01:18,330 we're not getting an address assigned. 13 00:01:19,470 --> 00:01:26,670 Let's have a look at router 2, which is doing inter VLAN routing show IP interface brief, we can see 14 00:01:26,670 --> 00:01:31,890 that an IP address is configured on gigabit00 as well as gigabit01. 15 00:01:32,520 --> 00:01:36,720 Let's have a look at the DHCP server show IP Interface Brief. 16 00:01:37,620 --> 00:01:40,340 This is the IP address of the DHCP server. 17 00:01:41,190 --> 00:01:44,490 Can the router ping the DHCP server? 18 00:01:44,520 --> 00:01:45,420 Yes, it can. 19 00:01:46,470 --> 00:01:54,750 So we can ping from the router to the DHCP server show run interface gigabit 00, notice this command 20 00:01:54,750 --> 00:01:55,970 IP helper address. 21 00:01:56,370 --> 00:01:57,550 So that looks good. 22 00:01:58,200 --> 00:01:58,470 Helper 23 00:01:58,500 --> 00:02:02,190 address is configured to point to the DHCP server. 24 00:02:03,160 --> 00:02:10,630 Let's run a Wireshark capture here to see if any DHCP messages are being sent to the DHCP server. 25 00:02:12,820 --> 00:02:19,360 So I'm capturing on this link what I'll do is shut and no shut the interface on the client. 26 00:02:21,200 --> 00:02:29,930 To get it to request an IP address from the DHCP server that will allow us to see whether the DHCP requests 27 00:02:29,930 --> 00:02:32,220 are getting to the DHCP server. 28 00:02:32,960 --> 00:02:39,440 So in Wireshark, we are seeing a number of DHCP messages of filter for BOOTP. 29 00:02:40,490 --> 00:02:45,620 We can see that the router is requesting an IP address on behalf of the client. 30 00:02:47,330 --> 00:02:50,450 So here's the bootstrap protocol discover message. 31 00:02:51,290 --> 00:03:01,190 Client IP address is not configured, the relay agent is router 2. So show IP interface brief the router 32 00:03:02,780 --> 00:03:10,490 is receiving a DHCP Discover from the client on this interface and is then forwarding that to the DHCP server 33 00:03:11,880 --> 00:03:15,180 so we're definitely getting DHCP Discover messages. 34 00:03:16,370 --> 00:03:17,240 On this link 35 00:03:18,460 --> 00:03:26,740 let's do a debug on the DHCP server. So debug IP, DHCP server, and let's look at events. 36 00:03:29,440 --> 00:03:32,350 I'll force the client to request an address again. 37 00:03:35,280 --> 00:03:40,410 OK, so something's happening, let's stop debugging. 38 00:03:43,040 --> 00:03:49,420 So we're getting a discover from the client, so it's definitely being received by the DHCP server, 39 00:03:50,000 --> 00:03:56,070 the servers receiving the Discover message, but can you see what's wrong in the output here? 40 00:03:56,600 --> 00:03:57,590 What's the problem? 41 00:03:58,340 --> 00:03:59,500 Let me give you another hint. 42 00:03:59,510 --> 00:04:03,370 Show IP DHCP pool. 43 00:04:03,890 --> 00:04:05,320 What's the problem? 44 00:04:06,460 --> 00:04:12,010 Can you see the issue in the debug and in the show command? 45 00:04:13,000 --> 00:04:17,560 OK, notice this output, we're told that the pool is empty. 46 00:04:17,920 --> 00:04:21,519 Notice this, there's a problem with the addresses allocated. 47 00:04:25,710 --> 00:04:31,590 The server is definitely receiving messages, so we were receiving discover messages. 48 00:04:32,100 --> 00:04:34,080 There's one address pool available. 49 00:04:35,320 --> 00:04:41,420 OK, see if you can see the problem in the running-config of the router. 50 00:04:42,000 --> 00:04:43,070 What's the issue here? 51 00:04:45,190 --> 00:04:54,790 Notice IP DHCP excluded-address 10.1.1.1 to 10.1.1.255 we've excluded all the addresses 52 00:04:54,790 --> 00:04:59,710 from the DHCP pool, so no IP addresses can be allocated to the client. 53 00:05:00,940 --> 00:05:02,980 Show IP DHCP pool, 54 00:05:03,640 --> 00:05:11,950 we have a pool in this range, but no addresses are available because we've excluded them, so 55 00:05:13,680 --> 00:05:15,150 Let's remove the statement 56 00:05:19,490 --> 00:05:29,300 and use the command IP DHCP excluded-address 10.1.1.1 to let's say 10.1.100. Show run 57 00:05:32,470 --> 00:05:36,370 Excluded addresses are now in this range for the pool. 58 00:05:37,770 --> 00:05:45,900 Notice on the client, an address is now assigned address 101, so show IP interface brief. 59 00:05:47,700 --> 00:05:54,570 The client has been allocated an IP address and should hopefully at this point be able to ping the DHCP 60 00:05:54,570 --> 00:05:55,740 server, which it can. 61 00:05:56,750 --> 00:06:05,810 Be careful with the excluded addresses in the pool, so show IP DHCP binding, we now have an address 62 00:06:05,810 --> 00:06:10,640 allocated to the client, show IP DHCP pool. 63 00:06:11,150 --> 00:06:13,310 One address is now least. 64 00:06:13,820 --> 00:06:18,260 Next address to allocate is 10.1.1.102. 65 00:06:20,400 --> 00:06:24,910 Notice previously that the current index was set to 0.0.0.0. 66 00:06:25,200 --> 00:06:28,190 In other words, no addresses would be allocated to clients. 67 00:06:29,190 --> 00:06:32,970 But now the next address that will be allocated is 10.1. 68 00:06:32,970 --> 00:06:34,310 .1.102. 69 00:06:35,100 --> 00:06:42,390 So if I change the MAC address on this client to something 70 00:06:45,020 --> 00:06:50,300 Like this and no shut the interface down and then no shut it. 71 00:06:51,940 --> 00:06:56,710 What we should see is that the index changes and there you go. 72 00:06:57,990 --> 00:07:04,350 Because the client has been allocated this address, so the next available address is this one. 73 00:07:04,950 --> 00:07:07,860 So that was an example of how to troubleshoot DHCP. 74 00:07:08,430 --> 00:07:10,320 I hope you found the video useful. 75 00:07:10,800 --> 00:07:12,210 If you did, please like it. 76 00:07:12,510 --> 00:07:15,690 And please also subscribe to my YouTube channel. 77 00:07:16,020 --> 00:07:17,760 I wish you all the very best.