How to configure DHCP server on a Cisco router

by Remy Pereira on 02nd July 2013

Cisco IOS has a DHCP server feature that lets you configure a router as a DHCP server and assign IP addresses to clients connected to it from specified address pools.

A Cisco router can either be the primary DHCP server or one of the secondary DHCP servers.

It is also possible to configure an interface on a Cisco router to be a DHCP client and get IP address from a DHCP server.

The following is a sample configuration of a Cisco 2600 router R1 as DHCP server

A sample scenario

The network is
The DHCP server IP is
The 10 addresses from to are reserved and not to be assigned to DHCP clients hence these have to be excluded from the DHCP pool.

Configuration Steps

Step 1: Configure one interface on R1 with IP address

R1# configure terminal
R1(config)# interface fastethernet0/0
R1(config-if)# ip address
R1(config-if)# no shutdown
R1(config-if)# exit

Step 2: Configure DHCP

R1(config)# ip dhcp excluded-address
R1(config)# ip dhcp pool MY_POOL
R1(dhcp-config)# network
R1(dhcp-config)# default-router
R1(dhcp-config)# dns-server
R1(dhcp-config)# domain-name
R1(dhcp-config)# exit

To configure a router interface as DHCP Client

The commands to configure DHCP client on a router interface are

RouterA# configure terminal
RouterA# interface fastethernet0/0
RouterA# ip address dhcp
RouterA# no shutdown

Post a comment


mohammad | November 15, 2016 4:37 PM |

thank you. it works for me