Courseiva
DHCPPrivileged EXEC

show ip dhcp server statistics

Displays DHCP server statistics, including the number of messages sent and received, to monitor DHCP server performance and troubleshoot issues.

Definition: show ip dhcp server statistics is a Cisco IOS privileged exec command. Displays DHCP server statistics, including the number of messages sent and received, to monitor DHCP server performance and troubleshoot issues.

Overview

The 'show ip dhcp server statistics' command is a vital diagnostic tool for network engineers managing DHCP services on Cisco IOS routers and switches. It provides a snapshot of the DHCP server's operational health by displaying counters for various DHCP message types (DISCOVER, OFFER, REQUEST, ACK, NAK, DECLINE, RELEASE, INFORM) sent and received, along with the number of active bindings, pool utilization, and error counts. This command is essential for monitoring DHCP server performance, identifying misconfigurations, and troubleshooting client connectivity issues related to IP address assignment.

The underlying concept is the DHCP protocol (RFC 2131), which uses a four-step process (DORA) for dynamic IP allocation. The statistics reflect the server's view of this process, allowing engineers to detect anomalies such as excessive NAKs (indicating duplicate IP detection or pool exhaustion) or a high number of DECLINE messages (suggesting IP address conflicts). You would reach for this command when clients fail to obtain IP addresses, when there are reports of IP conflicts, or during routine health checks.

Alternatives include 'debug ip dhcp server events' for real-time logging, 'show ip dhcp binding' to view active leases, and 'show ip dhcp conflict' to see address conflicts. This command fits into the broader troubleshooting workflow as an initial diagnostic step—after verifying basic connectivity and DHCP service status, the statistics provide quantitative clues to narrow down the problem. Important IOS behavior: the command is available in privileged EXEC mode (enable) and does not require configuration; it displays real-time counters that reset upon router reload or when cleared with 'clear ip dhcp server statistics'.

The output is buffered and may not reflect the very latest packet if the router is under heavy load. There is no impact on the running configuration—it is a read-only command. Understanding these statistics helps engineers quickly assess whether the DHCP server is functioning correctly or if further investigation into network issues is needed.

Syntax·Privileged EXEC
show ip dhcp server statistics

When to Use This Command

  • Check if the DHCP server is receiving DISCOVER messages from clients.
  • Monitor the number of successful OFFER and ACK messages to ensure clients are getting IP addresses.
  • Identify high rates of NAK messages indicating client configuration problems.
  • Troubleshoot DHCP server performance issues by checking message counts over time.

Command Examples

Basic DHCP Server Statistics

show ip dhcp server statistics
Memory usage         43324
Database agents      0
Automatic bind       0
Manual bind          0
Expired leases       0
Malformed messages   0

Message                   Received
BOOTREQUEST               0
DHCPDISCOVER             15
DHCPREQUEST              12
DHCPDECLINE              0
DHCPRELEASE              2
DHCPINFORM               0

Message                   Sent
BOOTREPLY                0
DHCPOFFER                15
DHCPACK                  10
DHCPNAK                  2

Memory usage: 43324 bytes used by DHCP process. Database agents: 0 (no external database). Automatic bind: 0 (no dynamic bindings). Manual bind: 0 (no static bindings). Expired leases: 0. Malformed messages: 0 (no errors). Received: BOOTREQUEST 0, DHCPDISCOVER 15 (clients requesting IP), DHCPREQUEST 12 (clients accepting offer), DHCPDECLINE 0, DHCPRELEASE 2 (clients releasing IP), DHCPINFORM 0. Sent: BOOTREPLY 0, DHCPOFFER 15 (offers sent), DHCPACK 10 (acknowledgements sent), DHCPNAK 2 (negative acknowledgements).

Statistics with High NAK Rate

show ip dhcp server statistics
Memory usage         43324
Database agents      0
Automatic bind       0
Manual bind          0
Expired leases       0
Malformed messages   0

Message                   Received
BOOTREQUEST               0
DHCPDISCOVER             20
DHCPREQUEST              18
DHCPDECLINE              0
DHCPRELEASE              1
DHCPINFORM               0

Message                   Sent
BOOTREPLY                0
DHCPOFFER                20
DHCPACK                  10
DHCPNAK                  8

This output shows a high number of DHCPNAK (8) compared to DHCPACK (10). This indicates that many DHCPREQUEST messages are being rejected, possibly due to duplicate IP address detection or client misconfiguration. The DHCP server is sending NAKs because the requested IP is not available or the client's subnet is incorrect.

Understanding the Output

