90
Displaying and maintaining DHCP snooping
Execute display commands in any view, and reset commands in user view.
Task Command
Display DHCP snooping entries.
display dhcp snooping binding
[
ip
ip-address [
vlan
vlan-id ] ]
Display Option 82 configuration information on
the DHCP snooping device.
display dhcp snooping information
{
all
|
interface
interface-type interface-number }
Display DHCP packet statistics on the DHCP
snooping device (centralized devices in
standalone mode).
display dhcp snooping packet statistics
Display DHCP packet statistics on the DHCP
snooping device (distributed devices in
standalone mode/centralized devices in IRF
mode).
display dhcp snooping packet statistics
[
slot
slot-number ]
Display DHCP packet statistics on the DHCP
snooping device (distributed devices in IRF
mode).
display dhcp snooping packet statistics
[
chassis
chassis-number
slot
slot-number ]
Display information about trusted ports.
display dhcp snooping trust
Display information about the file that stores
DHCP snooping entries.
display dhcp snooping binding database
Clear DHCP snooping entries.
reset dhcp snooping binding
{
all
|
ip
ip-address [
vlan
vlan-id ] }
Clear DHCP packet statistics on the DHCP
snooping device (centralized devices in
standalone mode).
reset dhcp snooping packet statistics
Clear DHCP packet statistics on the DHCP
snooping device (distributed devices
in
standalone mode/centralized devices in IRF
mode).
reset dhcp snooping packet statistics
[
slot
slot-number ]
Clear DHCP packet statistics on the DHCP
snooping device (distributed devices in IRF
mode).
reset dhcp snooping packet statistics
[
chassis
chassis-number
slot
slot-number ]
DHCP snooping configuration examples
Basic DHCP snooping configuration example
Network requirements
As shown in Figure 37:
• Configure the port GigabitEthernet 2/0/1 connected to the DHCP server as a trusted port.
• Configure other ports as untrusted ports.
• Enable DHCP snooping to record clients' IP-to-MAC bindings by reading DHCP-ACK
messages received from the trusted port and DHCP-REQUEST messages.