LAP registration to WLC

This post is about troubleshooting Cisco LAP connection to WLC. 

There are many articles which describe how LAP builds its relationship with WLC, for example official Cisco site: http://www.cisco.com/c/en/us/support/docs/wireless-mobility/wireless-lan-wlan/70333-lap-registration.html#topic2

I also recommend the following site http://what-when-how.com/deploying-and-troubleshooting-cisco-wireless-lan-controllers/capwap-session-establishmentap-joining-process-cisco-wireless-lan-controllers-part-1/

This post contains only a short notes about verifying/troublshooting this connection.

Quick Notes

  1. The LAP needs to build CAPWAP tunnel with a WLC controller.
  2. CAPWAP uses UDP ports 5246 (control channel) and 5247 (data channel)
  3. Building CAPWAP tunnel has several states. The most important:
    1. DISCOVERY (looking for and selecting WLC)
    2. DTLS SETUP (build secure UDP channel with WLC)
    3. JOIN (Join to WLC)
    4. CONFIGURE (Get configuration)
    5. RUN (Full operational state)

Troubleshooting and verifying CAPWAP from AP

Check current CAPWAP state

Log on the AP and see WLC IP and current CAPWAP state.

AP0021.55ff.6497#show capwap client rcb
AdminState                  :  ADMIN_ENABLED
SwVer                       :  7.0.240.0
NumFilledSlots              :  2
Name                        :  AP0021.55ff.6497
Location                    :  default location
MwarName                    :  Cisco_93:ad:00
MwarApMgrIp                 :  192.168.0.202
MwarHwVer                   :  0.0.0.0
ApMode                      :  Local
ApSubMode                   :  Not Configured
OperationState              :  UP
CAPWAP Path MTU             :  1485
LinkAuditing                :  disabled
AP Rogue Detection Mode     :  Enabled
AP Tcp Mss Adjust           :  Disabled
Band Direct                 :  Disabled
Predownload Status          :  None
Auto Immune Status          :  Disabled
//
// Disconnecting the ethernet cable from AP
//
AP0021.55ff.6497#show capwap client rcb
AdminState                  :  ADMIN_ENABLED
SwVer                       :  7.0.240.0
NumFilledSlots              :  2
Name                        :  AP0021.55ff.6497
Location                    :  default location
MwarName                    :
MwarMacAddr                 :  c0a8.0063.147e
MwarHwVer                   :  0.0.0.0
ApMode                      :  Local
ApSubMode                   :  Not Configured
OperationState              :  DISCOVERY
CAPWAP Path MTU             :  576
LinkAuditing                :  disabled
AP Rogue Detection Mode     :  Enabled
AP Tcp Mss Adjust           :  Disabled
Band Direct                 :  Disabled
Predownload Status          :  None
Auto Immune Status          :  Disabled
//
// Connecting the cable again
//
AP0021.55ff.6497#show capwap client rcb
AdminState                  :  ADMIN_ENABLED
SwVer                       :  7.0.240.0
NumFilledSlots              :  2
Name                        :  AP0021.55ff.6497
Location                    :  default location
MwarName                    :  Cisco_93:ad:00
MwarApMgrIp                 :  192.168.0.202
MwarHwVer                   :  0.0.0.0
ApMode                      :  Local
ApSubMode                   :  Not Configured
OperationState              :  UP
CAPWAP Path MTU             :  1485
LinkAuditing                :  disabled
AP Rogue Detection Mode     :  Enabled
AP Tcp Mss Adjust           :  Disabled
Band Direct                 :  Disabled
Predownload Status          :  None
Auto Immune Status          :  Disabled

Debug CAPWAP events

Debug CAPWAP events if the tunnel can not be established and you need more details for diagnosing the problem.

