DHCP Server Configuration on a Cisco ISR Router running IOS XE

, July 13th 2019

Let's take a look at the configuration required for a DHCP Server on an IOS XE router. For this post, we'll be using a Cisco ISR 1100 Series router but the configuration may be adjusted to work on any IOS XE device.

What is DHCP?

We'll start this post with a quick definition of DHCP.

DHCP is an acronym short for Dynamic Host Configuration Protocol. The protocol essentially allows client devices such as smartphones, computers, and routers to automatically obtain IP addresses without needing to be manually configured. This is pretty essential in our modern world. Imagine having to manually assign yourself an IP address every time you connect to a Wi-Fi hotspot; what a massive pain that would be.

Today's DHCP Lab

With that said, let's get onto the configuration of a basic DHCP server.

First, we'll need to enter configuration mode on our ISR router.

conf t

How to configure a DHCP pool

We may now configure a simple DHCP pool.

ip dhcp pool PC_POOL

In this example, we create a DHCP pool entitled "PC_POOL" and configure it with the network The network assigned to the pool is the IP range from which clients will be allocated addresses. The default-router value of is the IP address clients will automatically configure as their next-hop IP address. We also configure a DNS server in this example - clients connecting to our DHCP server will use the server for performing domain name resolution.

How to exclude an IP range from a pool

We often want to block specific addresses within our DHCP pool such that they cannot be allocated to clients. This can be useful if we want to reserve certain IP addresses on the network for manual management. Let's show an example of that.

ip dhcp excluded-address

This line of configuration will instruct our router to reserve addresses in the range from to

Configure interfaces on the DHCP pool range

Now that we have a DHCP server configured we'll proceed to configure a layer 3 interface with the address of our default-router.

interface Vlan10
 ip address
 no shutdown

This configuration creates a Virtual LAN interface and assigns an address matching the default-router of our pool.

We can now go on to configure a physical access port for a client to connect to. You'll notice that the VLAN-ID configured on the access port matches the index of our VLAN interface.

interface GigabitEthernet0/1/0
 switchport access vlan 10
 no shutdown

That is all to get going! Connect a laptop to the physical port GigabitEthernet0/1/0. You'll notice an IP assignment of; this is the first free address after our reserved range.

How to verify DHCP bindings

We can also verify the allocation using a simple command on our router. Leave configuration mode with the "end" command before executing.

Router# 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       018c.1645.3d45.6c       Jul 14 2019 09:18 AM    Automatic  Active     Vlan10

If all is well you should see an output similar to the above.

How to assign a static IP to a particular MAC address

We mentioned earlier in the post that it can be useful to reserve IP addresses in a pool for manual management. Assume we want our laptop to have a static IP of We can create this setup quite easily.

First, let's disconnect our laptop from the router and clear the existing DHCP lease.

clear ip dhcp binding

Next, enter configuration mode once again.

conf t

We may now configure a new DHCP pool but this time we'll only add one address to the pool. You'll also notice the client-identifier attribute configured with the MAC address of our laptop.

 client-identifier 018c.1645.3d45.6c

That is all we need. Connect your laptop once again and this time you'll notice the static assignment of

Router# 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        018c.1645.3d45.6c       Infinite                Manual     Active     Vlan10

Hopefully, these examples helped your understanding of DHCP servers on the IOS XE platform. If you have any questions, feel free to leave a comment beneath the post and we'll do our best to help.

Ultra Config Generator

You may download a template of the configuration discussed and import it into your Ultra Config Generator instance. We've also shown a screenshot of the template in action.

Download: dhcp-server-2019-07-13.json

UCG DHCP Server Template

Figure 1: UCG DHCP Server Template

If you haven't heard of Ultra Config Generator, I would highly recommend you check it out. We designed the product to allow network engineers to generate and automate network configuration in a highly flexible, efficient and elegant manner. Our users love the application and I hope that you will too.

Take care until next time!

Ultra Config


Subscribe to the Blog

Subscribe now and never miss a new post!