Courseiva
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.

Definition: ip dhcp pool [name] is a Cisco IOS global config command. 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.

Overview

The `ip dhcp pool [name]` command is a fundamental tool in Cisco IOS for configuring Dynamic Host Configuration Protocol (DHCP) services directly on a router or switch. DHCP automates the assignment of IP addresses, subnet masks, default gateways, DNS servers, and other network parameters to clients, eliminating the need for manual configuration on each device. This command creates a named DHCP pool and enters DHCP pool configuration mode, where you define the subnet from which addresses are allocated, along with optional parameters like lease duration, domain name, and static bindings for specific MAC addresses.

Understanding this command is critical for CCNA and CCNP candidates because DHCP is ubiquitous in enterprise networks, and the ability to configure and troubleshoot it on Cisco devices is a core skill. The command is typically used when a router or switch acts as a DHCP server for a local subnet, often in branch offices or small-to-medium networks where a dedicated DHCP server is not justified. Alternatives include using an external DHCP server (e.g., Windows Server, ISC DHCP) or configuring DHCP relay (`ip helper-address`) to forward requests to a central server.

The `ip dhcp pool` command is part of a broader DHCP configuration workflow that includes excluding addresses (`ip dhcp excluded-address`), setting global DHCP parameters (`ip dhcp`), and verifying with `show ip dhcp binding` and `show ip dhcp pool`. Important IOS behavior: the command is available in global configuration mode and requires privilege level 15. When you enter the pool name, the prompt changes to `Router(dhcp-config)#`, indicating you are in DHCP pool configuration submode.

The running configuration stores the pool parameters, and the command takes effect immediately. However, DHCP services are not enabled until you specify at least a network statement. Also, the router must have an IP address on the interface serving the subnet, or DHCP relay must be configured.

The command does not buffer output; changes are applied instantly. One nuance: if you create a pool with the same name as an existing pool, the new configuration overwrites the old one. Additionally, the pool name is case-sensitive and can include alphanumeric characters and hyphens.

The command is supported in IOS 12.x and later, including IOS-XE, but not in NX-OS (which uses `ip dhcp pool` but with different syntax) or IOS-XR (which uses `dhcp ipv4`). In summary, `ip dhcp pool` is the entry point for defining how a Cisco device assigns IP addresses dynamically, making it a cornerstone of network automation and scalability.

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.

Parameters

ParameterSyntaxDescription
nameWORD (1-32 characters)The name of the DHCP pool. It is a case-sensitive alphanumeric string (up to 32 characters) that identifies the pool. Common mistakes include using spaces or special characters (only hyphens and underscores are allowed) and forgetting that the name must be unique; if a pool with the same name exists, it will be overwritten.

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.

Configuration Scenarios

Basic DHCP Pool for a Small Office LAN

A small office has a single subnet (192.168.1.0/24) and needs a router to act as the DHCP server for 50 workstations. The router's LAN interface is GigabitEthernet0/0 with IP 192.168.1.1/24.

Topology

Router(Gi0/0)---192.168.1.0/24---Workstations

