In real world deployments you wouldn't likely use a Cisco AP as the DHCP server. But, during deployments I've used it for temporary setups. Lets step through the setup process
In this senerio we will set up a class C 192.168.1.0 DHCP Scope with IP exclusions and add additional info like the gateway and DNS server information.
1. Lets start with the client exclusion. We will exclude the following ranges, so that the AP doesn't assign these specific addresses out:
192.168.1.1 - 192.168.1.10
192.168.1.200 - 192.168.1.254
ap#config t
ap(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
ap(config)#ip dhcp excluded-address 192.168.1.200 192.168.1.254
2. Next, we will name the DHCP Scope (pool) and set the network:
ap(config)#ip dhcp pool WIRELESS
ap(dhcp-config)#network 192.168.1.0
3. Next, we will set the LEASE time for the addresses (3 days,4 hours, 20 min) , setup the gateway and DNS:
ap(dhcp-config)#lease 3 4 20
ap(dhcp-config)#default-router 192.168.1.1
ap(dhcp-config)#dns-server 192.168.1.250
4. Next, we connect a wired laptop to the switch on the VLAN and see the results:
(Note this will also hand out Wireless DHCP as well)
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) 82567LM Gigabit Network Connection
Physical Address. . . . . . . . . : 00-2A-A1-13-C2-33
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . : Yes
IP Address. . . . . . . . . . . . . . : 192.168.1.11 <-- This is the first IP in our Scope
Subnet Mask . . . . . . . . . . . : 255.255.255.0 <-- Our class C
Default Gateway . . . . . . . . . : 192.168.1.1 <-- This is the GW we set up
DHCP Server . . . . . . . . . . . : 192.168.1.2 <-- This is the IP of our AP
DNS Servers . . . . . . . . . . . : 192.168.1.250 <-- This is the DNS we set up
Lease Obtained. . . . . . . . . . : Saturday, March 06, 2010 5:48:12 PM <--- This is our lease time we set up
Lease Expires . . . . . . . . . . : Tuesday, March 09, 2010 10:08:12 PM