WLAN Fundamentals
WLAN Fundamentals
Foreword
Traditionally, two WLAN architectures are available: Fat AP and AC + Fit AP. A Fat
AP integrates WLAN management functions including user authentication, data
encryption, and roaming, but brings a heavy deployment workload for a large
WLAN. With the growth in wireless terminals, the AC + Fit AP architecture is
widely applied, which is easy to control and expand. Communication between the
AC and Fit APs is implemented using Control and Provisioning of Wireless Access
Points (CAPWAP).
In this course, we will get a glimpse into the origin and implementation of
CAPWAP, key 802.11 frames, and STA roaming mechanism.
1 Huawei Confidential
Objectives
2 Huawei Confidential
Contents
1. CAPWAP Tunnel
4. WLAN Roaming
3 Huawei Confidential
Origin Concept Implementation
CAPWAP Background
Challenges of traditional Fat AP networking
4 Huawei Confidential
Origin Concept Implementation
Origin of CAPWAP
Protocol LWAPP SLAPP CTP WiCoP
Standard RFC 5412 RFC 5413 draft-singh-capwap-ctp RFC 5414
5 Huawei Confidential
Origin Concept Implementation
CAPWAP Background
LWAPP SLAPP
CAPWAP
CTP/WiCoP
6 Huawei Confidential
Origin Concept Implementation
CAPWAP Overview
CAPWAP tunnel
7 Huawei Confidential
Origin Concept Implementation
The formats of the control packet and data packet are as follows:
8 Huawei Confidential
Origin Concept Implementation
9 Huawei Confidential
Origin Concept Implementation
APs obtaining IP
addresses Mode in which an AP obtains an IP address
• Static mode: A user logs in to the AP and configures its IP address. (not recommended for medium-
and large-scale networks)
Discovery phase
• DHCP mode: The AP serves as a DHCP client and requests an IP address from a DHCP server.
...
10 Huawei Confidential
Origin Concept Implementation
11 Huawei Confidential
Origin Concept Implementation
APs obtaining IP AP AC
addresses
Step 2: AC discovery
5 Discovery Request
Discovery phase • The AP discovers an AC in different ways depending on the
6 Discovery Response networking. On a Layer 2 network, the AP broadcasts a
Discovery Request message to discover an AC; on a Layer 3
network, the AP unicasts a Discovery Request message to the
(Optional) DTLS AC based on the AC's IP address carried in DHCP Option 43.
connection • After receiving the Discovery Request message from the AP,
the AC unicasts a Discovery Response message to the AP. The
AP determines to associate with the appropriate AC based on
the AC's priority and AP load.
Join phase
...
12 Huawei Confidential
APs Dynamically Discovering the AC
Discovery phase
• After an AP is started, if it fails to
DHCP Discovery
obtain the AC IP address in DHCP or
DNS mode or does not receive a
DHCP Offer
(Option 43) response after sending a Discovery
(Optional) DTLS
connection Request, the AP initiates a broadcast
DHCP Request
AC discovery procedure and
DHCP Ack broadcasts an AC discovery request.
Join phase (Option 43) • AC discovery in broadcast mode is
applicable to a Layer 2 network
Discovery Request
between the AP and the AC.
Discovery Response
...
13 Huawei Confidential
Origin Concept Implementation
APs obtaining IP AP AC
addresses
...
Join phase
...
IP UDP CAPWAP DTLS CAPWAP Ethernet DTLS
Header Header DTLS Header Header Header Packet Tail
15 Huawei Confidential
Origin Concept Implementation
APs obtaining IP AP AC
addresses
5 Discovery Request
Discovery phase Step 4: Join
6 Discovery Response
• After the DTLS handshake is completed, the AC and AP establish a
control channel. The AP sends a Join Request message to request
(Optional) DTLS 7 (Optional) DTLS
to join the AC.
connection
• The AC sends a Join Response message containing information
about user upgrade version number, the interval/timeout period of
8 Join Request the handshake packet, and the priority of the control packets.
Join phase
9 Join Response
...
16 Huawei Confidential
AP Access Control Process
Enter the Join Is the MAC address or SN of the AP in the Yes
phase AP blacklist?
No
APs obtaining IP
What is the AP
addresses
authentication mode?
MAC address
Non-authentication SN authentication
authentication
Discovery phase
Manually confirm AP
information by entering its
MAC address or SN The AP is not
Image Data phase allowed to join
The AP joins the AC the AC.
...
17 Huawei Confidential
Origin Concept Implementation
APs obtaining IP AP AC
addresses
18 Huawei Confidential
Origin Concept Implementation
19 Huawei Confidential
Origin Concept Implementation
• When the AP enters the Run phase, it sends an Echo Request message
16 Keepalive to the AC to demonstrate the CAPWAP management tunnel is
established and activates the echo timer and tunnel monitoring timer
Run (data) 17 Keepalive to monitor the management tunnel.
• When the AC receives the Echo Request message, it enters the Run
18 Echo Request phase, replies with an Echo Response message, and activates the
tunnel timeout timer. When the AP receives the Echo Response
Run (control) 19 Echo Response message, it resets the tunnel timeout detection timer. At this time, the
... AP is already online.
...
20 Huawei Confidential
Origin Concept Implementation
AP AC
Data Check
After the CAPWAP tunnel is established, the AP successfully joins the AC. If the service configuration is normal, the SSID can be released for
STAs to access the AP.
But how do the STAs access the wireless network system?
21 Huawei Confidential
Contents
1. CAPWAP Tunnel
4. WLAN Roaming
22 Huawei Confidential
Frame Types Defined in 802.11
STA AP
Management frame
Management frames perform supervisory functions; they are used to
join and leave wireless networks and move associations from AP to
AP.
Control frame
Control frames are used in conjunction with data frames to perform
area-clearing operations, channel acquisition and carrier-sensing
maintenance functions, and positive acknowledgment of received
data. Control and data frames work in conjunction to deliver data
reliably from STA to STA.
Data frame
Data frames carry data transmitted between STAs.
...
23 Huawei Confidential
Key 802.11 Frames - Management Frames
No. Management Frame Type Function
Beacon frames are sent periodically by an AP to notify STAs of a WLAN. An AP sends
1 Beacon frame
Beacon frames within the basic service area.
2 Probe Request frame A STA sends Probe Request frames to scan surrounding 802.11 networks.
If the network scanned by a STA meets the connection requirement, the AP replies
with a Probe Response frame to the STA. The AP responds to a received Probe
3 Probe Response frame
Request frame only after it sends a Beacon frame and before it sends the next
Beacon frame.
Authentication frame An AP uses shared keys and Authentication frames to authenticate STA identities,
4
Deauthentication frame and uses Deauthentication frames for deauthentication.
After a STA passes identity authentication, it sends an Association Request frame to
Association Request frame request to join the network.
5
Reassociation Request frame When a STA needs to roam on a WLAN, it sends a Reassociation Request frame to
reassociate with the WLAN.
After receiving an Association Request from a STA, an AP replies with an Association
6 Association Response frame
Response frame.
24 Huawei Confidential
Key 802.11 Frames - Control Frames
No. Control Frame Type Function
1 Request to send (RTS) frame When a STA needs to send data to an AP, the STA sends an RTS frame to the AP.
After an AP receives an RTS frame from a STA, it broadcasts CTS frames. After receiving
2 Clear to send (CTS) frame the CTS frames, the other STAs within the AP's coverage area will not send data within a
specified period.
Acknowledgment (ACK) The receiver sends an ACK frame to confirm the receiving of a unicast packet from the
3
frame sender.
When a STA wakes up from the power save (PS) mode, it sends a PS-Poll frame to the
4 PS-Poll frame
associated AP to retrieve the frames buffered while it was in PS mode.
25 Huawei Confidential
Contents
1. CAPWAP Tunnel
4. WLAN Roaming
26 Huawei Confidential
STA Access
STA AP STA access
• Authentication
Authentication Before accessing the WLAN, a STA is authenticated, which is known as
link authentication. Link authentication is usually considered as the start
point for STAs to connect to an AP and access the WLAN.
• Association
Association After link authentication is complete, the STA continues to initiate link
service negotiation.
...
27 Huawei Confidential
Active Scanning
In active scanning, a STA periodically searches for nearby wireless networks.
The STA can send two types of Probe Request frames: probes containing an SSID and probes that do not contain an
SSID.
Active scanning by sending a Probe Request frame Active scanning by sending a Probe Request frame
containing an SSID containing no SSID
• The STA sends a Probe Request frame containing an SSID • The STA periodically broadcasts a Probe Request frame that
on each channel to search for the AP with the same SSID. does not contain an SSID on the supported channels. The APs
Only the AP with the same SSID will respond to the STA. return Probe Response frames to notify the STA of the
wireless services they can provide.
28 Huawei Confidential
Passive Scanning
In passive scanning mode, a STA receives Beacon frames
Passively scanning
that APs periodically send and obtains an AP list by
parsing information in the Beacon frames.
Beacon Beacon
When listening to Beacon frames, the STA continuously
switches channels to ensure that Beacon frames can be AP1
STA STA
(SSID=huawei)
listened on each channel.
By default, the interval for an AP to send Beacon frames • The AP sends Beacon frames periodically. The STAs only
is 100 TUs (1 TU = 1024 us). listen to Beacon frames and do not send Probe frames. In
this way, the STAs can obtain the list of neighboring APs
while saving resources.
29 Huawei Confidential
Link Authentication
To ensure wireless link security, an AP needs to authenticate STAs that attempt to access the AP.
IEEE 802.11 defines two link authentication modes: open system authentication and shared key authentication.
STA AP
Authentication Request
Authentication Request
Authentication Response
Authentication Response (Challenge)
STA AP Authentication Response
(Encrypted Challenge)
Authentication Response
(Success)
• Open system authentication requires no authentication, • Shared key authentication requires that the STA and AP have the same
allowing any STA to access the AP without authentication. shared key preconfigured. The AP checks whether the STA has the same
shared key to determine whether the STA can be authenticated. If the
STA has the same shared key as the AP, the STA is authenticated
successfully. Otherwise, the STA authentication fails.
30 Huawei Confidential
Association
After link authentication is complete, a STA initiates link service negotiation using Association messages.
The STA association process is actually a link service negotiation process, during which the supported rate, channel,
and the like are negotiated.
STA AP AC
1. Association Request
2. Association Request
3. Association Response
4. Association Response
31 Huawei Confidential
Contents
1. CAPWAP Tunnel
4. WLAN Roaming
32 Huawei Confidential
WLAN Roaming Overview
AC
The APs involved in WLAN roaming must have the same
SSID, same configurations in security profiles (different
profile names allowed), and the same authentication
mode and parameter settings in authentication profiles.
SSID: Huawei SSID: Huawei Ensure that user's authorization information does not change
Signal
area
Channel 1 Channel 6
IP address: IP address: during roaming.
A.A.A.A A.A.A.A
Ensure that user's IP address does not change during roaming.
STA STA
Roaming
33 Huawei Confidential
Concepts in WLAN Roaming
AC1 AC2
Mobility group
Home AC (HAC): AC in a mobility group Foreign AC (FAC): AC with which a STA is
with which a STA first associates associated after roaming
Inter-AC tunnel
Home agent
roaming
roaming
Intra-AC
Inter-AC
STA STA STA
34 Huawei Confidential
WLAN Roaming Types
Layer 2 roaming Layer 3 roaming
AC AC
36 Huawei Confidential
Traffic Forwarding Models in WLAN Roaming
Depending on the WLAN data forwarding type and whether data is forwarded across Layer 3, traffic forwarding
models in WLAN roaming are classified into four types, as described in the following table.
Service packets between the HAP and HAC are not encapsulated with the CAPWAP
Direct forwarding in Layer 3 roaming header. Therefore, whether the HAP and HAC reside on the same subnet cannot be
determined. In this case, packets are forwarded back to the HAP by default.
Service packets between the HAP and HAC are encapsulated with the CAPWAP header. In
this case, the HAP and HAC can be considered on the same subnet. Instead of forwarding
Tunnel forwarding in Layer 3 roaming
the packets back to the HAP, the HAC directly forwards the packets to the upper-layer
network.
37 Huawei Confidential
Intra-AC Roaming
AC
inter-AC roaming where the HAC and FAC are the
same AC.
HAP FAP
Roaming
VLAN 10 VLAN 10
38 Huawei Confidential
Intra-AC Layer 2 Roaming - Tunnel Forwarding
SSID: Huawei SSID: Huawei ▫ The AC forwards the service packets to the upper-
1
STA STA layer network through the switch.
39 Huawei Confidential
Intra-AC Layer 2 Roaming - Direct Forwarding
• Before roaming:
▫ The STA sends service packets to the HAP.
• After roaming:
40 Huawei Confidential
Intra-AC Layer 3 Roaming - Tunnel Forwarding
• Before roaming:
CAPWAP tunnel
▫ The STA sends service packets to the HAP.
VLAN 10 VLAN 20 ▫ The HAC forwards the service packets to the upper-
SSID: Huawei SSID: Huawei layer network through the switch.
1
STA STA
41 Huawei Confidential
Intra-AC Layer 3 Roaming - Direct Forwarding (HAP as the
Home Agent)
• Before roaming:
CAPWAP tunnel
▫ The STA sends service packets to the HAP.
VLAN 10 VLAN 20 ▫ After receiving the service packets, the HAC sends them
• Before roaming:
▫ The STA sends service packets to the HAP.
HAP FAP ▫ After receiving the service packets, the FAP sends
them to the HAC through the CAPWAP tunnel.
Roaming
VLAN 10 VLAN 20
1 ▫ The HAC forwards the service packets to the upper-
SSID: Huawei SSID: Huawei
layer network through the switch.
STA STA
43 Huawei Confidential
Inter-AC Layer 2 Roaming - Direct Forwarding
• Before roaming:
▫ The STA sends service packets to the HAP.
HAC FAC
▫ After receiving the service packets, the HAP
forwards them to the upper-layer network through
Traffic flow
Traffic flow the gateway (switch).
before
after roaming
roaming
• After roaming:
▫ The STA sends service packets to the FAP.
HAP FAP
▫ After receiving the service packets, the FAP
Roaming
VLAN 10 VLAN 10
forwards them to the upper-layer network through
SSID: Huawei SSID: Huawei the gateway (switch).
STA STA
44 Huawei Confidential
Inter-AC Layer 2 Roaming - Tunnel Forwarding
• Before roaming:
▫ The STA sends service packets to the HAP.
HAP FAP ▫ After receiving the service packets, the FAP sends
Roaming
45 Huawei Confidential
Inter-AC Layer 3 Roaming - Tunnel Forwarding
• Before roaming:
CAPWAP tunnel
The STA sends service packets to the HAP.
After receiving the service packets, the HAP sends
4 them to the HAC through the CAPWAP tunnel.
• After roaming:
2 The STA sends service packets to the FAP.
After receiving the service packets, the FAP sends
them to the FAC through the CAPWAP tunnel.
HAP FAP
Roaming
46 Huawei Confidential
Inter-AC Layer 3 Roaming - Direct Forwarding (HAP as the
Home Agent) • Before roaming:
CAPWAP tunnel
The STA sends service packets to the HAP.
After receiving the service packets, the HAP sends them
to the upper-layer network through the switch.
3
HAC FAC • After roaming:
The STA sends service packets to the FAP.
4 After receiving the service packets, the FAP sends them
47 Huawei Confidential
Inter-AC Layer 3 Roaming - Direct Forwarding (HAC as the
Home Agent)
CAPWAP tunnel
• Before roaming:
The STA sends service packets to the HAP.
After receiving the service packets, the HAP sends them
3
HAC FAC to the upper-layer network through the switch.
4
• After roaming:
The STA sends service packets to the FAP.
48 Huawei Confidential
Inter-AC Roaming Configuration
Create a mobility group.
[AC-wlan-view] mobility-group name group-name
Add a member AC to the mobility group. The IP address added in this step is the AC's source IP address.
49 Huawei Confidential
Example for Configuring Inter-AC Roaming
AC1 AC2
10.1.201.100 10.1.201.200
Configure WLAN roaming on AC1 and AC2.
[AC1-wlan-view] mobility-group name mobility
[AC1-mc-mg-mobility] member ip-address 10.1.201.100
HAC FAC
[AC1-mc-mg-mobility] member ip-address 10.1.201.200
[AC1-mc-mg-mobility] quit
STA STA
50 Huawei Confidential
Checking the STA Roaming Track on the AC
Check the STA roaming track on the AC after STA roaming is completed.
51 Huawei Confidential
Quiz
1. (Single Choice) Which of the following statements about CAPWAP tunnels are true?
A. CAPWAP tunnels include data tunnels and control tunnels.
B. A CAPWAP tunnel is established based on the TCP protocol to ensure the security of wireless data transmission.
C. During establishment of a CAPWAP tunnel, the AP downloads configurations from the AC after the Image Data
phase is complete.
D. On a Layer 3 WLAN, if the DHCP Option 43 field is not configured, an AP can discover an AC using DNS.
2. (Multi-Answer Question) Which of the following phases are included in the STA going-online process?
A. Scanning
B. Access
C. Association
D. Authentication
52 Huawei Confidential
Summary
53 Huawei Confidential
Thank you. 把数字世界带入每个人、每个家庭、
每个组织,构建万物互联的智能世界。
Bring digital to every person, home, and
organization for a fully connected,
intelligent world.