The output is divided into two sections: memory and binding statistics, and message counts. The first section shows memory usage (should be stable), database agents (0 if not using external DB), automatic bindings (dynamic leases), manual bindings (static), expired leases (should be low), and malformed messages (should be 0). The second section shows received and sent messages.

Key metrics: DHCPDISCOVER received indicates client requests; DHCPOFFER sent should match DISCOVERs; DHCPREQUEST received indicates clients accepting offers; DHCPACK sent should match REQUESTs; DHCPNAK sent indicates rejections (high NAKs indicate problems). Watch for high malformed messages (corruption) or mismatched counts (e.g., more OFFERs than DISCOVERs).

Configuration Scenarios

Monitor DHCP Server Performance After Configuration

After configuring a DHCP server on a Cisco router to serve the 192.168.1.0/24 subnet, you want to verify that clients are receiving addresses and that the server is operating normally.

Topology

R1(Gi0/0)---192.168.1.0/24---Clients

Steps

  1. 1.Step 1: Enter privileged EXEC mode: enable
  2. 2.Step 2: Display DHCP server statistics: show ip dhcp server statistics
  3. 3.Step 3: Review the output for message counts: look for a high number of DISCOVERs and corresponding OFFERs, and a similar number of REQUESTs and ACKs. Ensure that NAKs and DECLINEs are low or zero.
  4. 4.Step 4: Check the 'Bindings' field to see the number of active leases. Compare with the pool size to gauge utilization.
Configuration
! No configuration needed for this verification step.
! Ensure DHCP is configured:
ip dhcp pool POOL1
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.1
 dns-server 8.8.8.8
!

Verify: Command: show ip dhcp server statistics Expected output snippet: Memory usage 12345 Address pools 1 Database agents 0 Automatic bindings 10 Manual bindings 0 Expired bindings 0 Malformed messages 0 Message Received BOOTREQUEST 0 DHCPDISCOVER 50 DHCPREQUEST 45 DHCPDECLINE 0 DHCPRELEASE 5 DHCPINFORM 0 Message Sent BOOTREPLY 0 DHCPOFFER 50 DHCPACK 45 DHCPNAK 0 This indicates healthy operation: OFFERs match DISCOVERs, ACKs match REQUESTs, no NAKs or DECLINEs.

Watch out: If the statistics show a high number of DHCPNAK messages, it may indicate that the DHCP pool is exhausted or that there are IP address conflicts. Check 'show ip dhcp conflict' to identify conflicting addresses.

Troubleshoot DHCP Client Connectivity Issues

Users on the 10.10.10.0/24 subnet report that some clients cannot obtain IP addresses. You suspect the DHCP server may be overwhelmed or misconfigured.

Topology

R2(Gi0/0)---10.10.10.0/24---Clients R2(Gi0/1)---10.10.20.0/24---DHCP Server (R1)

Steps

  1. 1.Step 1: Access the DHCP server router (R1) and enter privileged EXEC mode: enable
  2. 2.Step 2: Run 'show ip dhcp server statistics' to view current message counts.
  3. 3.Step 3: Look for a high number of DHCPDISCOVER messages but a low number of DHCPOFFERs, which could indicate the server is not responding due to resource issues or ACL blocking.
  4. 4.Step 4: Check for DHCPNAK messages: if high, examine 'show ip dhcp conflict' for duplicate IPs.
  5. 5.Step 5: Verify pool utilization: if the number of automatic bindings is near the pool size, the pool may be exhausted. Use 'show ip dhcp pool' to confirm.
Configuration
! On R1, ensure DHCP pool is configured correctly:
ip dhcp pool POOL2
 network 10.10.10.0 255.255.255.0
 default-router 10.10.10.1
 dns-server 10.10.10.2
 lease 7
!

Verify: Command: show ip dhcp server statistics If the output shows: DHCPDISCOVER 200 DHCPOFFER 50 DHCPREQUEST 45 DHCPACK 45 DHCPNAK 0 This suggests the server is receiving many DISCOVERs but only offering to a fraction, possibly due to pool exhaustion or a configuration issue. Check pool utilization with 'show ip dhcp pool'.

Watch out: A common mistake is forgetting to exclude static addresses from the DHCP pool. Use 'ip dhcp excluded-address' to reserve addresses for routers, servers, etc. Otherwise, the server may offer addresses already in use, leading to conflicts and NAKs.

Troubleshooting with This Command

When using 'show ip dhcp server statistics' for troubleshooting, a healthy output typically shows a balanced ratio of DISCOVER to OFFER messages and REQUEST to ACK messages. The number of NAKs and DECLINEs should be zero or very low. Malformed messages should be zero.

The 'Bindings' count should be less than the pool size, indicating available addresses. Problem indicators include: a high number of DHCPNAK messages, which often point to IP address conflicts or pool exhaustion; a high number of DHCPDECLINE messages, indicating clients are detecting duplicate IPs on the network; a large discrepancy between DISCOVERs and OFFERs, suggesting the server is not responding to all requests (possible ACL blocking, resource exhaustion, or misconfigured relay); and a high count of malformed messages, indicating potential packet corruption or attacks. To diagnose, start by checking the 'Message Received' and 'Message Sent' sections.

If DHCPNAK is high, run 'show ip dhcp conflict' to see conflicting addresses and resolve them by removing the conflict or excluding the address. If DHCPDECLINE is high, investigate for rogue DHCP servers or misconfigured static IPs. If OFFERs are low relative to DISCOVERs, verify that the DHCP pool is not exhausted by using 'show ip dhcp pool' to see utilization.

Also check if the server is reachable from clients using extended ping from the server's interface. Correlate with 'debug ip dhcp server events' to see real-time packet processing, but use caution in production due to CPU impact. Another useful command is 'show ip dhcp binding' to see active leases and their expiration times.

For relay scenarios, verify that 'ip helper-address' is correctly configured on the client VLAN interface. In summary, the statistics command provides a high-level health check; when anomalies are found, deeper investigation with other show and debug commands is warranted. Always clear the statistics with 'clear ip dhcp server statistics' before starting a troubleshooting session to get a fresh baseline.

CCNA Exam Tips

1.

CCNA exam tip: High DHCPNAK counts often indicate duplicate IPs or client misconfiguration; know that NAKs are sent when the server cannot honor the request.

2.

CCNA exam tip: The 'Malformed messages' counter should be zero; non-zero values indicate packet corruption or attacks.

3.

CCNA exam tip: Compare DHCPDISCOVER received vs DHCPOFFER sent; they should be equal in a healthy network.

4.

CCNA exam tip: Remember that 'show ip dhcp server statistics' is in Privileged EXEC mode, not global config.

Common Mistakes

Mistake 1: Confusing DHCPACK with DHCPOFFER; OFFER is sent first, ACK is sent after REQUEST.

Mistake 2: Ignoring the 'Malformed messages' field; it can indicate network issues or rogue DHCP servers.

Mistake 3: Forgetting to clear statistics with 'clear ip dhcp server statistics' before troubleshooting; old data can mislead.

show ip dhcp server statistics vs show ip dhcp binding

Both commands are used in DHCP server management but address different aspects: one provides performance metrics and message counts, while the other lists current lease bindings. They are often considered together because both are essential for monitoring and troubleshooting DHCP operations.

Aspectshow ip dhcp server statisticsshow ip dhcp binding
Data DisplayedMessage counters (received/sent/discarded), pool utilization, binding countsList of active IP-to-MAC bindings with lease time and type
PurposeMonitor DHCP server performance and detect anomaliesVerify IP address assignments and lease status
Use CaseTroubleshooting high drop rates or server overloadValidating client connectivity or auditing address usage
Output FormatSummary with aggregated counts and statisticsTable of individual entries for each binding
Frequency of UsePeriodic performance checks or after configuration changesAd hoc for specific client issues or inventory checks
Relevance to TroubleshootingIndicates server health and potential configuration problemsReveals if a specific client received an address

Use show ip dhcp server statistics when you need to assess overall server health, message loss, or pool utilization trends.

Use show ip dhcp binding when you need to confirm if a particular client has a lease, check its IP address, or audit allocated addresses.

Platform Notes

In IOS-XE (e.g., Catalyst 9000 switches, ISR 4000 series), the 'show ip dhcp server statistics' command is available and produces similar output to classic IOS, but may include additional fields such as 'Automatic bindings' and 'Expired bindings'. The syntax is identical. In NX-OS (e.g., Nexus 9000), the equivalent command is 'show ip dhcp statistics' or 'show ip dhcp server statistics' depending on the version; NX-OS uses a different DHCP server implementation (DHCP snooping and relay are more prominent).

For ASA firewalls, DHCP server statistics are viewed via 'show dhcpd statistics' (ASA uses dhcpd instead of ip dhcp). In IOS-XR (e.g., ASR 9000), the command is 'show dhcp ipv4 server statistics' and the output format is different, focusing on packet counts per interface. Between IOS versions, the output format has remained largely consistent from 12.x to 15.x and 16.x, though newer versions may add counters for DHCPv6 or additional error types.

Always check the specific platform documentation, as some features like DHCP database agents or conflict logging may affect the statistics displayed.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions