Transcript for:
DHCP Configuration and Troubleshooting

Welcome to Jeremy’s IT Lab. This is a free, complete course for the CCNA. If you like these videos, please subscribe to follow along with the series. Also, please like and leave a comment, and share the video to help spread this free series of videos. Thanks for your help. Also, remember to sign up via the link in the description to get all of the lab files for this course, so you can try it out yourself in packet tracer. If you want more labs like these, I highly recommend picking up Boson’s NetSim for the CCNA, click the link in the video description to check it out. It’s a network simulator like packet tracer, but it’s even better, and it includes all of these guided labs to not only help you get hands-on practice configuring and troubleshooting, but also deepen your understanding of the exam topics. I used it myself when studying for my certifications, so I feel confident about recommending it to all of you. If you want to get your own copy of NetSim, please follow the link in the video description. In this video we’ll configure DHCP, Dynamic Host Configuration Protocol. As you can see in the network diagram, PC1 and PC2 don’t have IP addresses yet, and R1’s G0/0 interface doesn’t have an IP address either. We’ll configure R2 as a DHCP server, R1 as a DHCP client on its G0/0 interface, and also configure R1 as a DHCP relay agent. Let’s get started. First, in step 1 we’ll configure three DHCP pools on R2, one for the 192.168.1.0/24 subnet, one for the 192.168.2.0/24 subnet, and one for the connection between R1 and R2. So, I’ll go on R2. ENABLE. CONF T. For POOL1 and POOL2 we are told to reserve the first 10 host addresses, I’ll configure those ranges first. Remember, the IP DHCP EXCLUDED-ADDRESS command is done from global config mode, not DHCP config mode. So, IP DHCP EXCLUDED-ADDRESS 192.168.1.1, that’s the low end of the range, then 192.168.1.10, the high end of the range. Now I’ll use the up arrow, and change these to 192.168.2.1 and 192.168.2.10. Okay, so that reserves the first 10 addresses of POOL1 and POOL2, they won’t be assigned to DHCP clients. Also I’ll reserve .1 from 203.0.113.0/30, which is R2’s address. IP DHCP EXCLUDED-ADDRESS 203.0.113.1. Notice if you want to reserve just a single address, you can do it like this, no need to specify a range. Now I’ll configure the first pool. IP DHCP POOL POOL1. First the address range. NETWORK 192.168.1.0 255.255.255.0. Then the DNS server, DNS-SERVER 8.8.8.8. Also the domain name, DOMAIN-NAME jeremysitlab.com. And the default gateway should be R1. DEFAULT-ROUTER 192.168.1.1. Okay, that’s all for POOL1, now POOL2. IP DHCP POOL POOL2. I’ll configure those parameters in the same order. NETWORK 192.168.2.0 255.255.255.0. DNS-SERVER 8.8.8.8. DOMAIN-NAME jeremysitlab.com. DEFAULT-ROUTER 192.168.2.1. That’s POOL2, finally I’ll configure POOL3. IP DHCP POOL POOL3. NETWORK 203.0.113.0 255.255.255.252. That’s it, we won’t be telling R1 about any DNS servers and such. Okay let’s check out the configurations. DO SHOW RUN | SECTION DHCP. Remember that you can use the ‘pipe’ with keywords like INCLUDE and SECTION to filter the output of show commands, very useful. Anyway, here you can see each of the DHCP pools we just configured. So, R2 is now configured as a DHCP server. I’m going to change the order of the tasks a bit and go on to the CLI of PC2 now. Let’s check if it can get an IP address from R2. IPCONFIG /RENEW. And there we go, it was assigned 192.168.2.11, the first available address. Let’s check more details. IPCONFIG /ALL. Okay, there’s the domain name jeremysitlab.com. The IP address and subnet mask, default gateway of R2, its DHCP server, also R2, and the DNS server 8.8.8.8. Looks good. Okay, now I’ll do step 2, which is to configure R1’s G0/0 interface as a DHCP client. So let’s go on R1. ENABLE. CONF T. INTERFACE G0/0. To make R1 a DHCP client on this interface, the command is IP ADDRESS DHCP. Now I’ll enable the interface, NO SHUTDOWN. So, R1 will broadcast a DHCP Discover message to R2, which should reply with a DHCP Offer, then R1 will send a DHCP Request, and finally R2 sends a DHCP Ack, and as you can see here, R1 was assigned the IP address 203.0.113.2, with a /30 mask. Next, in step 3 let’s configure R1 as a DHCP relay agent for the 192.168.1.0/24 subnet. It’s only a single command, but which interface should we configure it on? It should be the interface connected to the DHCP clients, so R1’s G0/1 interface. INTERFACE G0/1. The command is IP HELPER-ADDRESS, and then the IP address of the DHCP server, which is R2, so 203.0.113.1. Okay, that’s it, R1 is now a DHCP relay agent. Finally let’s see if PC1 can get an address from R2, the DHCP server, via R1, the DHCP relay agent. I’ll go on to the CLI of PC1. And let’s try to get an IP address. IPCONFIG /RENEW. When I was testing out this lab I had to do the command a few times, some processes like ARP are a little slow in Packet Tracer, but as you can see PC1 was able to get an IP address from R2. Let’s check the details. IPCONFIG /ALL. Looks like it has all of the information we configured in the pool on R2, domain name, the address is in the correct range, subnet mask and default gateway are correct, and so is the DNS server. Okay, in this lab we configured a DHCP server, DHCP client, and DHCP relay agent in Cisco IOS. That’s all for this lab. Next let’s take a look at a bonus lab in Boson Software’s NetSim for CCNA. Okay here's today's Boson NetSim lab preview. There are five DHCP labs in Boson NetSim for CCNA. And the one I have selected for today is this one, troubleshooting DHCP. So here's Router1, a DHCP server. And it's connected to three LANs, here. VLAN100, VLAN200, and VLAN300. Okay, this is the IP address information, looks like VLAN100 is 192.168.1.0/24, and then 200 and 300 are 2.0/24 and 3.0/24. Okay, these are the tasks. For this lab preview I'm just going to do task 1 and task 2. And you can do task 3 on your own if you get NetSim. Okay, so let's check out task 1. After some configuration changes are made to the network, users are reporting that PCs in VLAN100, 200, and 300 are no longer configured with IP addressing information. In this task you will verify that none of the DHCP clients are able to obtain IP addressing information from Router1. Okay, so step 1. On each PC, verify that IP addressing information is missing from the configurations. Okay, so let's do that on each PC. Okay, PC1 first. IPCONFIG. Indeed it's all 0.0.0.0, so no configuration on PC1. Or PC2. Or PC3. Okay, on Router1 display information about DHCP bindings. Has Router1 binded any IP addressing information to any other devices in the topology? Okay let's check here. The command is SHOW IP DHCP BINDING. Okay, nothing displays here so there are no bindings. Router1 has not leased any addresses to DHCP clients. Okay, from Router1 attempt to ping Switch1's, Switch2's, and Switch3's VLAN interfaces. So each of the switches has an IP address on its VLAN interface which was statically assigned. So let's see if Router1 can ping those. First Switch1. Okay, no problems there. Switch2. And Switch3. Okay, no problems. Next, step 4. On each switch in the topology verify that the port connecting to the relevant PC is in the UP state. Okay, let's do that. So, the interface on each switch is FastEthernet0/12, that is connected to the PC. Okay, I'll look on Switch1 first. I'll use SHOW IP INTERFACE BRIEF. And FastEthernet0/12 is UP and UP. How about on Switch2? Okay, UP and UP. And Switch3. Again, UP/UP. Okay, so looks like there are no problems with physical connectivity here. So DHCP, something in Router1's DHCP configuration is likely the problem, but let's check in task 2. Here, troubleshoot DHCP services. In this task you will troubleshoot the DHCP configuration on Router1. You have completed this task when Router1 is able to successfully bind DHCP addresses to clients. The DHCP pools in this lab should contain a range of 254 available IP addresses. So that is /24. But the first 9 addresses should be excluded from that range. Okay, let's do that. So, step 1 on Router1. Display the DHCP pool configuration. Okay, so SHOW, I'll use SHOW RUN, this is very convenient, SHOW RUN | SECTION DHCP. Okay, what do you notice about the size of VLAN200 compared to the number of leased addresses? Well, there were no leased addresses. The size is /24, so Router1 is not leasing any addresses at the moment. Actually there's another command you can use. I didn't show this in the lecture video but SHOW IP DHCP POOL. And here you can see that same information for VLAN200. Total addresses, 254. Leased addresses, 0. Okay, display the DHCP server statistics. Okay, so this is another command I didn't show in the lecture video, SHOW IP DHCP SERVER STATISTICS. Okay, so we can see there are three address pools but no messages, no DHCP messages received or sent. Okay, so here in step 3 it says, based on the data you have collected so far, what is most likely preventing the DHCP server from assigning IP addresses to clients in VLAN200? Okay, let me look at that configuration once more. Okay I think I found it. So, this is another command I didn't show in the lecture video because it's usually enabled by default. That is the SERVICE DHCP command. So, if this command is enabled it means the router will respond to DHCP messages. If this is disabled, as is the case now, it will just drop any DHCP messages. So on Cisco routers it's enabled by default, but it looks like someone disabled it on this router. So that is why Router1 is not receiving or responding to any DHCP messages. Okay, step 5. Issue any commands that are required to solve the problem you have identified. Okay, so to disable it it was NO SERVICE DHCP, so to enable it it's SERVICE DHCP. And that's it. Okay, step 6, display DHCP binding information. Has the DHCP server binded IP addressing information to any devices in the topology? If so, which devices? Alright let's check those bindings again. Okay looks like two devices have gotten a DHCP address. One in VLAN200 and one in VLAN300. So it seems there is still a problem here with VLAN100, probably some configuration on Router1. But let's see, let's confirm that this is PC2 and this is PC3. Okay, so 192.168.2.10. Oh yes, it displays it right here, mask /24. IPCONFIG /ALL. Okay, looks good. And how about PC3? This should be 192.168.3.10. And yes it is, that's correct. Okay, perfect. So it looks like that NO SERVICE DHCP command was one of the problems, but there is clearly another problem because PC1 still doesn't have an IP address. So, I assume in task 3 we would solve that, but I'll leave today's Boson NetSim lab preview here. Okay, so that was a quick look at Boson Software's NetSim for CCNA. If you want to get NetSim, please follow the link in the video description. Before finishing today’s video I want to thank my JCNP-level channel members. To join, please click the ‘Join’ button under the video. Thank you to Brandon, Samil, Aaron, Tech Alameda, Marcel, Magrathea, Kone, Donald, C Mohd, Gustavo, Anthony, Biraj, Junhong, Njabulo, Benjamin, Tshepiso, Justin, Prakaash, Nasir, Erlison, Apogee, Marko, Daming, Jhilmar, Ed, Value, John, Funnydart, Velvijaykum, Mark, Yousif, Boson Software, Devin, Lito, Yonatan, and Vance. Sorry if I pronounced your name incorrectly, but thank you so much for your support. This is the list of JCNP-level members at the time of recording by the way, January 29th 2020. If you signed up recently and your name isn’t on here don’t worry, you’ll be in future videos. Thank you for watching. Please subscribe to the channel, like the video, leave a comment, and share the video with anyone else studying for the CCNA. If you want to leave a tip, check the links in the description. I'm also a Brave verified publisher and accept BAT, or Basic Attention Token, tips via the Brave browser. That's all for now.