To clear the Dynamic Host Configuration Protocol (DHCP) snooping binding database, use the clear ip dhcp snooping binding command.
clear ip dhcp snooping binding [ vlan vlan-id [ mac mac-address ip ip-address ] [ interface { ethernet slot / port | port-channel channel-number }]]
|
vlan
vlan-id
|
(Optional) Specifies the VLAN ID of the DHCP snooping binding database entry to be cleared. Valid VLAN IDs are from 1 to 4094, except for the VLANs reserved for the internal switch use.
|
|
mac-address
mac-address
|
(Optional) Specifies the MAC address of the binding database entry to be cleared. Enter the
mac-address
argument in dotted hexadecimal format.
|
|
ip
ip-address
|
(Optional) Specifies the IPv4 address of the binding database entry to be cleared. Enter the
ip-address
argument in dotted decimal format.
|
|
interface
|
(Optional) Specifies the Ethernet or EtherChannel interface.
|
|
ethernet
slot
/
port
|
(Optional) Specifies the Ethernet interface of the binding database entry to be cleared.
|
|
port-channel
channel-number
|
(Optional) Specifies the Ethernet port channel of the binding database entry to be cleared.
|
None
Any command mode
|
Release
|
Modification
|
|
5.0(2)N2(1)
|
This command was introduced.
|
This example shows how to clear the DHCP snooping binding database:
This example shows how to clear a specific entry from the DHCP snooping binding database:
|
Command
|
Description
|
|---|---|
|
copy running-config startup-config
|
Copies the running configuration to the startup configuration.
|
|
show ip dhcp snooping binding
|
Displays IP-MAC address bindings, including the static IP source entries.
|
|
show running-config dhcp
|
Displays DHCP snooping configuration, including the IP Source Guard configuration.
|