AP0021.55ff.6497#debug capwap client event
CAPWAP Client EVENT display debugging is on
AP0021.55ff.6497#
*Mar  1 00:00:39.692: %CAPWAP-3-EVENTLOG: Could not discover any MWAR.
*Mar  1 00:00:39.692: %CAPWAP-3-EVENTLOG: Starting Discovery.Initializing discovery latency in discovery responses
*Mar  1 00:00:39.692: %CAPWAP-3-EVENTLOG: CAPWAP State: Discovery.
*Mar  1 00:00:39.692: %CAPWAP-3-EVENTLOG: Could not resolve gateway. Ignoring WLC name lookup
*Mar  1 00:00:39.693: %CAPWAP-3-EVENTLOG: WTP descriptor: version=0
*Mar  1 00:00:42.695: %CAPWAP-3-EVENTLOG: Discovery Request sent to 192.168.0.99 with discovery type set to 1
*Mar  1 00:00:45.696: %CAPWAP-3-EVENTLOG: WTP descriptor: version=0
*Mar  1 00:00:48.697: %CAPWAP-3-EVENTLOG: Discovery Request sent to 192.168.0.201 with discovery type set to 1
*Mar  1 00:00:51.697: %CAPWAP-3-EVENTLOG: WTP descriptor: version=0
*Mar  1 00:00:54.697: %CAPWAP-3-EVENTLOG: Discovery Request sent to 192.168.0.99 with discovery type set to 1
*Mar  1 00:00:57.696: %CAPWAP-3-EVENTLOG:

(...)

*Mar  1 00:01:25.705: %CAPWAP-3-EVENTLOG: Discovery Response from 192.168.0.201
*Mar  1 00:01:35.705: %CAPWAP-3-EVENTLOG: Selected MWAR 'Cisco_93:ad:00' (index 0).
*Mar  1 00:01:35.705: %CAPWAP-3-EVENTLOG: Ap mgr count=1
*Mar  1 00:01:35.705: %CAPWAP-3-EVENTLOG: Go join a capwap controller
*Mar  1 00:01:35.705: %CAPWAP-3-EVENTLOG: Choosing AP Mgr with index 0, IP = 0xC0A800CA, load = 0..
*Mar  1 00:01:35.705: %CAPWAP-3-EVENTLOG: Synchronizing time with AC time.
*Jan  6 21:58:47.000: %CAPWAP-3-EVENTLOG: Setting time to 21:58:47 UTC Jan 6 2016

*Jan  6 21:58:47.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: 192.168.0.202 peer_port: 5246
*Jan  6 21:58:48.002: %CAPWAP-3-EVENTLOG: CAPWAP State: DTLS Setup.
*Jan  6 21:58:48.002: %CAPWAP-5-CHANGED: CAPWAP changed state to
*Jan  6 21:58:50.119: %CAPWAP-5-DTLSREQSUCC: DTLS connection created sucessfully peer_ip: 192.168.0.202 peer_port: 5246
*Jan  6 21:58:50.119: %CAPWAP-3-EVENTLOG: Dtls Session Established with the AC 192.168.0.202,port= 5246
*Jan  6 21:58:50.119: %CAPWAP-3-EVENTLOG: CAPWAP State: Join.
*Jan  6 21:58:50.120: %CAPWAP-3-EVENTLOG: Join request: version=117501952
*Jan  6 21:58:50.120: %CAPWAP-3-EVENTLOG: WTP descriptor: version=117501952

*Jan  6 21:58:50.122: %CAPWAP-5-SENDJOIN: sending Join Request to 192.168.0.202
*Jan  6 21:58:50.123: %CAPWAP-5-CHANGED: CAPWAP changed state to JOIN
*Jan  6 21:58:50.426: %CAPWAP-3-EVENTLOG: Sending packet to AC

*Jan  6 21:58:50.428: %CAPWAP-3-EVENTLOG: Configuration Status sent to 192.168.0.202
*Jan  6 21:58:50.428: %CAPWAP-5-CHANGED: CAPWAP changed state to CFG
*Jan  6 21:58:50.429: %CAPWAP-3-EVENTLOG: Current image is good. Connecting to the controller.
*Jan  6 21:58:50.649: %CAPWAP-3-EVENTLOG: Queue Empty.
*Jan  6 21:58:50.650: %CAPWAP-3-EVENTLOG: Configuration Status Response from 192.168.0.202

Analyze AP logs

You can analyze log buffer on the AP to see previous CAPWAP changes

