Setting up a DHCP Server on a Cisco Router
Nerd Cafe
Scenario:
You are configuring a Cisco router as a DHCP server to dynamically assign IP addresses to client devices on a local network.
1. Understanding DHCP
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses, subnet masks, default gateways, and other parameters to network devices. A Cisco router can function as a DHCP server, providing these settings to clients.
2. Practical Scenario
You are setting up a small office network.
The router will act as a DHCP server.
The local network uses the 192.168.1.0/24 subnet.
The router's interface (FastEthernet0/0) will be the gateway 192.168.1.1.
The DHCP server should assign addresses from 192.168.1.100 to 192.168.1.200.
Some devices (like a printer) will need static IP reservations.
3. Network Topology

4. Configuration Steps
Step 1: Enter Global Configuration Mode
Connect to the router via CLI (Console, SSH, or Telnet), then enter global configuration mode:
Step 2: Exclude Reserved IP Addresses
Reserve specific IP addresses that should not be assigned by DHCP (e.g., for the router, printers, and servers):
192.168.1.1 is the router’s IP.
192.168.1.2 – 192.168.1.10 are reserved for static devices.
Step 3: Create a DHCP Pool
Define a DHCP pool named OFFICE_NETWORK:
Step 4: Define the Network and Subnet Mask
Specify the subnet for DHCP clients:
Step 5: Set Default Gateway
Assign the router’s IP as the default gateway:
Step 6: Define the DNS Server
Specify a DNS server (e.g., Google’s 8.8.8.8):
Step 7: Configure the Lease Time
Set a lease duration (e.g., 24 hours):
1 0 0 means 1 day, 0 hours, 0 minutes.
Step 8: Exit the DHCP Configuration
Step9: Assign IP address to fastEthernet 0/0 (Connected to PC1)
Step 9: PC1 Configuration
Step 10: Printer (Static IP)
Manually set IP: 192.168.1.2, Gateway: 192.168.1.1.
Ensure it doesn’t request DHCP.
5. Verifying DHCP Configuration
1. Check the DHCP Configuration
This shows the active DHCP pool and available IP addresses.
2. View DHCP Bindings (Leased IPs)
This displays assigned IP addresses and MAC addresses.
7. Troubleshooting Commands
Check if the DHCP service is running:
Debug DHCP process:
Keywords
DHCP, Cisco Router, IP Address, Subnet Mask, Default Gateway, DNS Server, Lease Time, Excluded Address, DHCP Pool, Network Configuration, IP Binding, DHCP Reservation, Dynamic IP, Static IP, Show Commands, Debugging, Packet Tracer, Network Automation, Router Configuration, CCNA, سیسکو
Last updated