Networking guides, explanations and reader checklists on whilenetworking.com

Troubleshooting Protocol: Use Wireshark to Identify DHCP Scope Exhaustion and Duplicate IP Assignments

Network connectivity issues often stem from Layer 3 misconfigurations, but the most insidious problems frequently hide within the Dynamic Host Configuration…

Network connectivity issues often stem from Layer 3 misconfigurations, but the most insidious problems frequently hide within the Dynamic Host Configuration Protocol (DHCP) infrastructure. When users report “no internet access” or receive an “IP Address Conflict” error, the root cause is often a depleted DHCP scope or a rogue device assigning static IPs that collide with the dynamic pool. For IT students and junior engineers, mastering the analysis of DHCP traffic using Wireshark is a critical skill. This guide provides a concrete, safe lab procedure to identify these failures, distinguishing between a full scope and actual IP duplication events.

Understanding the DHCP Discovery Process

Before analyzing packets, one must understand the normal handshake. The process begins when a client broadcasts a DHCPDISCOVER message (UDP port 67) seeking an available lease. A legitimate DHCP server responds with a DHCPOFFER, followed by a DHCPREQUEST and finally a DHCPACK.

However, anomalies occur during exhaustion or duplication:
1. Scope Exhaustion: The server has no free addresses left in its configured range. It may stop responding entirely, or if configured with a secondary pool, it might offer IPs from a different subnet that the client cannot route to properly.
2. Duplicate IP Assignments: This happens when a device is manually assigned a static IP that falls within the DHCP server’s dynamic scope. The DHCP server, unaware of this manual assignment, may still lease that same IP to another client upon reboot, causing an immediate conflict.

Lab Setup and Prerequisites

To safely practice these troubleshooting techniques without disrupting production networks, we will simulate a scenario using Cisco Packet Tracer or GNS3/EVE-NG for virtualization.

Prerequisites:
* A computer running Wireshark (Windows, Linux, or macOS). Ensure the correct network interface is selected for capture filtering.
* A simulated network topology including:
* Router/Switch: Acting as the Layer 3 boundary with VLANs configured.
* DHCP Server: Simulated via a Windows VM or Cisco IOS DHCP service.
* Client PC: Running a standard OS (Windows/Linux) to act as the DHCP client.
* Rogue Device: A second PC manually configured with a static IP within the DHCP range.

Safety Note: Always perform these tests in an isolated lab environment or a designated VLAN separate from critical production traffic. Never run deep packet inspection tools on untrusted external networks without authorization.

Step 1: Establishing a Baseline Capture

Open Wireshark and select your active network interface. Click the “Select Interface” option if prompted, ensuring you are capturing on the VLAN where DHCP traffic flows (typically VLAN 10 or similar).

Start the capture before generating traffic to ensure no packets are missed. You will see standard ARP requests and DNS queries. To focus specifically on our issue, apply a display filter. Type the following in the Wireshark filter bar:

bootp

Note: Wireshark categorizes DHCP traffic under the BOOTP protocol family.

Wait until you have generated sufficient traffic to see the normal flow, then stop the capture and analyze the timeline.

Step 2: Identifying Scope Exhaustion

To simulate exhaustion, we will first verify that the server is responding correctly with a full scope, then artificially exhaust it or configure the server to deny leases.

Scenario A: Normal Operation

In a healthy state, you should see the DHCPDISCOVER followed immediately by a DHCPOFFER. The IP address in the offer will be within the configured subnet (e.g., 192.168.10.50).

Scenario B: Simulating Exhaustion

In our lab, we can exhaust the scope by creating 30 client VMs and booting them sequentially until the pool is empty. Once exhausted, observe the Wireshark timeline.

Expected Illustrative Output:
When the scope is full, the DHCPACK messages may stop appearing entirely. However, a more subtle sign of exhaustion in some server configurations (like Windows Server with multiple scopes) is the appearance of DHCPNAK (Negative Acknowledge) packets or offers coming from an unexpected secondary range that the client does not recognize as valid for its gateway.

Look specifically at the “Info” column in the packet list window:
* Normal: Offered IP address 192.168.10.x
* Exhaustion Sign: You may see No free addresses available or the server simply ceases to reply to DHCPDISCOVER broadcasts.