AP0021.55ff.6497#show logging
*Jan  6 22:38:43.992: %CAPWAP-5-CHANGED: CAPWAP changed state to DISCOVERY
(...)
*Jan  6 22:39:34.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: 192.168.0.202 peer_port: 5246
*Jan  6 22:39:34.001: %CAPWAP-5-CHANGED: CAPWAP changed state to
*Jan  6 22:39:36.099: %CAPWAP-5-DTLSREQSUCC: DTLS connection created sucessfully peer_ip: 192.168.0.202 peer_port: 5246
*Jan  6 22:39:36.101: %CAPWAP-5-SENDJOIN: sending Join Request to 192.168.0.202
*Jan  6 22:39:36.101: %CAPWAP-5-CHANGED: CAPWAP changed state to JOIN
*Jan  6 22:39:36.393: %CAPWAP-5-CHANGED: CAPWAP changed state to CFG
*Jan  6 22:39:37.313: %CAPWAP-5-CHANGED: CAPWAP changed state to UP
*Jan  6 22:39:37.411: %CAPWAP-5-JOINEDCONTROLLER: AP has joined controller Cisco_93:ad:00
AP0021.55ff.6497#

 

Troubleshooting and verifying CAPWAP from WLC

You can also debug CAPWAP events from WLC. Note – to disable all debug you can use debug disable-all command.

(Cisco Controller) >debug capwap events enable
(Cisco Controller) >*osapiBsnTimer: Jan 13 10:04:17.051: 00:21:d8:35:e9:60 Heartbeat timer expired for AP 00:21:d8:35:e9:60
*spamReceiveTask: Jan 13 10:04:17.052: 00:21:d8:35:e9:60 apfSpamProcessStateChangeInSpamContext: Down LWAPP event for AP 00:21:d8:35:e9:60 slot 0
*spamReceiveTask: Jan 13 10:04:17.053: 00:21:d8:35:e9:60 apfSpamProcessStateChangeInSpamContext: Down LWAPP event for AP 00:21:d8:35:e9:60 slot 1
*spamReceiveTask: Jan 13 10:04:17.055: 00:21:d8:35:e9:60 Finding DTLS connection to delete for AP (192:168:0:105/63051)
*spamReceiveTask: Jan 13 10:04:17.055: 00:21:d8:35:e9:60 Disconnecting DTLS Capwap-Ctrl session 0xa1466e0 for AP (192:168:0:105/63051)

*spamReceiveTask: Jan 13 10:04:17.055: 00:21:d8:35:e9:60 CAPWAP State: Dtls tear down

*spamReceiveTask: Jan 13 10:04:17.058: 00:21:d8:35:e9:60 DTLS connection closed event receivedserver (192:168:0:202/5246) client (192:168:0:105/63051)
*spamReceiveTask: Jan 13 10:04:17.058: 00:21:d8:35:e9:60 Entry exists for AP (192:168:0:105/63051)
*spamReceiveTask: Jan 13 10:04:17.058: 00:21:d8:35:e9:60 apfSpamProcessStateChangeInSpamContext: Deregister LWAPP event for AP 00:21:d8:35:e9:60 slot 0
*spamReceiveTask: Jan 13 10:04:17.058: 00:21:d8:35:e9:60 apfSpamProcessStateChangeInSpamContext: Deregister LWAPP event for AP 00:21:d8:35:e9:60 slot 1
*spamReceiveTask: Jan 13 10:04:17.059: 00:21:d8:35:e9:60 No AP entry exist in temporary database for 192.168.0.105:63051
*apfReceiveTask: Jan 13 10:04:17.059: 00:21:d8:35:e9:60 Received LWAPP Down event for AP 00:21:d8:35:e9:60 slot 0!
*apfReceiveTask: Jan 13 10:04:17.059: 00:21:d8:35:e9:60 Received LWAPP Down event for AP 00:21:d8:35:e9:60 slot 1!
*apfReceiveTask: Jan 13 10:04:17.059: 00:21:d8:35:e9:60 Deregister LWAPP event for AP 00:21:d8:35:e9:60 slot 0
*apfReceiveTask: Jan 13 10:04:17.059: 00:21:d8:35:e9:60 Deregister LWAPP event for AP 00:21:d8:35:e9:60 slot 1
*spamReceiveTask: Jan 13 10:04:25.703: 00:21:d8:35:e9:60 Discovery Request from 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:25.703: 00:21:d8:35:e9:60 Join Priority Processing status = 0, Incoming Ap's Priority 1, MaxLrads = 6, joined Aps =0
*spamReceiveTask: Jan 13 10:04:25.703: 00:21:d8:35:e9:60 Discovery Response sent to 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:25.703: 00:21:d8:35:e9:60 Received LWAPP DISCOVERY REQUEST to 58:8d:09:93:ad:00 on port '1'
*spamReceiveTask: Jan 13 10:04:25.703: 00:21:d8:35:e9:60 Discarding discovery request in LWAPP from AP supporting CAPWAP

