DHCPGlobal Config

ip dhcp pool [name]

Creates a DHCP pool and enters DHCP pool configuration mode, where you define the subnet, default gateway, DNS servers, and other DHCP options for assigning IP addresses to clients.

Syntax·Global Config
ip dhcp pool [name]

When to Use This Command

  • Configuring a DHCP server on a router to assign IP addresses to hosts in a small office LAN.
  • Setting up a separate DHCP pool for a guest wireless network with a different subnet and DNS servers.
  • Creating multiple DHCP pools for different VLANs on a router-on-a-stick configuration.
  • Configuring DHCP options like TFTP server address for IP phone provisioning.

Command Examples

Basic DHCP Pool Configuration

ip dhcp pool LAN_POOL network 192.168.1.0 255.255.255.0 default-router 192.168.1.1 dns-server 8.8.8.8 8.8.4.4 lease 7
Router(config)# ip dhcp pool LAN_POOL
Router(dhcp-config)# network 192.168.1.0 255.255.255.0
Router(dhcp-config)# default-router 192.168.1.1
Router(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
Router(dhcp-config)# lease 7

The command 'ip dhcp pool LAN_POOL' creates a pool named LAN_POOL and enters DHCP config mode. 'network' defines the subnet to assign addresses from. 'default-router' sets the gateway. 'dns-server' specifies DNS servers. 'lease' sets the lease duration in days.

DHCP Pool with Excluded Addresses and Options

ip dhcp pool VOICE_POOL network 10.0.0.0 255.255.255.0 default-router 10.0.0.1 option 150 ip 10.0.0.2 lease 0 8 0
Router(config)# ip dhcp pool VOICE_POOL
Router(dhcp-config)# network 10.0.0.0 255.255.255.0
Router(dhcp-config)# default-router 10.0.0.1
Router(dhcp-config)# option 150 ip 10.0.0.2
Router(dhcp-config)# lease 0 8 0

This pool is for VoIP phones. 'option 150 ip' specifies the TFTP server IP for phone configuration. 'lease 0 8 0' sets lease to 8 hours (0 days, 8 hours, 0 minutes).

Understanding the Output

The output shows the DHCP pool configuration commands as they are entered. There is no immediate output from the 'ip dhcp pool' command itself; it simply enters DHCP configuration mode. The subsequent commands define the pool parameters. To verify the pool, use 'show ip dhcp pool' or 'show ip dhcp binding'. In 'show ip dhcp pool', you'll see the pool name, utilization, subnet, and lease details. In 'show ip dhcp binding', you'll see IP addresses assigned to MAC addresses with lease expiration times. Good values include addresses in the 'Bound' state; bad values are 'Expired' or 'Declined' entries. Watch for pools that are 100% utilized, indicating exhaustion.

CCNA Exam Tips

1.

Remember that 'ip dhcp pool' is a global config command that enters DHCP config mode; you must then specify the network and default-router.

2.

The 'network' command defines the subnet; the router automatically excludes its own interface IP if it falls within the pool range.

3.

You can manually exclude addresses using 'ip dhcp excluded-address' before creating the pool.

4.

CCNA may test that DHCP pools are associated with a specific interface via 'ip helper-address' if the DHCP server is on a different subnet.

Common Mistakes

Forgetting to configure 'ip dhcp excluded-address' for static IPs like the router's own interface, causing conflicts.

Not specifying a default-router, which results in clients not getting a gateway and being unable to reach other networks.

Creating a pool without a 'network' statement, leaving the pool empty and non-functional.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions