Show IP DHCP binding and conflict command usage and output
When DHCP servers lease the IP addresses, it creates a binding table of IP addresses with the Mac address of the device, this feature enables the DHCP router to assign the same IP address to the host next time in case if IP address is released by the host.
Usually when the host device powers off, it releases the IP address, and when it’s powered on, it again requests the IP address from the DHCP server. When the host device requests the IP address again, the router checks its Binding table to see if that specific host Mac address is already present in the binding table and assigns the same IP address again to the host.
The above scenario is not possible if the IP address has been assigned to the new host and a new entry has been created in the binding table for that specific IP address.
We can see in the image below that 4 PCs are assigned the IP address from the DHCP server.
We can see in the command output below that 4 entries exist in the binding table.
Router#show ip dhcp binding
IP address Client-ID/ Lease expiration Type
192.168.1.6 0009.7C75.4E08 — Automatic
192.168.1.7 0060.2F2E.5A17 — Automatic
192.168.1.8 0000.0C81.38CC — Automatic
192.168.1.9 00E0.F70C.C247 — Automatic
We can use the following command to check the binding for the single IP address.
Clear DHCP bindings
To clear the binding for the single IP, we can use the following command
R1#clear ip dhcp binding ?
* Clear all automatic bindings
A.B.C.D Clear a specific binding
R1#clear ip dhcp binding A.B.C.D
To clear all DHCP bindings, we can use the following command
R1#clear ip dhcp binding *
Show IP DHCP conflicts
DHCP conflicts occur when the DHCP server assigns the same IP address to 2 devices, Whenever the conflict happens, hosts like PCs also notify us about the IP conflicts.
To check the DHCP conflicts, we can use the following command.
R1#show ip dhcp conflict
Detection method Detection time VRF
There are no conflicts at the moment so the output of the command is empty, this command will output the existing conflicts in the network.
To solve the issue, we can clear the IP address conflicts by using the following commands
R1#clear ip dhcp conflict ?
* Clear all address conflicts
A.B.C.D Clear a specific conflict
We can specify a specific IP to remove the conflict for a single IP or we can remove all conflicts together by using the * symbol.