LAP – DHCP from WLC

Cisco WLC can act as DHCP server for wireless clients or DHCP proxy agent for wireless clients.

WLC does not offer DHCP services for wired clients. However, there is one exception: direct-connect lightweight access points. If Cisco LAP is direct connect to the WLC management interface (they are in the same LAN and in the same VLAN) then LAP can obtain IP from WLC – WLC recognizes if DHCP request comes from LAP or not.

Note that it works only for LAPs – the DHCP requests from PC connected to the same LAN and VLAN with WLC management interface are ignored.

Usually this option is not used in the real-life environment Рhowever it can be used in your LAB.

Configure internal DHCP for LAP

The following pictures shows how to configure WLC for internal DHCP server for LAPs. First make sure that DHCP Proxy is enabled.

Enable DHCP services

Edit WLC management-interface settings: setup DHCP server to point on itself (the internal DHCP server will be used now).

DHCP for AP 1

Define DHCP scope. Note that defined DHCP network (192.168.0.0/24) contains managment-interface IP address (192.168.0.201) – if managment-interface gets DHCP request then it will look for this scope.

DHCP for AP 3

Debug

The following debug comes from WLC (AP gets IP address from the internal DHCP server).

(Cisco Controller) >
(Cisco Controller) >debug dhcp message enable
(Cisco Controller) >
(Cisco Controller) >*DHCP Socket Task: Jan 13 14:58:38.067: 00:21:55:ff:64:97 DHCP option len (including the m                                                          agic cookie) 74
*DHCP Socket Task: Jan 13 14:58:38.067: 00:21:55:ff:64:97 DHCP option: message type = DHCP DISCOVER
*DHCP Socket Task: Jan 13 14:58:38.068: 00:21:55:ff:64:97 DHCP option: 57 (len 2) - skipping
*DHCP Socket Task: Jan 13 14:58:38.068: 00:21:55:ff:64:97 DHCP option: 61 (len 7) - skipping
*DHCP Socket Task: Jan 13 14:58:38.068: 00:21:55:ff:64:97 DHCP option: 12 (len 16) - skipping
*DHCP Socket Task: Jan 13 14:58:38.068: 00:21:55:ff:64:97 DHCP option: 55 (len 9) - skipping
*DHCP Socket Task: Jan 13 14:58:38.068: 00:21:55:ff:64:97 DHCP option: vendor class id = Cisco AP c1200 (len 1                                                          4)
*DHCP Socket Task: Jan 13 14:58:38.068: 00:21:55:ff:64:97 DHCP options end, len 74, actual 66
*DHCP Server: Jan 13 14:58:38.069: dhcpd: Received 302 byte dhcp packet from 0xc900a8c0 192.168.0.201:68

*DHCP Server: Jan 13 14:58:38.069: 00:21:55:ff:64:97 dhcpd: packet 192.168.0.201 -> 192.168.0.201 using scope                                                           "Test2"
*DHCP Server: Jan 13 14:58:38.069: 00:21:55:ff:64:97 dhcpd: received DISCOVER
*DHCP Server: Jan 13 14:58:38.069: adding option 0x35
*DHCP Server: Jan 13 14:58:38.069: adding option 0x36
*DHCP Server: Jan 13 14:58:38.069: adding option 0x33
*DHCP Server: Jan 13 14:58:38.070: adding option 0x03
*DHCP Server: Jan 13 14:58:38.070: adding option 0x01
*DHCP Server: Jan 13 14:58:38.070: 00:21:55:ff:64:97 dhcpd: sending OFFER of 192.168.0.240
*DHCP Server: Jan 13 14:58:38.070: 00:21:55:ff:64:97 dhcpd: Sending DHCP packet (giaddr:192.168.0.201)to 127.0                                                          .0.1:67  from 127.0.0.1:1067
*DHCP Server: Jan 13 14:58:38.070: 00:21:55:ff:64:97 sendto (572 bytes) returned 572