Step 3: Detecting Duplicate IP Assignments

This scenario is often caused by a mix of static and dynamic addressing. We will configure one client with a static IP (e.g., 192.168.10.25) that lies within the DHCP scope (192.168.10.20 – 192.168.10.30).

Procedure:

  1. Configure Client A with a Static IP: 192.168.10.25.
  2. Start Wireshark on Client B (or a mirror port if available).
  3. Boot Client B and request an IP.

Analyzing the Conflict:
When Client B requests an IP, the DHCP server offers 192.168.10.25 because it is unaware that Client A holds it statically.
* Packet Analysis: Look for the DHCPACK containing the IP 192.168.10.25.
* Verification Step: Immediately after receiving this, Client B will attempt to verify the address. You will see an ICMP Echo Request (Ping) broadcast or unicast to the existing holder of the IP (192.168.10.25). If a reply is received, Wireshark and the OS will flag this as an IP Address Conflict.

In Wireshark, look for the “Information” field in the DHCP packet details which might indicate a conflict detection mechanism triggered by the server or client.

Step 4: Verifying with ICMP and ARP

DHCP is not the only protocol involved in conflict detection. Modern operating systems use ICMPv6 Neighbor Discovery (ND) or ARP probes to check IP validity.

In Wireshark, expand the “Internet Protocol Version 4 (IPv4)” details of the DHCP packet. If you see Option 55 (Parameter Request List), ensure it matches the server’s capabilities.

To verify a duplicate assignment practically:
1. Run a ping test to the offered IP from another machine in the subnet.
2. In Wireshark, filter for icmp.type == 8 (Echo Request).
3. If the DHCP server assigned an IP that is already in use, you will see the client receiving an ICMP “Destination Host Unreachable” or a conflict notification shortly after the DHCPACK.

Common Errors and Fixes

  • Error: No Packets Captured. Ensure your network card supports promiscuous mode. If using Wireshark on Windows, check that the adapter is set to “Promiscuous Mode” in the settings, though most modern drivers handle this automatically for DHCP.
  • Error: Filter Too Broad. Using bootp captures everything. For specific troubleshooting, refine your filter to dhcp && ip.addr == 192.168.10.0/24.
  • Mistake: Ignoring Layer 2 Switches. If DHCP requests are not reaching the server, check for VLAN mismatches or port security settings blocking multicast/broadcast traffic. Ensure your switch ports allow DHCP snooping to be bypassed appropriately for trusted servers.

Student Practice Task and Industry Application

Student Task:
1. Set up a Packet Tracer topology with two PCs connected to a switch.
2. Configure the switch with VLANs.
3. Assign PC1 a static IP within the range 192.168.10.50-100.
4. Configure a DHCP server (or use the router’s built-in service) with the same range 192.168.10.50-100.
5. Boot PC2 and capture traffic. Identify the exact frame where PC2 receives an IP that conflicts with PC1. Document the packet numbers in your Wireshark export.

Industry Application:
In enterprise environments, scope exhaustion often occurs during peak onboarding seasons or after a failed migration where old leases were not reclaimed. Network engineers use Wireshark to audit DHCP logs and identify “sticky” clients holding IPs outside their lease time. Identifying duplicate assignments is crucial for security; a rogue device assigning static IPs can bypass network segmentation controls. Always verify policy terms with authoritative sources like the specific vendor’s documentation (e.g., Cisco IOS Release Notes or Microsoft DHCP Server Guide) as features vary by version and jurisdiction.

Conclusion

Troubleshooting DHCP issues requires moving beyond simple connectivity tests to deep packet inspection. By using Wireshark, IT professionals can visually distinguish between a server simply running out of addresses and a dangerous configuration error where static and dynamic pools collide. Remember that terms, availability, eligibility, laws, and prices depend on the specific insurer, policy, and jurisdiction in broader contexts, but in networking, the “policy” is your subnet mask and scope definition. Always test in a safe environment before applying changes to live production networks.

Educational-use notice: This tutorial is for learning and controlled lab use only. Test carefully, use backups, and obtain authorization before making changes. Do not run unfamiliar commands on production systems. We accept no responsibility for misuse, damage, data loss, or production issues.