Showing DHCP Status

Problem

You want to display the status of the DHCP server functions on the router.

Solution

To display the IP address bindings and their associated leases, use the following command:

Router1#show ip dhcp binding

The following command displays any IP address conflicts that the router has detected in the DHCP address pool:

Router1#show ip dhcp conflict

You can view the status of remote database backups with this command:

Router1#show ip dhcp database

And you can see the global DHCP server statistics like this:

Router1#show ip dhcp server statistics

 

Discussion

To display the status of the DHCP service, use the show ip dhcp EXEC command. If you add the keyword binding, this command displays the current DHCP bindings, which include the assigned IP addresses, the associated client MAC addresses, and the lease expiration time:

Router1#show ip dhcp binding
IP address Hardware address Lease expiration Type
172.25.1.51 0100.0103.85e9.87 Apr 10 2006 08:55 PM Automatic
172.25.1.52 0100.50da.2a5e.a2 Apr 10 2006 09:00 PM Automatic
172.25.1.53 0100.0103.ea1b.ed Apr 10 2006 08:58 PM Automatic
Router1#

To view the IP addresses that are currently in conflict, use the conflict keyword. This command displays all of the IP addresses that the router has discovered conflicts for, and how the conflict was discovered:

Router1#show ip dhcp conflict 
IP address Detection method Detection time
172.25.1.51 Ping Apr 09 2006 09:08 PM
172.25.1.54 Gratuitous ARP Apr 09 2006 10:00 PM
Router1#

With the database keyword, you can view the database configuration and status. This command shows all of the configured remote database servers and the current read and write status reports:

Router1#show ip dhcp database 
URL : ftp://dhcp:bindsave@172.25.1.1/dhcp-leases
Read : Never
Written : Apr 09 2006 10:24 PM
Status : Last write succeeded. Agent information is up-to-date.
Delay : 300 seconds
Timeout : 300 seconds
Failures : 1
Successes: 30

Router1#

Finally, the statistics keyword lets you view the overall DHCP statistics:

Router1#show ip dhcp server statistics 
Memory usage 17996
Address pools 4
Database agents 1
Automatic bindings 2
Manual bindings 1
Expired bindings 3
Malformed messages 0

Message Received
BOOTREQUEST 0
DHCPDISCOVER 63
DHCPREQUEST 203
DHCPDECLINE 1
DHCPRELEASE 27
DHCPINFORM 19

Message Sent
BOOTREPLY 0
DHCPOFFER 63
DHCPACK 139
DHCPNAK 2
Router1#

This command displays the high-level DHCP statistics, including the number of bindings, address pools, as well as the number of sent and received messages.

See Also

Recipe 20.4


Router Configuration and File Management

Router Management

User Access and Privilege Levels

TACACS+

IP Routing

RIP

EIGRP

OSPF

BGP

Frame Relay

Handling Queuing and Congestion

Tunnels and VPNs

Dial Backup

NTP and Time

DLSw

Router Interfaces and Media

Simple Network Management Protocol

Logging

Access-Lists

DHCP

NAT

First Hop Redundancy Protocols

IP Multicast

IP Mobility

IPv6

MPLS

Security

Appendix 1. External Software Packages

Appendix 2. IP Precedence, TOS, and DSCP Classifications

Index



Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net