Skip to content

DHCP Pool

DHCP (Dynamic Host Configuration Protocol) server pool configuration enables centralized IP address assignment to network clients. Each pool defines a scope of addresses along with associated network parameters such as the default gateway, DNS servers, domain name, lease duration, and custom DHCP options. Pools can be bound to a specific VRF for multi-tenant environments, and support both dynamic network-based allocation and static host bindings for devices that require fixed addresses.

Diagram
NameTypeConstraintMandatoryDefault Value
dhcp_poolsList[dhcp_pools]No

NameTypeConstraintMandatoryDefault Value
nameStringYes
vrfStringNo
domain_nameStringNo
bootfileStringNo
client_nameStringNo
network_numberStringNo
network_maskStringNo
secondary_networksList[secondary_networks]No
host_numberStringNo
host_maskStringNo
default_routersListStringNo
dns_serversListStringNo
next_serversListStringNo
lease_daysIntegermin: 0, max: 365No
lease_hoursIntegermin: 0, max: 23No
lease_minutesIntegermin: 0, max: 59No
lease_infiniteBooleantrue, falseNo
utilization_mark_highIntegermin: 1, max: 100No
utilization_mark_high_logBooleantrue, falseNo
utilization_mark_lowIntegermin: 1, max: 100No
utilization_mark_low_logBooleantrue, falseNo
subnet_prefix_lengthIntegermin: 1, max: 32No
optionsList[options]No

secondary_networks (iosxe.devices.configuration.dhcp_pools)

Section titled “secondary_networks (iosxe.devices.configuration.dhcp_pools)”
NameTypeConstraintMandatoryDefault Value
numberStringYes
maskStringYes

options (iosxe.devices.configuration.dhcp_pools)

Section titled “options (iosxe.devices.configuration.dhcp_pools)”
NameTypeConstraintMandatoryDefault Value
option_codeIntegermin: 0, max: 254Yes
asciiStringNo
hexStringNo
ipListStringNo
ip_legacyListStringNo

  • DHCP pool option IP addresses have version-specific attributes:
    • IOS-XE 17.15 and later: Use ip within options
    • IOS-XE prior to 17.15: Use ip_legacy within options
    • These are mutually exclusive — configure only the appropriate one based on your target IOS-XE version.
  • The lease_days, lease_hours, lease_minutes attributes and lease_infinite are mutually exclusive lease configurations.
  • The network_number/network_mask and host_number/host_mask attributes configure the pool for dynamic vs. manual (static) binding and should not both be set on the same pool.

DHCP pools are the core building block for on-device DHCP services. By defining multiple pools you can segment address allocation across VLANs, VRFs, or functional groups while maintaining consistent network parameters for each client population.

ip dhcp pool POOL_DATA
network 10.1.1.0 255.255.255.0
network 10.1.3.0 255.255.255.0 secondary
default-router 10.1.1.1
dns-server 8.8.8.8 8.8.4.4
domain-name example.com
bootfile boot.cfg
next-server 10.1.1.10
lease 7 12 30
option 150 ascii 10.1.1.1
option 66 hex 0a010101
option 42 ip 10.1.1.20 10.1.1.21
utilization mark high 80 log
utilization mark low 20 log
iosxe:
devices:
- name: Router1
configuration:
dhcp_pools:
- name: POOL_DATA
network_number: "10.1.1.0"
network_mask: "255.255.255.0"
secondary_networks:
- number: "10.1.3.0"
mask: "255.255.255.0"
default_routers:
- "10.1.1.1"
dns_servers:
- "8.8.8.8"
- "8.8.4.4"
next_servers:
- "10.1.1.10"
domain_name: "example.com"
bootfile: "boot.cfg"
lease_days: 7
lease_hours: 12
lease_minutes: 30
subnet_prefix_length: 24
utilization_mark_high: 80
utilization_mark_high_log: true
utilization_mark_low: 20
utilization_mark_low_log: true
options:
- option_code: 150
ascii: "10.1.1.1"
- option_code: 66
hex: "0a010101"
- option_code: 42
ip: # IOS-XE 17.15+
- "10.1.1.20"
- "10.1.1.21"
# - option_code: 42 # IOS-XE pre-17.15
# ip_legacy:
# - "10.1.1.20"
# - "10.1.1.21"
ip dhcp pool POOL_VOICE
vrf VOICE
network 10.1.2.0 255.255.255.0
default-router 10.1.2.1
dns-server 10.1.2.1
lease 0 8
iosxe:
devices:
- name: Router1
configuration:
dhcp_pools:
- name: POOL_VOICE
vrf: "VOICE"
network_number: "10.1.2.0"
network_mask: "255.255.255.0"
default_routers:
- "10.1.2.1"
dns_servers:
- "10.1.2.1"
lease_days: 0
lease_hours: 8
ip dhcp pool POOL_PRINTER
host 10.1.1.100 255.255.255.0
client-name printer1
lease infinite
iosxe:
devices:
- name: Router1
configuration:
dhcp_pools:
- name: POOL_PRINTER
host_number: "10.1.1.100"
host_mask: "255.255.255.0"
client_name: "printer1"
lease_infinite: true