IT-Admin.tech

DHCP reservations, lease issues and client diagnostics in heterogeneous environments

Diagramm des DHCP-Datenflusses mit Relay (GIADDR), Option 82 und Packet-Capture-Auszug zur Analyse von Reservierungs- und...
Diagramm mit Relay‑Pfad, Option‑61/Option‑82 und Packet‑Capture als Grundlage für Root‑Cause‑Analyse bei Reservierungs‑ und Lease‑Problemen.

DHCP (Dynamic Host Configuration Protocol) is the automatic basis for IP, gateway and DNS assignment. When DHCP reservations do not apply, leases “hang” or clients suddenly use wrong addresses, widespread disruptions often occur: VoIP loses registration, printers cannot be found, VPN clients end up on the wrong DNS servers. This runbook summarizes practical causes, test sequences and fallback strategies so you can proceed in a structured way in mixed Windows-, Linux- and appliance environments.

What really matters in DHCP

Understand the practical mechanics briefly: DHCP exchange classically runs as DORA (Discover, Offer, Request, Ack). Crucial for reservations is the client identity: in many cases this is not the MAC address but the DHCP Client Identifier (Option 61). Leases have T1/T2 renewal intervals; if renewal fails, it appears as a sudden outage.

DHCP reservations: practice and diagnosis

Concrete recommendations for reservations in operation: apply the reservation to the identity the client actually sends. Many modern operating systems and devices use a Client Identifier (Option 61), UUIDs or vendor-specific IDs instead of the hardware MAC; virtualization layers can also change MACs during clone operations. Document every reservation in your IPAM (IP address management) and submit a change record: who created the reservation when and for which target device.

Common symptoms and their likely causes

Reservation is ignored

Often caused by wrong identity (Client Identifier vs. MAC), reservation in the wrong scope/VLAN, or a second DHCP server offering a different lease. Virtualization, NIC teaming or privacy features can change identities. Quick check: packet capture shows which fields the client sends.

Leases problematic after network change (Wi‑Fi, VPN, dock)

Reasons include: old lease in the client cache, different DHCP options per network, missing relay configuration or issues with DNS suffixes over VPN. MTU or routing problems can exacerbate perception and cause packet fragmentation.

Duplicate IP (address conflict)

Usually caused by static IPs inside the dynamic pool, forgotten reservations or cloned VMs. VRRP/HSRP or poorly maintained IPAM data also lead to conflicts. Check ARP caches and switch MAC tables to identify active hosts.

Only one VLAN/location affected

Suspects here are relay/IP‑helper, ACLs, DHCP snooping or misconfigured access ports/WLAN‑SSID‑VLAN mappings. Verify that the GIADDR seen by the server corresponds to the expected subnet.

Structured check sequence (shorter and prioritized steps)

Work through the chain: 1) physical/VLAN level (gateway, trunks, ACLs), 2) network service (relay/IP‑helper, Option 82, DHCP snooping), 3) server (scopes, reservations, leases, failover), 4) clients and special devices. This order avoids unnecessary client-side interventions and reduces risk.

Network checks: switches, relay and snooping

Check DHCP snooping and switch binding

DHCP snooping (a feature that blocks unauthorized DHCP responses) helps prevent rogue servers but requires correct trusted-port definitions. Misconfiguration can block legitimate servers. On Cisco IOS/IOS‑XE check bindings and status:

Shell
# Cisco IOS example: check status and bindings
show ip dhcp snooping
show ip dhcp snooping binding
show running-config | include ip dhcp snooping

The bindings table contains MAC→IP→VLAN mappings; if it is empty, connectivity is missing or the switch does not see DHCP traffic.

Relay (IP Helper) and Option 82

The relay agent (IP Helper) sets GIADDR (Gateway IP Address) and can add Option 82 (Relay Agent Information). If the server uses Option 82, the matching of reservations and policies changes. Check whether the server consumes or ignores Option 82, and if there are issues test temporarily removing Option 82.

Server-side diagnostics and concrete checks

Windows DHCP Server: Search for identity mismatches

Windows stores ClientId in the DHCP database. If devices use Option 61, the reservation may not appear where you expect it. Create reservations with Get/Set cmdlets and check leases:

Powershell
# Beispiel: Reservierung anlegen und prüfen (Windows DHCP)
Add-DhcpServerv4Reservation -ScopeId 10.20.30.0 -IPAddress 10.20.30.42 -ClientId "01-11-22-33-44-55" -Description "Konferenzdrucker"
Get-DhcpServerv4Reservation -ScopeId 10.20.30.0 | Where-Object {$_.IPAddress -eq '10.20.30.42'}

# Scope‑Statistiken
Get-DhcpServerv4ScopeStatistics -ScopeId 10.20.30.0

Note that ClientId often uses the format 01+MAC (01 prefixed) or is a text string; use exactly the format shown by the server.

ISC dhcpd: reservation (host) in dhcpd.conf

For ISC dhcpd the dhcpd.leases file is the source of truth; changes to the configuration file must be syntax-checked and the service RESTarted or HUP-signaled:

Ini
# Beispielhost‑Reservierung in /etc/dhcp/dhcpd.conf
host printer-konf01 {
  hardware ethernet 11:22:33:44:55:66;
  fixed-address 10.20.30.42;
  option host-name "Konf-Printer01";
}

# Syntaxprüfung
sudo dhcpd -t -cf /etc/dhcp/dhcpd.conf
# Neustart (Debian/Ubuntu)
sudo systemctl RESTart isc-dhcp-server

In HA/failover setups, watch for inconsistent lease data between master and slave and avoid simultaneous manual edits to the lease file.

Packet Capture: identify key data

A capture is the most reliable evidence: who sends DHCPOFFER/DHCPACK, which GIADDR/Option82 is set, and what is contained in Option 61/50/54? Use tcpdump/tshark/Wireshark for targeted analysis.

Shell
# tcpdump Beispiel: DHCP Traffic mitschneiden
sudo tcpdump -i eth0 -nn -s 0 -w dhcp.pcap 'udp and (port 67 or port 68)'

# tshark: DHCP Felder extrahieren (Client Identifier, GIADDR, Server Identifier)
tshark -r dhcp.pcap -T fields -e dhcp.option.client_id -e ip.src -e ip.dst -e bootp.giaddr -e bootp.file -E header=y -E separator=,

# Wireshark Displayfilter Beispiele
bootp.option.type == 61  # Client Identifier
bootp.option.type == 82  # Relay Agent Information
bootp.option.type == 54  # DHCP Server Identifier

Interpretation: If Option 61 is present and does not match the expected MAC, you must reassign the reservation to that ClientId or adjust the client side.

Client side: targeted measures and diagnostics

On the client, first check visible values, then logs/cache, and finally targeted reset actions. For Windows EventLogs provide hints; for Linux the lease files and systemd/journal. For problematic devices a controlled test in an isolated test VLAN is recommended.

Operational runbooks: typical scenarios and steps

Scenario A: Reservation not applied

  1. Capture packets on the affected client (or SPAN from the access port) and check the client identifier.
  2. On the DHCP server, search for a matching entry for that exact client identifier.
  3. If the server is reserved by MAC, create a new reservation for the found ClientId or change the client so that the MAC is used (e.g. VM network adapter setting).
  4. Force the client to renew (ipconfig/renew or dhclient‑Release/Renew) and check the log.

Scenario B: Many clients receive APIPA or retain old IP

  1. Check scope utilization (Pool‑Exhaustion).
  2. Check on the network whether the Discover reaches the server (Packet Capture on relay/gateway).
  3. Check switch DHCP Snooping for errors; test ACLs/firewall for UDP 67/68.
  4. Temporarily shorten lease time for testing (caution: increases DHCP traffic) and observe.

Monitoring, Alerting und Automatisierung

Stable operation requires metrics: available IPs in the pool, the rate of Duplicate‑IP reports, timeouts on DHCP requests, and the number of Rogue‑DHCPOFFERs per hour. If you have centralized logs (Syslog, ELK, Splunk), filter for Bootp/DHCP‑Events and define thresholds.

Plain
# ELK/Splunk Beispiel: Suche nach unerwarteten DHCPOFFERs (Pseudo‑Query)
source="/var/log/messages" OR source="/var/log/syslog" "DHCPOFFER" NOT (src_ip==10.20.30.5 OR src_ip==10.20.30.6)

Concrete automation: If your IPAM‑API is available, reservations can be created and audited via PR/Change‑workflows. For Windows DHCP, PowerShell‑Skripte are suitable; for ISC dhcpd, changes from a central config‑repo can be rolled out via CI/CD (with syntax checking beforehand).

