Exclude the IP addresses that you do not want to assign via dhcp. (For example statically assigned addresses for default gateways, servers etc.)
TIP! Make sure that you leave room in case you need to add more static addresses down the line.
R1> (config) # ip dhcp excluded-address 192.168.0.1 192.168.0.5
The first IP address 192.168.0.1 is the low IP address and the 192.168.0.5 is the high IP address (We are going to set aside five addresses for possible static assignment, these addresses will not be included in our DHCP assignment to any other devices.
Now that we have excluded the addresses that we do not want to advertise in our DHCP process we can move onto step2.
Create a DHCP pool – This places the router into DHCP configuration mode where we can add other parameters such as the Network IP and mask, default-router, domain-name, Lease time.)
Tip! Make sure when creating the name for the DHCP pool that it is something that has meaning and can be easily understood. In my case I named it Network_192.168.0.0
R1> (config) # ip dhcp pool Network_192.168.0.0
Now we can move on to step 3 and assign our default router an IP address out of the static ones we reserved and assign one to our DNS server.(I have made these the same IP.) We can also go ahead and set our network address and lease values.
TIP! When setting the lease durations wired devices tend to stick around longer on the networks than wireless. When setting up a guest network the lease duration can be relatively low as devices come on and off the network quite often.
R1> (dhcp-config) # default-router 192.168.0.1
R1> (dhcp-config) # dns-server 192.168.0.1
R1> (dhcp-config) # domain-name UniqueNameHere
R1> (dhcp-config) # network 192.168.0.0 255.255.255.0
R1> (dhcp-config) # lease 0 12
This was an overview of how to configure basic DHCP. We can go into more detail later but this is a good start to give you the basic understanding and functionality.