Users Guide

When you enable DHCP snooping, the relay agent builds a binding table — using DHCPACK messages — containing the client MAC
address, IP addresses, IP address lease time, port, VLAN ID, and binding type. Every time the relay agent receives a DHCPACK on a
trusted port, it adds an entry to the table.
The relay agent checks all subsequent DHCP client-originated IP trac (DHCPRELEASE, DHCPNACK, and DHCPDECLINE) against
the binding table to ensure that the MAC-IP address pair is legitimate and that the packet arrived on the correct port. Packets that
do not pass this check are forwarded to the server for validation. This checkpoint prevents an attacker from spoong a client and
declining or releasing the real client’s address. Server-originated packets (DHCPOFFER, DHCPACK, and DHCPNACK) that arrive on
a not trusted port are also dropped. This checkpoint prevents an attacker from acting as an impostor as a DHCP server to facilitate a
man-in-the-middle attack.
Binding table entries are deleted when a lease expires, or the relay agent encounters a DHCPRELEASE, DHCPNACK, or
DHCPDECLINE.
NOTE: DHCP server packets are dropped on all not trusted interfaces of a system congured for DHCP snooping. To
prevent these packets from being dropped, congure ip dhcp snooping trust on the server-connected port.
Enabling DHCP Snooping
To enable DHCP snooping, use the following commands.
1. Enable DHCP snooping globally.
CONFIGURATION mode
ip dhcp snooping
2. Specify ports connected to DHCP servers as trusted.
INTERFACE mode
ip dhcp snooping trust
3. Enable DHCP snooping on a VLAN.
CONFIGURATION mode
ip dhcp snooping vlan
Adding a Static Entry in the Binding Table
To add a static entry in the binding table, use the following command.
Add a static entry in the binding table.
EXEC Privilege mode
ip dhcp snooping binding mac
Clearing the Binding Table
To clear the binding table, use the following command.
Delete all of the entries in the binding table.
EXEC Privilege mode
clear ip dhcp snooping binding
Displaying the Contents of the Binding Table
To display the contents of the binding table, use the following command.
Display the contents of the binding table.
EXEC Privilege mode
show ip dhcp snooping
Dynamic Host Conguration Protocol (DHCP)
293