DHCP Snooping
Synchronized Transcript
28 cues indexed • Click dialogue or words to jumpWelcome 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. If you want more labs like this, I highly recommend Boson Software’s NetSim for CCNA.
NetSim is a network simulator like Packet Tracer, but it’s far more powerful and contains over 100 detailed guided labs covering the CCNA exam topics.
If you want to get NetSim, follow the link in the description. In this video we’ll configure DHCP snooping on SW1 and SW2.
This is the same topology as in the lecture video, so you should be able to do this lab on your own. Let’s get right into it by configuring R1 as a DHCP server for this local network.
ENABLE. CONF T. Let’s exclude 192.168.1.1 to 192.168.1.9 from the pool.
Remember, this part of the configuration is done outside of the DHCP pool. IP DHCP EXCLUDED-ADDRESS 192.168.1.1 192.168.1.9.
Okay, now I’ll configure the pool. IP DHCP POOL POOL1. I’ll configure the 192.168.1.0/24 subnet.
NETWORK 192.168.1.0 255.255.255.0. And then configure R1 as the default gateway. DEFAULT-ROUTER 192.168.1.1.
Okay, that’s all the configuration needed on R1. Next let’s configure DHCP snooping on SW1 and SW2.
I’ll go on SW1 first. ENABLE. CONF T. First, enable DHCP snooping globally. IP DHCP SNOOPING.
But, that isn’t enough to actually enable DHCP snooping. We need to tell SW1 which VLANs to enable it for. Only VLAN 1 is being used in this network, so IP DHCP SNOOPING VLAN 1.
Okay, now VLAN 1 is active. However, all interfaces are untrusted, so DHCP won’t be able to operate properly. Let’s configure G0/2, connected to R1, as a trusted port.
INTERFACE G0/2. IP DHCP SNOOPING TRUST. EXIT. Okay, that’s all for SW1 for now. There’s one command I left out, but we’ll come back to it later.
Now I’ll do the exact same configurations on SW2. ENABLE. CONF T. IP DHCP SNOOPING.
IP DHCP SNOOPING VLAN 1. G0/1 is the uplink leading toward R1, so INTERFACE G0/1.
IP DHCP SNOOPING TRUST. Okay, now let’s try to get an IP address on PC1. To do that I’ll use the command IPCONFIG /RENEW.
But, it’s going to fail. Why is that? The correct interfaces are configured as trusted, and PC1 isn’t doing MAC address spoofing or anything like that.
Well, let’s check by switching to simulation mode. And then do IPCONFIG /RENEW again. The DHCP message goes to SW2 and then SW1, and then it stops there.
Why? Let’s check this message here, as it was received by SW1. Down at the bottom of the Inbound PDU details, you can see the DHCP Agent Information Option.
That’s the problem. SW2 added this option to PC1’s message. SW1 received it on an untrusted port, so it discarded it.
Let’s go back to realtime mode now, and fix that. On SW1 first, I’ll configure NO IP DHCP SNOOPING INFORMATION OPTION.
By the way, you can see the syslog messages here for when SW1 dropped the DHCP message. Notice it says option82 value on untrusted port, so that’s why it was dropped.
And then I’ll configure the same on SW2 also. NO IP DHCP SNOOPING INFORMATION OPTION. I’ve explained why we need to use this command in the lecture video so I won’t go over it again.
Just remember that it’s necessary if the switch isn’t acting as a DHCP relay agent. Okay, let’s try that again on PC1.
IPCONFIG /RENEW. Okay, this time it works and PC1 was able to get an IP address. So, in this lab we configured DHCP snooping.
It’s fairly simple to configure. The only thing that can be tricky is remembering to disable option 82. As you can see, it can cause problems if you don’t.
Okay, that’s all for this lab. Now let’s take a look at a lab in Boson Software’s NetSim for CCNA.