*spamReceiveTask: Jan 13 10:04:31.701: 00:21:d8:35:e9:60 Discovery Request from 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:31.701: 00:21:d8:35:e9:60 Join Priority Processing status = 0, Incoming Ap's Priority 1, MaxLrads = 6, joined Aps =0
*spamReceiveTask: Jan 13 10:04:31.701: 00:21:d8:35:e9:60 Discovery Response sent to 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:42.698: 00:21:d8:35:e9:60 DTLS connection not found, creating new connection for 192:168:0:105 (63050) 192:168:0:202 (5246)

*spamReceiveTask: Jan 13 10:04:44.796: 00:21:d8:35:e9:60 DTLS Session established server (192.168.0.202:5246), client (192.168.0.105:63050)
*spamReceiveTask: Jan 13 10:04:44.796: 00:21:d8:35:e9:60 Starting wait join timer for AP: 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:44.801: 00:21:d8:35:e9:60 Join Request from 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:44.802: 00:21:d8:35:e9:60 Deleting AP entry 192.168.0.105:63050 from temporary database.
*spamReceiveTask: Jan 13 10:04:44.802: 00:21:d8:35:e9:60 Join Version: = 117501952

*spamReceiveTask: Jan 13 10:04:44.802: 00:21:d8:35:e9:60 Join resp: CAPWAP Maximum Msg element len = 91

*spamReceiveTask: Jan 13 10:04:44.803: 00:21:d8:35:e9:60 Join Response sent to 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:44.803: 00:21:d8:35:e9:60 CAPWAP State: Join

*spamReceiveTask: Jan 13 10:04:44.803: 00:21:d8:35:e9:60 capwap_ac_platform.c:1217 - Operation State 0 ===> 4
*apfReceiveTask: Jan 13 10:04:44.804: 00:21:d8:35:e9:60 Register LWAPP event for AP 00:21:d8:35:e9:60 slot 0
*apfReceiveTask: Jan 13 10:04:44.804: WARP IEs: (12)

*apfReceiveTask: Jan 13 10:04:44.804:      [0000] dd 0a 00 c0 b9 01 00 00 00 08 01 01

*apfReceiveTask: Jan 13 10:04:44.805: 00:21:d8:35:e9:60 Register LWAPP event for AP 00:21:d8:35:e9:60 slot 1
*apfReceiveTask: Jan 13 10:04:44.805: WARP IEs: (12)

*apfReceiveTask: Jan 13 10:04:44.805:      [0000] dd 0a 00 c0 b9 01 00 00 00 08 01 01

*spamReceiveTask: Jan 13 10:04:45.081: 00:21:d8:35:e9:60 Configuration Status from 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:45.081: 00:21:d8:35:e9:60 CAPWAP State: Configure

*spamReceiveTask: Jan 13 10:04:45.082: 00:21:d8:35:e9:60 Updating IP info for AP 00:21:d8:35:e9:60 -- static 0, 192.168.0.105/255.255.255.0, gtw 192.168.0.1
*spamReceiveTask: Jan 13 10:04:45.082: 00:21:d8:35:e9:60 Updating IP 192.168.0.105 ===> 192.168.0.105 for AP 00:21:d8:35:e9:60
*spamReceiveTask: Jan 13 10:04:45.082: 00:21:d8:35:e9:60 Setting MTU to 1485
*spamReceiveTask: Jan 13 10:04:45.301: 00:21:d8:35:e9:60 Configuration Status Response sent to 192:168:0:105

*spamReceiveTask: Jan 13 10:04:45.499: 00:21:d8:35:e9:60 Change State Event Request from 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:45.500: 00:21:d8:35:e9:60 Radio state change for slot: 0 state: 2 cause: 0 detail cause: 72
*spamReceiveTask: Jan 13 10:04:45.501: 00:21:d8:35:e9:60 Change State Event Response sent to 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:45.501: 00:21:d8:35:e9:60 CAPWAP State: Run

*spamReceiveTask: Jan 13 10:04:45.501: 00:21:d8:35:e9:60 Sending the remaining config to AP 192.168.0.105:63050

*spamReceiveTask: Jan 13 10:04:45.502: 00:21:d8:35:e9:60 Configuration update request for Init VAP-DATA for slot 0 sent to 192.168.0.105:63050

Leave a Reply

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