VPN‑spezifische Troubleshooting‑Tipps

VPN setups require special attention because tunnel MTU, split‑tunnel strategies and tunnel DNS affect the DHCP experience. Always check both sides (client locally and at the tunnel endpoint) and compare captures.

Shell
# MTU Test über Tunnel: Ping mit DF‑Flag
ping -M do -s 1400 vpn-gateway.example.com
# MSS‑Clamping prüfen: TCP‑Verbindungen beobachten, ob Fragmentierung Probleme verursacht

Tip: If VPN‑server use their own pools, document their lease profiles and DNS policies. For Site‑to‑Site relays check asymmetric routing; an Offer can return on a different path and be discarded by the client.

Implementation and rollback strategy

Carry out DHCP changes in a planned manner: backup the DHCP database/files before changes, make changes in small steps per scope, monitor scope utilization, and define clear rollback criteria (e.g. a marked increase in Duplicate‑IP events or Pool‑Exhaustion). Propose rollback steps in your change ticket (who, when, how). Best practice: work during a maintenance/test window, and inform affected customers/teams in advance.

Conclusion

DHCP problems can be reliably resolved if you proceed methodically: first the path (VLAN, relay, firewall), then the server side (scope, leases, reservations), and finally clients and special devices. Packet captures are often the fastest evidence for identity and relay issues. A clean address plan, documented reservation rules, lease profiles and active protections against rogue DHCP (DHCP Snooping with clear trust definitions) are the most effective levers for stable operation in heterogeneous networks. Keep your processes auditable and automate recurring checks to reduce escalations.

DHCP reservations: architecture, scaling and operational considerations

Beyond pure troubleshooting it is worth looking at architecture and operations — many risks that later lead to recurring incidents lie there. Treat DHCP services as a business‑critical infrastructure component with clear ownership, auditability and automated validation.

Availability and consistency

Do not scale DHCP simply by copying the configuration. Stateful services need a consistent lease repository. Use the vendor‑provided failover mechanisms (Windows DHCP Failover, ISC dhcpd‑Failover‑Protocol) instead of manual copies. Watch for split‑brain risks: if both nodes operate as primary at the same time you will get duplicate leases and address conflicts.

Backup, quick recovery and change control

A quick backup of lease data and configuration is mandatory before any change. Example: Windows export DHCP, back up ISC leases:

Powershell
# Windows: DHCP-Konfiguration und Leases exportieren
Export-DhcpServer -ComputerName dhcp01 -File C:backupsdhcp-dump.xml -Leases -Force
Shell
# ISC dhcpd: Leases sichern und Configuration in Versionskontrolle
sudo cp /var/lib/dhcp/dhcpd.leases /var/backups/dhcpd.leases.$(date +%F)
sudo rsync -a /etc/dhcp/ /var/backups/dhcp-config/

Make changes via ticketing and a CI/CD pipeline: syntax checks, a canary rollout on a scope and automated health checks minimize outage risk.

Integration with IPAM and automation

Integrate DHCP with your IPAM via APIs, but be aware of race conditions: two systems must not release the same address concurrently. Design options include: IPAM as the single source of truth with a push model to the DHCP server, or DHCP as the primary source with periodic reconciliation. Implement idempotent actions and conflict resolution (e.g. API locking or transactional updates).

Monitoring, alerts and metrics

Operationalize metrics: available IPs per scope, Offer→Ack ratio, number of rogue offers, number of duplicate IP events, lease renewal failures (T1/T2 errors). Define clear thresholds, e.g. alert when available IPs < 10% or duplicate IP events > 5 within 15 minutes.

Security and network integration

Segments running DHCP should be placed in the management VLAN or a tightly controlled control‑plane. Protect relay agents and trust ports when using DHCP Snooping and document any use of Option‑82. Provide auditors with audit trails: who created reservations, when, and with which ClientIdentifier.

Practical rule: test every configuration change first in an isolated scope, automate validations and define simple rollback criteria (e.g. a drop in ACK rates or an increase in conflict alerts). This keeps DHCP a reliable foundation for your heterogeneous networks.

DHCP leases and DHCP troubleshooting are also important for this topic. The article places these aspects in a clear context and shows what matters in day-to-day operations.

Weiterfuehrend

Passende weitere Inhalte