DHCP stands for Dynamic Host Configuration Protocol. It is a network protocol that automatically assigns IP addresses and other network parameters — such as subnet mask, default gateway, and DNS server — to devices on a network. Without DHCP, every device would need to be manually configured with a unique IP address, which quickly becomes unmanageable as the network grows.
Cisco switches and routers can act as a DHCP server directly, removing the need for a dedicated server in small to medium-sized networks.
Every time a device joins the network and requests an IP address, it goes through a four-step exchange with the DHCP server known as the DORA process:
This process repeats when a device restarts or when the IP lease expires. The lease duration is configurable — shorter leases reclaim addresses faster in dynamic environments, while longer leases reduce DHCP traffic overhead.
The configuration involves three parts: excluding addresses that should never be assigned dynamically (such as the gateway and any reserved IPs), creating the DHCP pool that defines the address range and options, and optionally setting a lease duration.
Before creating the DHCP pool, exclude the IP addresses you do not want DHCP to hand out automatically. This typically includes the default gateway, network devices, printers, servers, and any address you plan to reserve for a specific device.
SW01(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
This excludes the range 192.168.1.1 through 192.168.1.10. Addresses outside this range will be available for dynamic assignment. You can add multiple exclusion statements if needed.
Define the DHCP pool with the network range, default gateway, and DNS server:
SW01(config)# ip dhcp pool LAN-POOL SW01(dhcp-config)# network 192.168.1.0 255.255.255.0 SW01(dhcp-config)# default-router 192.168.1.1 SW01(dhcp-config)# dns-server 8.8.8.8 SW01(dhcp-config)# lease 7 SW01(dhcp-config)# end
The lease 7 command sets the IP lease duration to 7 days. You can also specify hours and minutes using lease <days> <hours> <minutes>, or use lease infinite for a permanent lease.
SW01# configure terminal SW01(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10 SW01(config)# ip dhcp pool LAN-POOL SW01(dhcp-config)# network 192.168.1.0 255.255.255.0 SW01(dhcp-config)# default-router 192.168.1.1 SW01(dhcp-config)# dns-server 8.8.8.8 SW01(dhcp-config)# lease 7 SW01(dhcp-config)# end SW01# write memory
After configuration, use show ip dhcp binding to confirm that the server is handing out addresses to clients:
SW01# show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type State Interface
Hardware address/
User name
192.168.1.11 0050.7966.6801 Jul 08 2025 09:00 AM Automatic Active GigabitEthernet0/1
192.168.1.12 0050.7966.6802 Jul 08 2025 09:00 AM Automatic Active GigabitEthernet0/2
192.168.1.13 0050.7966.6803 Jul 08 2025 09:00 AM Automatic Active GigabitEthernet0/3
Each line shows the assigned IP, the client's hardware address (MAC), the lease expiry time, and the type (Automatic for dynamically assigned addresses). Additional useful verification commands:
SW01# show ip dhcp pool ! View pool statistics and address usage SW01# show ip dhcp conflict ! Check for any IP conflicts detected by the server
DHCP IP reservation (also called a static DHCP binding or DHCP reservation) allows you to permanently assign a specific IP address to a device based on its MAC address. The device still goes through the normal DORA process, but the DHCP server always returns the same IP address for that particular MAC — giving you the convenience of DHCP with the predictability of a static IP.
This is ideal for devices that need a consistent IP address — such as printers, servers, IP cameras, or access points — without having to configure static IPs on each device individually.
Cisco DHCP reservations use the client-identifier to identify a device. The client-identifier is derived from the device's MAC address with a prefix of 01 added at the beginning, which represents the Ethernet hardware type.
For example, if a device has a MAC address of 00:50:79:66:68:02, the client-identifier is:
0100.5079.6668.02
The format breakdown is: 01 (Ethernet type prefix) + MAC address with dots every four characters. You can find the MAC address of a device from the show ip dhcp binding output, ARP table, or from the device itself.
The client-identifier must include the 01 prefix. Without it, the reservation will not match the client and the device will receive a dynamic address instead.
If you have a MAC address in the standard format, here is how to convert it:
MAC address: 00:50:79:66:68:02 (or 00-50-79-66-68-02) Remove separators: 005079666802 Add 01 prefix: 01005079666802 Cisco format: 0100.5079.6668.02
Each reservation requires its own DHCP pool. The pool uses host instead of network to define a single IP address:
SW01(config)# ip dhcp pool RESERVATION-PRINTER SW01(dhcp-config)# host 192.168.1.20 255.255.255.0 SW01(dhcp-config)# client-identifier 0100.5079.6668.02 SW01(dhcp-config)# client-name OFFICE-PRINTER SW01(dhcp-config)# end
The reserved IP address (192.168.1.20 in this example) must also be in the excluded range defined by ip dhcp excluded-address. If it is not excluded, the DHCP server may hand that address out to another device before the reservation is used, causing an IP conflict.
For multiple devices, create a separate pool for each reservation. Here is a complete configuration example with a dynamic pool and three reservations:
SW01# configure terminal ! Reservation for Office Printer SW01(config)# ip dhcp pool RESERVATION-PRINTER SW01(dhcp-config)# host 192.168.1.20 255.255.255.0 SW01(dhcp-config)# client-identifier 0100.5079.6668.02 SW01(dhcp-config)# client-name OFFICE-PRINTER ! Reservation for PC-01 SW01(config)# ip dhcp pool RESERVATION-PC-01 SW01(dhcp-config)# host 192.168.1.21 255.255.255.0 SW01(dhcp-config)# client-identifier 0100.5079.6668.03 SW01(dhcp-config)# client-name PC-01 ! Reservation for PC-02 SW01(config)# ip dhcp pool RESERVATION-PC-02 SW01(dhcp-config)# host 192.168.1.22 255.255.255.0 SW01(dhcp-config)# client-identifier 0100.5079.6668.04 SW01(dhcp-config)# client-name PC-02 SW01(dhcp-config)# end SW01# write memory
Use show ip dhcp binding to confirm reservations are active. Reserved entries show as Manual type with an Infinite lease — unlike dynamic assignments which show Automatic with an expiry time:
SW01# show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type State Interface
Hardware address/
User name
192.168.1.11 0050.7966.6801 Jul 08 2025 09:00 AM Automatic Active GigabitEthernet0/1
192.168.1.20 0100.5079.6668.02 Infinite Manual Active Unknown
192.168.1.21 0100.5079.6668.03 Infinite Manual Active Unknown
192.168.1.22 0100.5079.6668.04 Infinite Manual Active Unknown
The key indicators that a reservation is correctly configured:
You can also view the pool configuration to confirm all reservations are saved correctly:
SW01# show ip dhcp pool Pool RESERVATION-PRINTER : Utilization mark (high/low) : 100 / 0 Subnet size (first/next) : 0 / 0 Total addresses : 1 Leased addresses : 1 Pending event : none 1 subnet is currently in the pool: Current index IP address range Leased/Excluded/Total 192.168.1.20 192.168.1.20 - 192.168.1.20 1 / 0 / 1
A reservation showing Leased: 1 confirms the device is actively using the reserved IP address.
01 prefix and dots every four characters (e.g., 0100.5079.6668.02).
ip dhcp excluded-address 192.168.1.20. Without this, the dynamic pool may assign that address to another device before the reserved device requests it.
hardware-address command instead of client-identifier:
SW01(dhcp-config)# hardware-address 0050.7966.6802
clear ip dhcp binding 192.168.1.20. Then release and renew the IP on the client side.
Configuring a Cisco switch or router as a DHCP server eliminates the need for manual IP assignment across the network. Adding DHCP reservations on top of that gives you the best of both worlds — devices join the network automatically through DHCP, but critical devices always receive the same predictable IP address every time.
The key points to remember:
ip dhcp excluded-addresshost instead of networkclient-identifier is the device MAC address with an 01 prefix in Cisco dotted formatshow ip dhcp bindingProper use of DHCP reservations removes the maintenance burden of managing static IPs on individual devices while keeping your address plan predictable and conflict-free.