BeginnerNetwork Configuration 6 min read

How to Configure DHCP on a Cisco Router

Configure DHCP on Cisco IOS in 6 minutes — CCNA-ready CLI walkthrough

Dynamic Host Configuration Protocol (DHCP) automates IP address assignment, reducing manual configuration errors and administrative overhead. On Cisco routers, DHCP is configured via the global configuration mode using the `ip dhcp pool` command. This guide walks through a complete DHCP server setup on a Cisco IOS router, including address exclusion, default gateway, DNS, lease time, and verification commands. By the end, you'll be able to deploy a functional DHCP server for a small-to-medium network — a core skill tested in both the CCNA (200-301) and CompTIA Network+ (N10-008) exams. All commands are based on Cisco IOS 15.x and later.

1

Enter Global Configuration Mode

Access the router via console or SSH and enter privileged EXEC mode, then global configuration mode. This is the starting point for all DHCP configuration tasks. Ensure you have the correct privilege level (15 for full access).

Cisco IOS
Router> enable
Router# configure terminal
Router(config)#

Use 'enable secret' to set an encrypted privileged EXEC password — never leave it at default.

2

Exclude Static IP Addresses from the DHCP Pool

Before creating the DHCP pool, exclude addresses that are statically assigned (routers, servers, printers). Use the `ip dhcp excluded-address` command to prevent the DHCP server from leasing these IPs. You can specify a range or a single address.

Cisco IOS
Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
Router(config)# ip dhcp excluded-address 192.168.1.100

Always exclude the router's own interface IP and any network infrastructure devices to avoid IP conflicts.

3

Create the DHCP Pool and Define the Network

Create a DHCP pool with a descriptive name and specify the subnet that will be leased to clients. The `network` command defines the subnet and optional mask. Clients will receive addresses from this range.

Cisco IOS
Router(config)# ip dhcp pool LAN_POOL
Router(dhcp-config)# network 192.168.1.0 255.255.255.0

Use meaningful pool names like 'GUEST_VLAN' or 'MGMT_POOL' for easier troubleshooting.

4

Configure Default Gateway and DNS Servers

Assign the default gateway (router interface IP) and DNS servers that DHCP clients will receive. The `default-router` command sets the gateway, and `dns-server` specifies up to two DNS resolvers. These are critical for client internet access.

Cisco IOS
Router(dhcp-config)# default-router 192.168.1.1
Router(dhcp-config)# dns-server 8.8.8.8 8.8.4.4

Use your internal DNS servers if available; otherwise, Google's 8.8.8.8 and 8.8.4.4 are reliable public options.

5

Set Lease Time and Domain Name (Optional)

Configure the DHCP lease duration and optionally the domain name for clients. The lease time can be set in days, hours, and minutes. A typical LAN lease is 1 day. The domain name is appended to unqualified hostnames.

Cisco IOS
Router(dhcp-config)# lease 1 0 0
Router(dhcp-config)# domain-name example.local
Router(dhcp-config)# exit

For guest networks, use a short lease (e.g., 30 minutes) to reclaim unused IPs quickly.

6

Verify DHCP Configuration and Operation

Exit configuration mode and verify the DHCP setup. Use `show ip dhcp pool` to view pool statistics, `show ip dhcp binding` to see active leases, and `show ip dhcp server statistics` for operational data. Test by connecting a client and checking its IP.

Cisco IOS
Router# show ip dhcp pool
Pool LAN_POOL :
 Utilization mark (high/low)    : 100 / 0
 Subnet size (first/next)       : 0 / 0
 Total addresses                : 254
 Leased addresses               : 3

Router# show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address       Client-ID/              Lease expiration        Type
192.168.1.11     0063.6973.636f.2d...    Mar 01 2026 12:00 PM   Automatic

If no clients receive IPs, check that the router interface in the client's VLAN has 'ip helper-address' configured if DHCP is on a different subnet.

7

Save the Configuration

Persist the DHCP configuration to startup-config so it survives a reload. Use `copy running-config startup-config` or `write memory`. This is a critical step often overlooked by beginners.

Cisco IOS
Router# copy running-config startup-config
Destination filename [startup-config]? 
Building configuration...
[OK]

Always save config after major changes — a power loss without saving means redoing all work.

Key tips

  • Always exclude the router's interface IP and any statically assigned devices before creating the DHCP pool to prevent IP conflicts.

  • Use the 'ip dhcp conflict logging' command to log address conflicts — helpful for troubleshooting duplicate IP issues.

  • For networks with multiple VLANs, configure 'ip helper-address' on each VLAN interface pointing to the DHCP server IP.

  • Test DHCP by releasing and renewing a client's IP (ipconfig /release then ipconfig /renew on Windows) to verify end-to-end functionality.

  • Set a reasonable lease time: 1 day for wired LANs, 30 minutes for guest Wi-Fi, and 8 hours for BYOD environments.

  • Document your DHCP pools and exclusions in network documentation — it saves hours during troubleshooting.

Frequently asked questions

What is the default DHCP lease time on a Cisco router?

The default lease time on Cisco IOS is 1 day (24 hours). You can change it with the 'lease' command in DHCP pool configuration mode, specifying days, hours, and minutes (e.g., 'lease 0 8 0' for 8 hours).

Can a Cisco router act as both DHCP server and DHCP client on different interfaces?

Yes. A Cisco router can serve DHCP on one interface (e.g., GigabitEthernet0/1) while obtaining a DHCP address on another (e.g., GigabitEthernet0/0 via 'ip address dhcp'). This is common for home or branch office routers with an ISP uplink.

How do I configure DHCP for multiple VLANs on a single Cisco router?

Create a separate DHCP pool for each VLAN subnet. On each VLAN interface, use 'ip helper-address <DHCP-server-IP>' to forward broadcast DHCP requests to the router's DHCP server. The router will match the request to the correct pool based on the interface's subnet.

What does 'ip dhcp excluded-address' do and why is it important?

It prevents the DHCP server from leasing specific IP addresses to clients. You should exclude addresses used by routers, switches, servers, printers, and other statically assigned devices. Without exclusions, the DHCP server might assign an IP already in use, causing a conflict.

How do I verify which DHCP bindings are active on a Cisco router?

Use the 'show ip dhcp binding' command to display all active leases, including IP address, MAC address (Client-ID), lease expiration, and type (Automatic/Manual). For pool statistics, use 'show ip dhcp pool' to see total and leased addresses.

Related glossary terms

Browse full glossary →

Practice with real exam questions

Apply what you just learned with exam-style practice questions.

Related guides