In this post I will configure DHCP Settings on my router. I turn on the DHCP service, create a pool and configure it with an IP range, domain name, DNS server, default router and lease. I add in exclusions for the addresses I do not want leased. Finally I check the running config.
router1(config)#service dhcp
router1(config)#ip dhcp pool dmz
router1(dhcp-config)#network 10.0.2.0 /24
router1(dhcp-config)#domain-name lab.local
router1(dhcp-config)#dns-server 8.8.8.8
router1(dhcp-config)#default-router 10.0.2.254
router1(dhcp-config)#lease 7
router1(dhcp-config)#exit
router1(config)#ip dhcp excluded-address 10.0.2.10 10.0.2.255
router1(config)#end
router1#sh run
!
ip subnet-zero
no ip dhcp use vrf connected
ip dhcp excluded-address 10.0.2.10 10.0.2.255
!
ip dhcp pool dmz
network 10.0.2.0 255.255.255.0
domain-name lab.local
dns-server 8.8.8.8
default-router 10.0.2.254
lease 7
!
!