DHCP Snooping
DHCP Snooping
- DHCP Snooping inspects DHCP packets to prevent networking problems and attacks from rogue DHCP servers
- Compares addresses on the DHCP Snooping binding table
- It identifies ports as Trusted or Untrusted
- Trusted ports forward all DHCP messages without inspection
- Untrusted ports act on all DHCP messages
- Discard DHCP server messages
- Inspect DHCP client messages
- Forwards messages that match its configured information on the DHCP snooping table, and discards messages that don't match
- Discover/Request DHCP Messages
- Check the frame's source MAC and the DHCP message's CHADDR (Client Hardware Address, i.e. the client's MAC address) fields match
- Release/Decline DHCP Messages
- Check the source IP and receiving interface match the entry on the binding table
- Discover/Request DHCP Messages
- Forwards messages that match its configured information on the DHCP snooping table, and discards messages that don't match
- Rate Limiting
- Automatically disables interfaces that send more requests than a configured threshold
- Error Disabled interfaces can be manually or automatically returned to service
- DHCP Option 82 (aka
information option)- Optionally and only sent by DHCP relay agents on messages they forward to the DHCP Server
- Provides information about which relay agent is forwarding the message, the VLAN, interface, etc.
- By default, DHCP Snooping tags all messages from clients with option 82
- However, Layer 2 Switches drop incoming DHCP packets with Option 82 on untrusted ports by default
- Similarly, Cisco Routers acting as DHCP server will drop
- Error message keywords:
inconsistent relay informationrelay information option exists, but giaddr is zero
- Error message keywords:
- It is therefore important to disable option 82 when configuring DHCP Snooping
config# no ip dhcp snooping information option
- Optionally and only sent by DHCP relay agents on messages they forward to the DHCP Server
DHCP Snooping config
- Enable IP DHCP snooping
2.config# ip dhcp snooping - Assign a VLAN to be snooped
config# ip dhcp snooping vlan <vlan ID>
- Disable IP DHCP snooping information
config# no ip dhcp snooping information option
- Trust the server-facing interface
config-if# ip dhcp snooping trust
- Check DHCP snooping table
#sho ip dhcp snooping binding
- Configure DHCP rate limiting
config-if-range# ip dhcp snooping limit rate <allowed messages per second>
- Configure errdisable recovery
config# errdisable recovery cause dhcp-rate-limit# show errdisable recovery
Metadata
OSI or TCP/IP Layer
CCNA Exam Topic
Contributors
Sources
Configuring DHCP Snooping - Cisco Systems
Source: Original ↩︎
