You can configure a DHCP server for wireless clients or for the APs but you should keep in mind a couple of considerations. The DHCP server of the WLC does not provide the option 43 and it is not developed to scale for large numbers of clients and you might be asked to configure the DHCP Server on a Microsoft Server with option 43 and 60 so you should also get some practice on this task.
IOS
The following commands are used to configure a DHCP pool and the most common features on an IOS device:
ip dhcp excluded-address <start_ip_address> <end_ip_address>
ip dhcp pool <pool_name>
network <network> <subnet_mask>
default-router <defaultgw_ip_address>
dns-server <dns_ip_address>
lease <days>/infinite
option <0-254> ascii/hex/ip
show ip dhcp pool
show ip dhcp binding
Remember that in order to answer the DHCP requests the IOS device must have a SVI interface on the VLAN of the pool. For this reason a Cisco Aironet Access Point can only have one DHCP pool! Remember that an access point is just a bridge. When you set up VLANS, in essence you are just configuring multiple bridge groups. On an IOS-base router, multiple pools can be supported because the
DHCP discovery packet arrives thru an interface that has an IP address assigned to it. IOS uses that interface IP address to decide which of multiple pools to assign from and on an AP there can be at most one IP address assigned - to the BVI1 interface - and that is for management access.
With multiple VLANs configured on the AP, the only DHCP packets that will directly reach the AP from wireless clients will be those that are on SSIDs that are mapped to the native VLAN (the one that BVI1 is in.) DHCP requests from clients that are in SSIDs bridged to other VLANs will
simply sail through the AP and out the dot1q trunk interface, without the AP's DHCP server seeing them. That said, it is possible for the non-native VLANs' default routers to use ip helper-address to forward the DHCP requests back to the AP - in this way, you *could* have an AP service multiple DHCP pools but it makes more sense to use your interVLAN router(s) as DHCP server(s), than to use your AP for this.
We need to clarify the use of the option keyword when used to provide the WLC management IP addresses to Cisco lightweight APs. You must configure two DHCP options, the 43 and the 60.
Option 43 is sent back by the DHCP server to the DHCP client and contains the WLC management IP address in hex format.
Option 60 is included in the initial DHCP discover message that a DHCP client broadcasts in search of an IP address and it is used to understand from which type of APs the request is coming.
For the option 43 we have to convert the IP address into hex using the following Type Length Value TLV format:
Type in this case is always equal to 0xf1.
Length is the number of controller management IP addresses time 4 in hex.
Value is the IP address of the controller listed sequentially in hex.
For example, suppose there are two controllers with management interface IP addresses, 192.168.10.5 and 192.168.10.20. The type is 0xf1. The length is 2 * 4 = 8 = 0x08. The IP addresses translate to
c0a80a05 (192.168.10.5) and
c0a80a14 (192.168.10.20). When the string is assembled, it yields
f108c0a80a05c0a80a14. The Cisco IOS command that is added to the DHCP scope would be:
option 43 hexf108c0a80a05c0a80a14
The option 60 must be configured using the command:
option 60 ascii "<VCI string of the AP>"
where the VCI string depends from the AP type and can be found in the
VCI Cisco AP table. You will have to configure a different DHCP Pool for each AP type. It is also possible to configure a DHCP pool only with option 43 but this it is not a recommended best practice because all the devices including laptops will receive this information.
WLC
As with other features if you want to be faster you should configure the DHCP pools on the WLC via WCS templates. Here are the commands for the WLC CLI:
config dhcp create-scope <pool_name>
config dhcp network
<pool_name> <network_address> _mask>
config dhcp address-pool <pool_name> <start_ip_address> <end_ip_address>
config dhcp default-router <pool_name> <defaultgw_ip_address>
config dhcp dns-servers <pool_name> <dns_ip_address>
config dhcp lease <pool_name>
config dhcp enable/disable <pool_name>
show dhcp summary
show dhcp detailed <pool_name>
Microsoft Windows Server
Here is
how to configure the DHCP service on a Windows server with option 43 and option 60.