08-17-2020 06:25 AM
Hi all,
Networking newbie here.
I'd like to know how I can check if a router or switch is running DHCP. What command(s) can I use to display this information?
Thanks in advance.
Solved! Go to Solution.
08-17-2020 06:28 AM - edited 08-18-2020 02:23 AM
you can do below command : ( EDIT)
I will check if the configuration in the running configuration before i check other things
show run | in dhcp
if you see DHCP config in the running config :
i follow below syntax to check further :
To display the IP address bindings and their associated leases, use the following command:
#show ip dhcp binding
The following command displays any IP address conflicts that the router has detected in the DHCP address pool:
#show ip dhcp conflict
You can view the status of remote database backups with this command:
#show ip dhcp database
And you can see the global DHCP server statistics like this:
#show ip dhcp server statistics
08-17-2020 06:28 AM - edited 08-18-2020 02:23 AM
you can do below command : ( EDIT)
I will check if the configuration in the running configuration before i check other things
show run | in dhcp
if you see DHCP config in the running config :
i follow below syntax to check further :
To display the IP address bindings and their associated leases, use the following command:
#show ip dhcp binding
The following command displays any IP address conflicts that the router has detected in the DHCP address pool:
#show ip dhcp conflict
You can view the status of remote database backups with this command:
#show ip dhcp database
And you can see the global DHCP server statistics like this:
#show ip dhcp server statistics
08-27-2020 04:36 PM
I ran the #show ip dhcp conflict command and I was presented with an IP address.
How would I go about solving the IP conflict?
This is for a switch stack of three WS-C3850-48P.
Also, is there a command I can use to reboot the switch stack?
08-28-2020 01:03 AM
You no need to reboot the stack, you can clear the ip conflict using EEM script :
You can do 2 ways, based on SYSLOG message you can clear the clear ip dhcp conflict
or you can do regular basis as below :
event manager applet clear-dhcp-conflict
event timer cron cron-entry "0 0 * * *" <- adjust the cron entry based on the time and interval
action 1.0 cli command "enable"
action 2.0 cli command "clear ip dhcp conflict *"
action 3.0 syslog msg "Cleared IP DHCP conflict records"
08-17-2020 06:30 AM
Hi there,
On a router you would use show ip dhcp stats, on a modern switch running IOS-XE you would use show ip dhcp pool .
cheers,
Seb.
08-17-2020 02:25 PM
I would use show ip dhcp bindings and show ip dhcp pool
Regards, ML
**Please Rate All Helpful Responses **
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide