Pcornel
Networking · IP Services › DHCP

DHCP Server

Cheat sheet · https://pcornel.dk/topic.php?topic=653

Back to the Topic

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 network statement 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 — leases
  • show ip dhcp pool — utilisation
  • show ip dhcp conflict — conflicts
  • show 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 pool
ip dhcp excluded-address
ip 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

StateMeaning
Pool eligibleRequest maps to scope
Binding presentLease state exists
Options deliveredClient parameters supplied
Client trafficSeparate 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

Confirmation

Confirm action

Continue?