How to Configure DHCP on Cisco Router?

The DHCP protocol is used to automatically assign IP addresses on IP networks. You can deploy a DHCP server on a separate Windows Server or Linux host. Such a server will assign and manage IPv4/IPv6 addresses for DHCP clients. Also, most network routers support the DHCP server mode. In this article, we will show you how to configure a DHCP server on a Cisco router running the Cisco IOS operating system.

configure dhcp on cisco router

The Cisco router is configured from the Cisco IOS command line. Connect to your Cisco router via telnet/SSH and go to the configuration mode.

Router #configure terminal

The DHCP server service is enabled by default in Cisco IOS. If it is disabled, you can enable it with the command:

Router(config)# service dhcp

Next, you must create DHCP pools from which you need to distribute IP addresses to clients. Let’s say you want your router to assign IP addresses in the network starting from IP address

Create a new DHCP pool:

Router(config)# ip dhcp pool LAN1

Next, you need to specify the IP subnet, gateway address and DNS server addresses:

Router(dhcp-config)# network

Router(dhcp-config)# default-router

Router(dhcp-config)# dns-server

You can additionally configure various DHCP pool options, for example:

  • Set a domain name: Router (dhcp-config)#domain-name
  • DHCP lease time (the default lease time is 1 day): Router(dhcp-config)# lease 2
  • NetBIOS WINS server address (for Microsoft networks): Router(dhcp-config)# netbios-name-server
READ ALSO  Configuring DHCP Load Balancing on Windows Server 2016

To finish configuring the DHCP pool, run:

Router (dhcp-config)#exit

Tip. Note that the DHCP service on a Cisco router is not bound to a specific interface.

To exclude a specific range from the DHCP pool, run the command:

Router(config)#ip dhcp excluded-address

Router(config)#ip dhcp excluded-address

These commands prevent the router from assigning these IP addresses to clients.

You can create DHCP reservations. The MAC address of the device specified in the reservation will always be assigned the same IP address, which cannot be assigned to another device.

Router(config)# ip dhcp pool LAN1



Router(config-pool)#client-name iis-server

The unique MAC address of the device is specified as the client-identifier argument.

Hint. Please note that for Windows clients of networks 01 is specified before the MAC address, and 00 for Linux/Unix networks.

If you don’t know the client type of customer, you can create a reservation like this:

Router(config)# ip dhcp pool LAN1



Router(config-pool)#client-name apache-server

Now you need to get an address lease from a DHCP client. In Windows, to update the IP address, use the ipconfig command:

ipconfig /release

ipconfig /renew

You can view the assigned IP address using the command:

ipconfig /all

dhcp on cisco router

The screenshot shows that the Windows client has been assigned an IP address from the DHCP server

READ ALSO  How to Migrate DHCP Server to Windows Server 2016/2019?

On a Cisco router, you can list all IP addresses and associated MAC addresses that were issued by the DHCP server:

router#show ip dhcp binding

IP address Client-ID/ Lease expiration Type

Hardware address 0050.2CA5.F573 Jul 19 2020 12:25 AM Automatic

You can reset the assigned IP address to the client:

Router# clear ip dhcp binding

Or completely clear the table of correspondence between physical addresses and IP addresses issued from the DHCP server pool:

Router#clear ip dhcp binding

To view DHCP server statistics, use the command:

Router# show ip dhcp server statistics
Cyril Kardashevsky

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.