Steps

  1. 1.Step 1: Enter global configuration mode: Router> enable
  2. 2.Step 2: Enter global config: Router# configure terminal
  3. 3.Step 3: Exclude the router's own IP and any static addresses: Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
  4. 4.Step 4: Create the DHCP pool: Router(config)# ip dhcp pool LAN-POOL
  5. 5.Step 5: Define the network: Router(dhcp-config)# network 192.168.1.0 255.255.255.0
  6. 6.Step 6: Set the default gateway: Router(dhcp-config)# default-router 192.168.1.1
  7. 7.Step 7: Set DNS servers: Router(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
  8. 8.Step 8: Set lease time (optional): Router(dhcp-config)# lease 7
  9. 9.Step 9: Exit DHCP config: Router(dhcp-config)# exit
  10. 10.Step 10: Verify: Router(config)# do show ip dhcp pool
Configuration
! Basic DHCP configuration
ip dhcp excluded-address 192.168.1.1 192.168.1.10
!
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
!

Verify: Use `show ip dhcp pool` to see pool utilization and `show ip dhcp binding` to see active leases. Expected output: Pool LAN-POOL : Utilization 10% (5/50 addresses in use).

Watch out: Forgetting to exclude the router's own IP address from the pool can cause the router to assign its own IP to a client, leading to an IP conflict. Always exclude the router interface IP and any static addresses.

DHCP Pool with Static Bindings for Printers

A company wants to assign fixed IP addresses to two network printers based on their MAC addresses, while dynamically assigning addresses to workstations from the same subnet (10.0.0.0/24). The router interface is 10.0.0.1/24.

Topology

Router(Gi0/0)---10.0.0.0/24---[Workstations, Printer1 (MAC: aaaa.bbbb.cccc), Printer2 (MAC: dddd.eeee.ffff)]

Steps

  1. 1.Step 1: Enter global configuration: Router# configure terminal
  2. 2.Step 2: Exclude addresses for static assignments: Router(config)# ip dhcp excluded-address 10.0.0.1 10.0.0.10
  3. 3.Step 3: Create DHCP pool: Router(config)# ip dhcp pool CORP-POOL
  4. 4.Step 4: Define network: Router(dhcp-config)# network 10.0.0.0 255.255.255.0
  5. 5.Step 5: Set default gateway: Router(dhcp-config)# default-router 10.0.0.1
  6. 6.Step 6: Set DNS: Router(dhcp-config)# dns-server 10.0.0.2
  7. 7.Step 7: Add static binding for Printer1: Router(dhcp-config)# host 10.0.0.11 255.255.255.0
  8. 8.Step 8: Specify MAC: Router(dhcp-config)# hardware-address aaaa.bbbb.cccc
  9. 9.Step 9: Add static binding for Printer2: Router(dhcp-config)# host 10.0.0.12 255.255.255.0
  10. 10.Step 10: Specify MAC: Router(dhcp-config)# hardware-address dddd.eeee.ffff
  11. 11.Step 11: Exit: Router(dhcp-config)# exit
  12. 12.Step 12: Verify: Router(config)# do show ip dhcp binding
Configuration
! DHCP with static bindings
ip dhcp excluded-address 10.0.0.1 10.0.0.10
!
ip dhcp pool CORP-POOL
 network 10.0.0.0 255.255.255.0
 default-router 10.0.0.1
 dns-server 10.0.0.2
 host 10.0.0.11 255.255.255.0
 hardware-address aaaa.bbbb.cccc
 host 10.0.0.12 255.255.255.0
 hardware-address dddd.eeee.ffff
!

Verify: Use `show ip dhcp binding` to see both dynamic and static bindings. Expected output: Bindings from all pools not associated with VRF: IP address 10.0.0.11 is bound to aaaa.bbbb.cccc (Printer1).

Watch out: When using static bindings, you must specify the `host` command before the `hardware-address` command within the same pool. If you define a static binding, the pool cannot have a `network` statement (the host command overrides it). In this scenario, the network statement is still needed for dynamic clients, but the static bindings must be placed in a separate pool or use the `client-identifier` option. A common mistake is mixing `network` and `host` in the same pool; instead, create a separate pool for static bindings or use `client-identifier` with the MAC address.

Troubleshooting with This Command

When troubleshooting DHCP issues, the `ip dhcp pool` command itself is not used directly for diagnostics, but the pools it creates are examined with show commands. A healthy DHCP pool should have available addresses, and clients should receive leases. Problem indicators include high utilization (e.g., 100% of addresses in use), binding conflicts, or clients failing to obtain an IP.

Focus on the pool's subnet mask, default router, and DNS servers—misconfigurations here cause clients to get incorrect parameters. Common symptoms: clients receive an APIPA address (169.254.x.x) indicates no DHCP server response; check if the pool is configured and the interface is up. If clients get an IP but cannot reach the internet, verify the default-router and DNS settings.

Step-by-step diagnostic flow: 1) Use `show ip dhcp pool` to check pool name, subnet, and utilization. If utilization is high, consider expanding the subnet or reducing lease time. 2) Use `show ip dhcp binding` to see active leases; look for unexpected IPs or MACs. 3) Use `debug ip dhcp server events` to see real-time DHCP exchanges; look for DISCOVER, OFFER, REQUEST, ACK. If no OFFER is sent, the pool may be full or the subnet does not match the client's request. 4) Verify the interface IP and subnet: the router must have an IP in the same subnet as the pool, or DHCP relay must be configured.

Use `show ip interface brief` to confirm. 5) Check for excluded addresses: if the router's own IP is not excluded, it may be assigned to a client. Use `show run | include ip dhcp excluded-address`. 6) Correlate with `show ip arp` to see if clients are reachable. If a client has an IP but no ARP entry, there may be a layer 2 issue.

Also, use `show ip dhcp conflict` to see any address conflicts detected by the router. In summary, the `ip dhcp pool` command sets up the configuration, but troubleshooting relies on show and debug commands to verify proper operation.

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.

ip dhcp pool [name] vs ip dhcp excluded-address [start] [end]

These commands are often considered together because both control DHCP address assignment: ip dhcp pool defines the scope of addresses offered, while ip dhcp excluded-address prevents specific addresses from being leased. Misunderstanding their interaction can lead to conflicts or address exhaustion.

Aspectip dhcp pool [name]ip dhcp excluded-address [start] [end]
ScopeDefines the subnet and options for address leasePrevents assignment of specific IPs
Configuration modeGlobal config then DHCP pool configGlobal config only
PersistenceSaved in running-configSaved in running-config
PrecedencePool defines the range; exclusion overridesExcluded addresses take priority over pool
Typical useCreating a new DHCP scopeReserving addresses for static devices

Use ip dhcp pool [name] when you need to define a new DHCP address range and associated parameters like default gateway and DNS.

Use ip dhcp excluded-address [start] [end] when you need to reserve specific IP addresses for devices that require static assignments, such as servers or routers.

Platform Notes

In IOS-XE (e.g., Catalyst 9000 switches), the `ip dhcp pool` command syntax is identical to classic IOS, but the output of `show ip dhcp pool` may include additional fields like 'VRF' if configured. The command is fully supported. In NX-OS (e.g., Nexus switches), the equivalent command is `ip dhcp pool [name]` but the submode uses different parameters: `network` is replaced by `subnet` and `default-router` is `default-gateway`.

Also, NX-OS requires the `feature dhcp` command to enable DHCP services. For example: `feature dhcp` then `ip dhcp pool LAN-POOL` then `subnet 192.168.1.0/24` and `default-gateway 192.168.1.1`. In ASA firewalls, DHCP server configuration is done via `dhcpd` commands, not `ip dhcp pool`.

For instance: `dhcpd address 192.168.1.1-192.168.1.100 inside` and `dhcpd dns 8.8.8.8`. ASA does not use named pools. In IOS-XR (e.g., ASR 9000), DHCP server configuration is different: use `dhcp ipv4` configuration mode, e.g., `dhcp ipv4` then `pool vrf default` then `network 192.168.1.0/24` and `default-router 192.168.1.1`.

The `ip dhcp pool` command does not exist in IOS-XR. Between IOS versions (12.x vs 15.x vs 16.x), the command has remained largely consistent, but newer versions support additional options like `option` for custom DHCP options and `client-id` for static bindings. Always check the specific IOS version documentation for any deprecated or new parameters.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions