In the following example we’re configuring a DHCP pool called “company” for the IP adress range 10.1.1.100 to 10.1.1.150 in a /24 subnet. (The example setup uses 10.1.1.254 as default gateway and DNS server.)
The configuration should be quite self explanatory:
ip dhcp pool company
network 10.1.1.0 255.255.255.0
domain-name company.com
dns-server 10.1.1.254
default-router 10.1.1.254
lease 7
exit
ip dhcp excluded-address 10.1.1.1 10.1.99
ip dhcp excluded-address 10.1.1.151 10.1.1.254
To display all current DHCP leases type:
show ip dhcp binding
If the WAN interface of the router is configured for DHCP (eg. if your ISP provides a dynamic IP address) you can easily import the configuration into your DHCP settings:
ip dhcp import all