DHCP Server
Cheat sheet · https://pcornel.dk/topic.php?topic=653
Answer
A DHCP server hands out IP addresses and settings — subnet mask, default gateway, DNS servers, domain name and lease time — from configured pools. On Cisco IOS it is set up with ip dhcp pool, with ip dhcp excluded-address for addresses it must not lease.
Remember
- Exclude infrastructure addresses before defining the usable pool.
- The
networkstatement defines the pool subnet; it is not a routing command in DHCP pool mode. - A binding shows a lease the local server actually owns.
- Conflicts can remove addresses from normal allocation until the cause is understood.
First checks
show ip dhcp binding— leasesshow ip dhcp pool— utilisationshow ip dhcp conflict— conflictsshow ip dhcp server statistics— message counters
Commands
show ip dhcp binding- IOS DHCP server lease bindings.
ip dhcp excluded-address <start> <end>- Exclude infrastructure or reserved addresses from dynamic allocation.
ip dhcp pool <name>- Create or enter a Cisco IOS/IOS XE DHCP pool.
network <network> <mask>- Define the IPv4 subnet served by the current DHCP pool.
default-router <gateway>- Provide the client default-gateway option.
dns-server <server>- Provide one or more DNS resolver addresses to DHCP clients.
domain-name <domain>- Provide a DNS domain/search suffix to DHCP clients.
lease <days>- Set the lease duration for addresses in the current pool.
show ip dhcp pool- Display DHCP pool scope, utilization and address availability.
show ip dhcp conflict- Display addresses the local DHCP server has marked as conflicting.
ip dhcp poolip dhcp excluded-addressip dhcp database <url>clear ip dhcp conflict
Verify in this order
pool → offer/ack → binding
Where it usually breaks
local configuration → reachability/transport → request/negotiation → server or policy decision → response/state installation → client-visible result
DHCP Server · operational reference
| State | Meaning |
|---|---|
| Pool eligible | Request maps to scope |
| Binding present | Lease state exists |
| Options delivered | Client parameters supplied |
| Client traffic | Separate forwarding proof |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=653