How to configure a DHCP Server on CISCO IOS

As you know, Routers and L3 switches can be configured to act as a DHCP server. So, in this post, we will see how to configure DHCP on Cisco IOS.

Let’s take the following topology:


As you can see, we have a DHCP Server; in our case here is a router, and 2 DHCP clients. The clients will be configured to receive their IP addresses using DHCP. We are using the network and the Fa0/0 of our router (DHCP Server) will use

Let’s start by configuring the IP address on the Fa0/0:

DHCP_SERVER(config)#interface fa0/0
DHCP_SERVER(config-if)#ip address
DHCP_SERVER(config-if)#no shutdown

Noting special here. Now we will start to configure our DHCP server:

DHCP_SERVER(config)#ip dhcp pool DYNAMIC

You will have to start by the ip dhcp pool command and give a name to this pool (DYNAMIC in our case). This DHCP pool will use That’s all you have to do it if you want to configure a DHCP Server on your network. Let’s see if this is true:

DHCP_SERVER#show ip dhcp binding
IP address        Client-ID/      Lease expiration       Type
Hardware address     0090.0CBD.8215           —                     Automatic     0090.0C2D.7922           —                     Automatic

To verify if your DHCP server is running, look to your bindings by using the show ip dhcp binding command. You can see that we have 2 DHCP clients, and they receive IP addresses.

This is the basic configuration of our DHCP server. But imagine that your hosts want to go on the internet, for this, they have to know a default gateway and a DNS server. Let’s add this information to our DHCP server, so he will let the DHCP clients know that the default gateway is and the DNS server  is

DHCP_SERVER(config)#ip dhcp pool DYNAMIC

We used the default-router command to configure the gateway, and dns-server command to configure the IP address of the DNS server.

Last thing; imagine that you are using some static addressing in your network, for example from to In this case, we have to tell our DHCP Server to not affect these addresses to any host. Let’s see how we can do this:

DHCP_SERVER(config)#ip dhcp excluded-address

ip dhcp excluded-address “@IP” command tells the DHCP server to exclude these addresses from the pool of available addresses.

That’s all that I have for you. If you have any questions, just leave a comment.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.