Cisco Router DHCP Server Configuration
Configure a Cisco router to automatically lease IP addresses, DNS servers, and default gateways to local clients using Cisco IOS DHCP pools.
A network engineer steps into a new branch office on a Monday morning. Twenty laptops plug into wall jacks, but none can reach company servers or browse the web.
Instead of valid network settings, each computer shows an unusable 169.254.x.x APIPA address. In small remote offices, running a dedicated Windows or Linux server rack is expensive and unnecessary.
In this lab, we configure a Cisco branch router to act as an automated DHCP server that delivers IP addresses, default gateways, and DNS settings to local workstations.
The Real-World Dilemma: Branch Offices Without Server Racks
Large enterprise headquarters rely on dedicated servers for DHCP, DNS, and user logins. But small branch offices with 20 to 40 people rarely have the budget or space for server racks.
A separate physical server needs clean power, cooling, expensive licenses, and constant maintenance. Even worse, if you host DHCP across the WAN at headquarters, a severed internet link prevents branch employees from getting an IP address when they arrive.
Cisco routers come with a built-in IOS DHCP server engine. Running DHCP directly on the local router ensures users connect immediately, even during a complete WAN outage.
How DHCP Works: The Four-Way DORA Handshake
When a laptop boots up or connects its network cable, it has no IP address, no subnet mask, and no gateway address. It has zero network identity.
To discover local network settings, the client starts a four-step handshake known as DORA: Discover, Offer, Request, and Acknowledgment. This entire process takes place over UDP port 67 and port 68.
Figure 1. The Four-Way DHCP DORA Message Exchange
Let us break down each step shown in Figure 1:
- 1. DHCPDISCOVER: The client shouts out with a broadcast packet from
0.0.0.0:68to255.255.255.255:67asking for any available DHCP server. - 2. DHCPOFFER: The Cisco router hears the request on its local port. It selects an available IP (
192.168.1.11) and replies with gateway and DNS information. - 3. DHCPREQUEST: The client broadcasts back that it accepts the offer from the Cisco router.
- 4. DHCPACK: The router records the client MAC address and commits the lease binding. The client is now live on the network.
The Golden Rule: Exclude Infrastructure Addresses First
Before building an address pool, always complete one critical task: exclude static infrastructure addresses.
Important infrastructure devices need fixed IP addresses. The router interface (192.168.1.1), managed switch (192.168.1.2), and office printers must never change addresses.
Figure 2. Subnet Address Partition: Excluded vs Dynamic Leasable Range
If you activate a pool without exclusions, the router gives away 192.168.1.1 to the first computer that asks. Two devices will share the gateway IP, triggering an immediate IP conflict that knocks the entire office offline.
We reserve a safety buffer from 192.168.1.1 through 192.168.1.10. Dynamic leases begin safely at 192.168.1.11.
Building the Cisco IOS DHCP Pool Architecture
After locking down the excluded range, we create the DHCP pool container. A DHCP pool is simply a profile template that bundles all network settings for connected hosts.
Figure 3. Cisco IOS DHCP Pool Parameter Architecture
Every complete enterprise pool requires three main elements:
- Network Scope: The usable subnet range and mask (
network 192.168.1.0 255.255.255.0). The router checks its local interfaces to know which port serves this pool. - Default Router: The exit gateway for local clients (
default-router 192.168.1.1). - Domain Name Servers: The DNS server addresses (
dns-server 8.8.8.8) so web browsers can resolve domain names.
The Addressing & Topology Plan
In our practice topology, Branch-Router links to Branch-Switch on FastEthernet0/0. Two employee workstations, Sales-PC and Accounting-PC, request IP addresses automatically.
| Device | Interface | IP Address | Subnet Mask | Role |
|---|---|---|---|---|
| Branch-Router | FastEthernet0/0 | 192.168.1.1 | 255.255.255.0 | Default Gateway & DHCP Server |
| Branch-Switch | Vlan1 | 192.168.1.2 | 255.255.255.0 | Managed Switch Management |
| Sales-PC | FastEthernet0 | Dynamic (192.168.1.11) | 255.255.255.0 | DHCP Client Workstation |
| Accounting-PC | FastEthernet0 | Dynamic (192.168.1.12) | 255.255.255.0 | DHCP Client Workstation |
Step-by-Step Configuration on Branch-Router
Follow these steps on Branch-Router to configure the exclusion safety buffer and initialize the DHCP pool:
Lock in Excluded Static Addresses
Reserve the first ten addresses so they remain available for router interfaces, switches, and network printers.
Branch-Router# configure terminal
Branch-Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
Create the DHCP Pool and Define Subnet Scope
Enter DHCP configuration mode and assign the pool to the 192.168.1.0/24 subnet.
Branch-Router(config)# ip dhcp pool BRANCH_LAN
Branch-Router(dhcp-config)# network 192.168.1.0 255.255.255.0
Assign Gateway and DNS Attributes
Supply the default gateway IP and public DNS server addresses to hand out to connected hosts.
Branch-Router(dhcp-config)# default-router 192.168.1.1
Branch-Router(dhcp-config)# dns-server 8.8.8.8
Branch-Router(dhcp-config)# exit
Verification and Inspecting Active Lease Bindings
Once the configuration is active, renew the IP address on Sales-PC and Accounting-PC.
To confirm the router issued the addresses correctly, inspect the active lease binding table.
Figure 4. Cisco Router DHCP Binding Resolution
Run show ip dhcp binding on Branch-Router:
Branch-Router# show ip dhcp binding
Bindings from all pools :
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
192.168.1.11 0001.64bc.1a01 Infinite Automatic
192.168.1.12 0002.43ba.2c09 Infinite Automatic
The router mapped 192.168.1.11 to the MAC address of Sales-PC, and 192.168.1.12 to Accounting-PC. Because we excluded the first ten addresses, the gateway IP stayed safe.
To check the remaining pool capacity, run show ip dhcp pool:
Branch-Router# show ip dhcp pool BRANCH_LAN
Pool BRANCH_LAN :
Utilization mark (high/low) : 100 / 0
Subnet size (total/usable) : 254 / 244
Cause of last database access : Dynamic cache
Current index : 192.168.1.13
Total addresses : 254
Leased addresses : 2
Excluded addresses : 10
Pending event : none
Out of 254 total addresses in the subnet, 10 are excluded and 2 are leased, leaving 242 free slots ready for new employees.
Discussion & Community Notes
Ask questions, share configuration solutions, or discuss this practice lab.
