Cisco DHCP server

Below you find the config and an basic example to make a Cisco router a DHCP server.
Make sure that you have an interface in the same network as the DCHP scope. That way the DHCP server becomes active on this interface.

CONFIG

!
ip dhcp excluded-address <_FIRST_ADDRESS_TO_EXLUDE_> <_LAST_ADDRESS_TO_EXLUDE_>
ip dhcp excluded-address <_FIRST_ADDRESS_TO_EXLUDE_> <_LAST_ADDRESS_TO_EXLUDE_>
ip dhcp excluded-address <_SINGLE_ADDRESS_TO_EXLUDE_>
!
ip dhcp pool <_NAME_>
network <_NETWORK_> <_SUBNET_MASK_>
dns-server <_DNS_SERVER_1_>
default-router <_DEFAULT_GATEWAY_IP>
!

EXAMPLE

RT01#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT01(config)#
RT01(config)#ip dhcp excluded-address 10.111.111.1 10.111.111.100
RT01(config)#ip dhcp excluded-address 10.111.111.200 10.111.111.254
RT01(config)#ip dhcp excluded-address 10.111.111.150
RT01(config)#
RT01(config)#ip dhcp pool internal
RT01(dhcp-config)#network 10.111.111.0 255.255.255.0
RT01(dhcp-config)#dns-server 10.0.10.11 141.136.120.43
RT01(dhcp-config)#default-router 10.111.111.254
RT01(dhcp-config)#exit
RT01(config)#exit
RT01#

For all available DHCP options please see https://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/network_registrar/9-0/dhcp/guide/DHCP_Guide/DHCP_Guide_appendix_01101.pdf

To verify your DHCP config you can use the following commands.

show ip dhcp binding
This will show you all the IP addresses that the router has leased, the MAC address of the DHCP client and the lease expiration.

show ip dhcp server statistics
With this command you can see whether you are receiving DHCP requests and if the router is replying to them.