A Guide to Configuring and Troubleshooting DHCP Snooping
by Darin Knobbe on Jul 9, 2020 1:45:00 PM
During the course network operations, DHCP snooping issues have often come up from our clients and their engineering teams. When they explain their situation, it boils down to being familiar with DHCP and having the confidence to handle the conditions. Today, we outline a resource to focus on DHCP snooping troubleshooting and configuration.
DHCP snooping issues mostly occur due to adding a new device in the environment without erasing previous configurations, man in the middle and bringing your own device (BYOD). Overall, DHCP snooping acts like a firewall between trusted and untrusted DHCP servers and devices. We'll outline how you can configure trusted and untrusted zones manually as well as a full approach to DHCP snooping.
As a layer 2 security technology incorporated into the operating system, DHCP prevents unauthorized DHCP servers offering IP addresses to DHCP clients.
How DHCP Snooping Works
Dynamic Host Configuration Protocol (DHCP) is at the heart of assigning IP addresses. The keyword in DHCP is "protocol", or the guiding rules and process for Internet connections for everyone, everywhere. DHCP is consistent, accurate and works the same for every computer. DHCP performs the below activities to handle DHCP issues in production networks. By default, DHCP is disabled. The first step is to enable DHCP per VLAN, then the snooping feature performs the following:
- Checks DHCP messages received from untrusted sources and filter all invalid messages
- Maintains the DHCP snooping binding database as it contains the untrusted hosts with leased IP address information
- Use the DHCP snooping binding database to validate subsequent requests from untrusted hosts
Licensing Requirements for DHCP Snooping
|NX-OS||DHCP snooping requires no license. Any feature not included in a license package is bundled with the Cisco NS-OS system images and is provided at no extra charge.|
Don't miss our configuration guide for a Cisco IOS DHCP Server. Click below to view the guide.
Looking for more configurations than DHCP? Check out all the guides we have for you ranging from configuring a Cisco Virtual Switching System (VSS) or routing between VLANs.
Let's Dive Into the Configuration
DHCP Snooping Configurations
You can configure DHCP snooping in 5 simple steps.
First, enable DHCP snooping globally with the following command:
Next, mention a VLAN you want to be secure through DHCP snooping:
Add VLANs with the following command:
Now, configure DHCP server port in "TRUST" with below mention:
The final basic configuration is to verify the configuration with show command as it is helpful during troubleshooting.
DHCP Snooping Troubleshooting
As mentioned above, the basic configurations help prepare for troubleshooting and make the process simple and straightforward. Here we'll take you through an example of common switch IOS errors.
DHCP Error Debug Log:
If you ever observed Error 1 during production network you should use the command "ip dhcp relaty information trusted" to tell the switch to ignore the unset giaddr field in the DHCP packet. You can also disable option 82 insertion using the "no ip dhcp-snooping information option" command in global configuration mode.
DHCP Error Debug Log:
Your console messages may show Error 2. The DHCP snooping, in this case, has detected a switch connected with your host trying to carry out a denial-of-service attack on another host in the network or on the same switch. Thus, the packet will be dropped.
Recommended Action: This is an informational message only appearing on the console logs. In this case, no action is required.
DHCP Error Debug Log:
Error 3 messages are very serious for your production network. These messages indicate that a client is being spoofed and a rogue DHCP server is in operation. In this case, you should trace the rogue DHCP server as soon as possible and disable the port. You can trace fake DHCP servers with the help of a mac address or IP address (ie.
Show mac-address (DHCP MAC) and
Show IP ARP (DHCP IP). If you have a valid contract with PivIT Global's OneCall maintenance team then contact us to avoid any disturbance in your production network.
About PivIT Global
PivIT Global provides the support you need through infrastructure, maintenance, and professional services. Contact us today to chat more about DHCP snooping or how we can support you through our third-party maintenance and field services offerings.
No Comments Yet
Let us know what you think