AP Join Process
Figure 19-11 shows message exchange in the AP join process, which typically involves:
- IP address allocation for an AP (using DHCP as an example)
- AC discovery
- AP access control
- AC configuration delivery
- CAPWAP tunnel maintenance
- Configuration update
This figure also shows some CAPWAP states of the AP, which are described as follows:
- Discovery: The AP discovers an AC.
- DTLS connect: A DTLS connection is established between the AP and AC.
- Join: The AP joins the AC.
- Image data: The AP downloads the system software package from the AC for an upgrade.
- Configure: The AP obtains the initialization configuration from the AC.
- Data check: The AP and AC exchange information to verify the configurations.
- Run: The CAPWAP link is properly established.
- Config: The AP obtains the configuration delivered from the AC.
The general AP join process can be outlined based on the changes of the CAPWAP states:
- Idle (not marked in the figure)
The AP is started properly. After the initialization is complete, the AP starts the CAPWAP state machine.
- Idle -> Discovery
After obtaining an IP address, the AP switches from the Idle state to the Discovery state and sends a Discovery Request message to discover an AC.
- Discovery -> DTLS connect
After the AP selects an AC, the AP sets up a DTLS connection based on the AC configuration. The AP switches from the Discovery state to the DTLS connect state. In fact, the DTLS session setup and DTLS authentication states are also involved, which are not detailed here.
- DTLS connect -> Join
After the DTLS connection is set up, the AP switches from the DTLS connect state to the Join state and sends a Join Request message to request to join the AC.
- Join -> Image data
The AC sends a Join Response message carrying the expected AP software version to the AP. If the current AP software version is different from the expected one, the AP state changes from Join to Image data, and the online upgrade starts. After the upgrade is complete, the AP restarts and repeats the preceding steps.
- Join -> Configure
After the AC allows the AP to join, the AP state changes from Join to Configure and sends a Configuration Status Request message to the AC, requesting the AC to deliver the initialization configuration.
- Configure -> Data check
After the AC delivers the initialization configuration, the AP state changes from Configure to Data check and starts to exchange information with the AC to verify the configuration.
- Data check -> Run
After the initialization configuration is verified, the AC sends a Change State Event Response message to the AP. Upon receiving this message, the AP state changes from data check to Run, indicating that the CAPWAP link is established. In this phase, the AP and AC periodically send Keepalive and Echo messages to check the connectivity of the CAPWAP data tunnel and control tunnel.
IP Address Allocation for an AP
An AP can obtain an IP address in static, DHCP, or stateless address autoconfiguration (SLAAC) mode.
- Log in to the AP and configure a static IP address for it.
- Configure a DHCP server so that the AP serves as a DHCP client and requests an IP address from the DHCP server. DHCP is the most common method for APs to obtain IP addresses.Figure 19-12 Message exchange between the AP and DHCP server for IP address allocation
The following figure shows an example of the exchanged messages.
- The AP broadcasts a DHCP Discover message carrying its own MAC address, requested parameters, and broadcast flag bit.
- A DHCP server selects an address pool on the same network segment as the IP address of the interface receiving the DHCP Discover message, and from the address pool selects an idle IP address. Then the DHCP server sends a DHCP Offer message carrying the allocated IP address to the AP.
- The AP broadcasts a DHCP Request message to notify all the DHCP servers that it has selected the IP address offered by a DHCP server. Then the other servers can allocate IP addresses to other clients.
- After receiving the DHCP Request packet, the DHCP server replies with a DHCP ACK message, indicating that the IP address carried in the DHCP Request message is allocated to the AP.
- SLAAC mode: The AP obtains an IP address in SLAAC mode, which supports only IPv6.
In SLAAC mode, the prefix of a network address is obtained from a Router Advertisement (RA) message, and then an interface ID is automatically generated. The prefix and the generated interface ID form an IPv6 address.
The following figure shows an example of the exchanged messages.
The following table lists common problems that may occur when an AP attempts to obtain an IP address:
Problem |
Possible Cause |
Handling Suggestion |
---|---|---|
An error occurs in configuring a static IP address for an AP. |
|
An Error Occurs in Configuring a Static IP Address for an AP |
No IP address is allocated to the AP in DHCP mode. |
|
AC Discovery
Figure 19-13 shows message exchange in the AC discovery phase.
The following figures show examples of the exchanged messages:
Discovery (An AP discovers an AC.)
DTLS connect (The AP establishes a DTLS connection with the AC.)
The AC discovery mechanism allows an AP to discover available ACs and selects an optimal one to set up a CAPWAP link.
- After obtaining an IP address, the AP sends a Discovery Request message carrying its own version and mode (Fit or Fat) to discover available ACs on the network. After the AP initiates the AC discovery process, the CAPWAP state of the AP changes from Idle to Discovery.
- After receiving the Discovery Request message, the AC determines whether to allow the AP to access the AC based on the configured IP version, AP blacklist and whitelist, AP authentication mode (MAC address authentication, SN authentication, or no authentication), and license resource restrictions, and records the determination result. If AP access is permitted, the AC unicasts a Discovery Response message carrying the AC name, AC version, CAPWAP source address, and DTLS status to the AP. If AP access is denied, the AC does not respond with a Discovery Response message.
- If the AP receives Discovery Response messages from multiple ACs, it selects an AC based on AC priorities and loads (number of APs connected to the AC).
The AP then needs to obtain the AC's IP address in static or dynamic mode.
On a Layer 2 network, the AP can discover the AC in broadcast mode, without the need to manually specify the AC's IP address. On a Layer 3 network, you must specify the AC's IP address; otherwise, the AP cannot discover the AC in broadcast mode.
If no AC's IP address is specified, the AP broadcasts a Discovery Request message to discover an AC. If the AC's IP address is specified, the AP unicasts a Discovery Request message to the specified AC.
- Static mode: The IP addresses of ACs are specified on the AP.
- Dynamic mode: The AP can dynamically obtain the AC's IP address in DHCP or DNS mode. When the AP obtains an IP address from the DHCP server, the DHCP server embeds an option carrying the AC's IP address (DHCP) or domain name (DNS) in the DHCP Response message destined for the AP. The options are described as follows:
- Option 43: carries the list of ACs' IPv4 addresses.
- Option 52: carries the list of ACs' IPv6 addresses.
- Option 15: carries the ACs' IPv4 domain names.
- Option 24: carries the ACs' IPv6 domain names.
The following figure shows an example of a DHCP Response message carrying Option 43.
If DTLS is enabled on the AC, the AC informs the AP of the DTLS status through the Discovery Response message. The AP then starts DTLS negotiation to establish a DTLS connection with the AC. After the DTLS connection is set up, packets transmitted between the AP and AC will be encrypted. CAPWAP data packets and control packets transmitted over CAPWAP tunnels can be DTLS-encrypted separately.
The following table lists common problems that may occur in this phase.
Problem |
Possible Cause |
Handling Suggestion |
---|---|---|
The network between the AP and AC fails. |
|
|
The AC's IP address is not or incorrectly specified on the AP. |
|
The AC's IP Address Is Not or Incorrectly Specified on an AP |
The CAPWAP source interface or address is incorrectly or not configured on the AC. |
The CAPWAP source interface or address is incorrectly or not configured on the AC. |
The CAPWAP Source Interface or Address Is Not Configured on the AC |
The AP is not working in Fit mode. |
|
|
License resources are insufficient, or the number of APs exceeds the AC specifications. |
|
|
DTLS negotiation of a CAPWAP link fails. |
The AC and AP have different DTLS PSKs. |
|
The MAC address and SN of the AP added offline on the AC are inconsistent with those of the AP. |
The MAC address and SN of the AP added offline are inconsistent with those of the AP. |
The MAC Address and SN of an AP Specified on the AC Are Inconsistent with Those of the AP |
The AP is blacklisted. |
The AP is added to the blacklist by mistake. |
AP Access Control
Figure 19-14 shows message exchange in the AP access control phase.
The following figure shows an example of the exchanged messages.
- After a DTLS connection is set up between the AP and AC, the AP sends a Join Request message to the AC selected in the previous phase to apply for joining the AC. The AP then enters the Join state.
- The AC determines whether to allow the AP access. If this operation has been performed in the Discovery phase, the AC directly uses the determination result buffered in that phase, without the need for repeated determination. If no result is buffered, the AC goes through the process shown in Figure 19-15 to determine whether to allow the AP access. Based on the determination result, the AC sends a Join Response message containing the expected AP version to the AP.
- After receiving the Join Response message, the AP checks whether the current system software version is the same as that expected by the AC. If not, the AP enters the Image data state and starts to download the upgrade file and upgrade its software version in AC, FTP, or SFTP mode. After the upgrade is complete, the AP restarts and repeats the preceding phases. If the upgrade fails, the AP restarts and repeats the previous phases. Therefore, if the AP upgrade configuration is incorrect, the AP may continuously repeat the preceding phases until the AP software version is upgraded correctly.
The following table lists common problems that may occur in this phase.
Problem |
Possible Cause |
Handling Suggestion |
---|---|---|
The versions of the AP and AC do not match. |
|
|
The AP upgrade fails. |
|
AC Configuration Delivery
When the AP version is consistent with the AC version, the AC starts to deliver configurations to the AP.
Figure 19-16 shows message exchange in the AC configuration delivery phase.
The following figure shows an example of the exchanged messages.
Configure
Data check
- After receiving a Join Response message from the AC, the AP checks whether the AC allows its access and whether the running software version is the same as the expected one. If so, the AP sends a Configuration Status Request message containing multiple Radio Administrative State message elements to the AC to report its current configuration and then enters the Configure state.
- After receiving the Configuration Status Request message, the AC sends a Configuration Status Response message to the AP and delivers the initialization configuration to the AP. In this phase, the AC does not deliver service configurations. Instead, it delivers service configurations only after the CAPWAP link is established.
- After receiving the Configuration Status Response message, the AP enters the data check state and performs the initialization configuration based on the message content.
- After the initialization configuration is complete, the AP sends a Change State Event Request message carrying the radio status and configuration execution result to the AC.
- After receiving the Change State Event Request message, the AC sends a Change State Event Response message to the AP and updates AP information as required.
The following table lists common problems that may occur in this phase.
Problem |
Possible Cause |
Handling Suggestion |
---|---|---|
The AP fails to initialize the configuration. |
|
CAPWAP Tunnel Maintenance
Figure 19-16 shows message exchange in the CAPWAP tunnel maintenance phase.
The following figure shows an example of the exchanged messages.
After the preceding phases, the AP has gone online on the AC. Then we need to maintain the CAPWAP tunnel between the AC and AP.
The AP and AC detect the connectivity of the CAPWAP data tunnel by exchanging Keepalive messages and detect the connectivity of the CAPWAP control tunnel by exchanging Echo messages.
The AP starts a timer to send Keepalive and Echo messages and starts a tunnel detection timeout timer. If the AP receives Keepalive and Echo messages within a specified period, it resets the timeout timer; otherwise, it determines a message timeout.
Configuration Update
Figure 19-16 shows message exchange in the configuration update phase.
- After the AP goes online on the AC, the AC sends a Configuration Update Request message to the AP to deliver configurations.
- After receiving the Configuration Update Request message, the AP changes from the Run state to the Config state to complete the configuration delivery.
- After all configurations delivered by the AC are received, the AP sends a Configuration Update Response message to the AC, notifying the AC of the configuration delivery result.
The following table lists common problems that may occur in this phase.
Problem |
Description |
Handling Suggestion |
---|---|---|
WLAN service configurations fail to be delivered to an AP after the AP goes online on an AC. |
After an AP goes online on the AC, WLAN service configurations are performed for the AP. If the link between the AP and AC fails or the peer end has no response, the AC will fail to deliver WLAN service configurations to the AP. |