*DHCP Proxy Task: Jan 13 14:58:38.070: 00:21:55:ff:64:97 DHCP option len (including the magic cookie) 336
*DHCP Proxy Task: Jan 13 14:58:38.071: 00:21:55:ff:64:97 DHCP option: message type = DHCP OFFER
*DHCP Proxy Task: Jan 13 14:58:38.071: 00:21:55:ff:64:97 DHCP option: server id = 192.168.0.201
*DHCP Proxy Task: Jan 13 14:58:38.071: 00:21:55:ff:64:97 DHCP option: lease time = 86400 seconds
*DHCP Proxy Task: Jan 13 14:58:38.071: 00:21:55:ff:64:97 DHCP option: gateway = 192.168.0.1
*DHCP Proxy Task: Jan 13 14:58:38.071: 00:21:55:ff:64:97 DHCP option: netmask = 255.255.255.0
*DHCP Proxy Task: Jan 13 14:58:38.071: 00:21:55:ff:64:97 DHCP options end, len 336, actual 64
*DHCP Socket Task: Jan 13 14:58:38.073: 00:21:55:ff:64:97 DHCP option len (including the magic cookie) 92
*DHCP Socket Task: Jan 13 14:58:38.073: 00:21:55:ff:64:97 DHCP option: message type = DHCP REQUEST
*DHCP Socket Task: Jan 13 14:58:38.073: 00:21:55:ff:64:97 DHCP option: 57 (len 2) - skipping
*DHCP Socket Task: Jan 13 14:58:38.073: 00:21:55:ff:64:97 DHCP option: 61 (len 7) - skipping
*DHCP Socket Task: Jan 13 14:58:38.073: 00:21:55:ff:64:97 DHCP option: server id = 192.168.0.201
*DHCP Socket Task: Jan 13 14:58:38.073: 00:21:55:ff:64:97 DHCP option: requested ip = 192.168.0.240
*DHCP Socket Task: Jan 13 14:58:38.073: 00:21:55:ff:64:97 DHCP option: lease time = 86400 seconds
*DHCP Socket Task: Jan 13 14:58:38.074: 00:21:55:ff:64:97 DHCP option: 12 (len 16) - skipping
*DHCP Socket Task: Jan 13 14:58:38.074: 00:21:55:ff:64:97 DHCP option: 55 (len 9) - skipping
*DHCP Socket Task: Jan 13 14:58:38.074: 00:21:55:ff:64:97 DHCP option: vendor class id = Cisco AP c1200 (len 1                                                          4)
*DHCP Socket Task: Jan 13 14:58:38.074: 00:21:55:ff:64:97 DHCP options end, len 92, actual 84
*DHCP Server: Jan 13 14:58:38.074: dhcpd: Received 320 byte dhcp packet from 0xc900a8c0 192.168.0.201:68

*DHCP Server: Jan 13 14:58:38.074: 00:21:55:ff:64:97 dhcpd: packet 192.168.0.201 -> 192.168.0.201 using scope                                                           "Test2"
*DHCP Server: Jan 13 14:58:38.075: 00:21:55:ff:64:97 dhcpd: received REQUEST
*DHCP Server: Jan 13 14:58:38.075: 00:21:55:ff:64:97 Checking node 192.168.0.240  Allocated 1452697118, Expire                                                          s 1452783518 (now: 1452697118)

*DHCP Server: Jan 13 14:58:38.075: 00:21:55:ff:64:97 dhcpd: server_id = c0a800c9
*DHCP Server: Jan 13 14:58:38.075: 00:21:55:ff:64:97 dhcpd: server_id = c0a800c9
*DHCP Server: Jan 13 14:58:38.075: adding option 0x35
*DHCP Server: Jan 13 14:58:38.075: adding option 0x36
*DHCP Server: Jan 13 14:58:38.075: adding option 0x33
*DHCP Server: Jan 13 14:58:38.075: adding option 0x03
*DHCP Server: Jan 13 14:58:38.075: adding option 0x01
*DHCP Server: Jan 13 14:58:38.075: 00:21:55:ff:64:97 dhcpd: Sending DHCP packet (giaddr:192.168.0.201)to 127.0                                                          .0.1:67  from 127.0.0.1:1067
*DHCP Server: Jan 13 14:58:38.075: 00:21:55:ff:64:97 sendto (572 bytes) returned 572

*DHCP Proxy Task: Jan 13 14:58:38.075: 00:21:55:ff:64:97 DHCP option len (including the magic cookie) 336
*DHCP Proxy Task: Jan 13 14:58:38.075: 00:21:55:ff:64:97 DHCP option: message type = DHCP ACK
*DHCP Proxy Task: Jan 13 14:58:38.075: 00:21:55:ff:64:97 DHCP option: server id = 192.168.0.201
*DHCP Proxy Task: Jan 13 14:58:38.076: 00:21:55:ff:64:97 DHCP option: lease time = 86400 seconds
*DHCP Proxy Task: Jan 13 14:58:38.076: 00:21:55:ff:64:97 DHCP option: gateway = 192.168.0.1
*DHCP Proxy Task: Jan 13 14:58:38.076: 00:21:55:ff:64:97 DHCP option: netmask = 255.255.255.0
*DHCP Proxy Task: Jan 13 14:58:38.076: 00:21:55:ff:64:97 DHCP options end, len 336, actual 64

Leave a Reply

Your email address will not be published. Required fields are marked *