xref: /aosp_15_r20/external/wpa_supplicant_8/hostapd/README-MULTI-AP (revision 03f9172ca588f91df233974f4258bab95191f931)
1*03f9172cSAndroid Build Coastguard Workerhostapd, wpa_supplicant and the Multi-AP Specification
2*03f9172cSAndroid Build Coastguard Worker======================================================
3*03f9172cSAndroid Build Coastguard Worker
4*03f9172cSAndroid Build Coastguard WorkerThis document describes how hostapd and wpa_supplicant can be configured to
5*03f9172cSAndroid Build Coastguard Workersupport the Multi-AP Specification.
6*03f9172cSAndroid Build Coastguard Worker
7*03f9172cSAndroid Build Coastguard WorkerIntroduction to Multi-AP
8*03f9172cSAndroid Build Coastguard Worker------------------------
9*03f9172cSAndroid Build Coastguard Worker
10*03f9172cSAndroid Build Coastguard WorkerThe Wi-Fi Alliance Multi-AP Specification is the technical specification for
11*03f9172cSAndroid Build Coastguard WorkerWi-Fi CERTIFIED EasyMesh(TM) [1], the Wi-Fi Alliance® certification program for
12*03f9172cSAndroid Build Coastguard WorkerMulti-AP. It defines control protocols between Wi-Fi® access points (APs) to
13*03f9172cSAndroid Build Coastguard Workerjoin them into a network with centralized control and operation. It is targeted
14*03f9172cSAndroid Build Coastguard Workeronly at routers (repeaters, gateways, ...), not at clients. Clients are not
15*03f9172cSAndroid Build Coastguard Workerinvolved at all in the protocols.
16*03f9172cSAndroid Build Coastguard Worker
17*03f9172cSAndroid Build Coastguard WorkerMost of the Multi-AP specification falls outside of the scope of
18*03f9172cSAndroid Build Coastguard Workerhostapd/wpa_supplicant. hostapd/wpa_supplicant is only involved for the items
19*03f9172cSAndroid Build Coastguard Workersummarized below. The rest of the protocol must be implemented by a separate
20*03f9172cSAndroid Build Coastguard Workerdaemon, e.g., prplMesh [2]. That daemon also needs to communicate with hostapd,
21*03f9172cSAndroid Build Coastguard Workere.g., to get a list of associated clients, but this can be done using the normal
22*03f9172cSAndroid Build Coastguard Workerhostapd interfaces.
23*03f9172cSAndroid Build Coastguard Worker
24*03f9172cSAndroid Build Coastguard Workerhostapd/wpa_supplicant needs to be configured specifically to support:
25*03f9172cSAndroid Build Coastguard Worker- the WPS onboarding process;
26*03f9172cSAndroid Build Coastguard Worker- configuring backhaul links.
27*03f9172cSAndroid Build Coastguard Worker
28*03f9172cSAndroid Build Coastguard WorkerThe text below refers to "Multi-AP Specification v1.0" [3].
29*03f9172cSAndroid Build Coastguard Worker
30*03f9172cSAndroid Build Coastguard Worker
31*03f9172cSAndroid Build Coastguard WorkerFronthaul and backhaul links
32*03f9172cSAndroid Build Coastguard Worker----------------------------
33*03f9172cSAndroid Build Coastguard Worker
34*03f9172cSAndroid Build Coastguard WorkerIn a Multi-AP network, the central controller can configure the BSSs on the
35*03f9172cSAndroid Build Coastguard Workerdevices that are joined into the network. These are called fronthaul BSSs.
36*03f9172cSAndroid Build Coastguard WorkerFrom the point of view of hostapd, there is nothing special about these
37*03f9172cSAndroid Build Coastguard Workerfronthaul BSSs.
38*03f9172cSAndroid Build Coastguard Worker
39*03f9172cSAndroid Build Coastguard WorkerIn addition to fronthaul BSSs, the controller can also configure backhaul
40*03f9172cSAndroid Build Coastguard Workerlinks. A backhaul link is a link between two access point devices, giving
41*03f9172cSAndroid Build Coastguard Workerinternet access to access point devices that don't have a wired link. The
42*03f9172cSAndroid Build Coastguard WorkerMulti-AP specification doesn't dictate this, but typically the backhaul link
43*03f9172cSAndroid Build Coastguard Workerwill be bridged into a LAN together with (one of) the fronthaul BSS(s) and the
44*03f9172cSAndroid Build Coastguard Workerwired Ethernet ports.
45*03f9172cSAndroid Build Coastguard Worker
46*03f9172cSAndroid Build Coastguard WorkerA backhaul link must be treated specially by hostapd and wpa_supplicant. One
47*03f9172cSAndroid Build Coastguard Workerside of the backhaul link is configured through the Multi-AP protocol as the
48*03f9172cSAndroid Build Coastguard Worker"backhaul STA", i.e., the client side of the link. A backhaul STA is like any
49*03f9172cSAndroid Build Coastguard Workerstation and is handled appropriately by wpa_supplicant, but two additional
50*03f9172cSAndroid Build Coastguard Workerfeatures are required. It must send an additional information element in each
51*03f9172cSAndroid Build Coastguard Worker(Re)Association Request frame ([3], section 5.2, paragraph 4). In addition, it
52*03f9172cSAndroid Build Coastguard Workermust use 4-address mode for all frames sent over this link ([3], section 14).
53*03f9172cSAndroid Build Coastguard WorkerTherefore, wpa_supplicant must be configured explicitly as the backhaul STA
54*03f9172cSAndroid Build Coastguard Workerrole, by setting 'multi_ap_backhaul_sta=1' in the network configuration block
55*03f9172cSAndroid Build Coastguard Workeror when configuring the network profile through the control interface. When
56*03f9172cSAndroid Build Coastguard Worker'multi_ap_backhaul_sta=1', wpa_supplicant includes the Multi-AP IE in
57*03f9172cSAndroid Build Coastguard Worker(Re)Association Request frame and verifies that it is included in the
58*03f9172cSAndroid Build Coastguard Worker(Re)Association Response frame. If it is not, association fails. If it is,
59*03f9172cSAndroid Build Coastguard Workerwpa_supplicant sets 4-address mode for this interface through a driver
60*03f9172cSAndroid Build Coastguard Workercallback.
61*03f9172cSAndroid Build Coastguard Worker
62*03f9172cSAndroid Build Coastguard WorkerThe AP side of the backhaul link is called a "backhaul BSS". Such a BSS must
63*03f9172cSAndroid Build Coastguard Workerbe handled specially by hostapd, because it must add an additional information
64*03f9172cSAndroid Build Coastguard Workerelement in each (Re)Association Response frame, but only to stations that have
65*03f9172cSAndroid Build Coastguard Workeridentified themselves as backhaul stations ([3], section 5.2, paragraph 5-6).
66*03f9172cSAndroid Build Coastguard WorkerThis is important because it is possible to use the same BSS and SSID for
67*03f9172cSAndroid Build Coastguard Workerfronthaul and backhaul at the same time. The additional information element must
68*03f9172cSAndroid Build Coastguard Workeronly be used for frames sent to a backhaul STA, not to a normal STA. Also,
69*03f9172cSAndroid Build Coastguard Workerframes sent to a backhaul STA must use 4-address mode, while frames sent to a
70*03f9172cSAndroid Build Coastguard Workernormal STA (fronthaul, when it's a fronthaul and backhaul BSS) must use
71*03f9172cSAndroid Build Coastguard Worker3-address mode.
72*03f9172cSAndroid Build Coastguard Worker
73*03f9172cSAndroid Build Coastguard WorkerA BSS is configured in Multi-AP mode in hostapd by setting the 'multi_ap'
74*03f9172cSAndroid Build Coastguard Workerconfiguration option to 1 (backhaul BSS), 2 (fronthaul BSS), or 3
75*03f9172cSAndroid Build Coastguard Worker(simultaneous backhaul and fronthaul BSS). If this option is set, hostapd
76*03f9172cSAndroid Build Coastguard Workerparses the Multi-AP information element in the Association Request frame. If the
77*03f9172cSAndroid Build Coastguard Workerstation is a backhaul STA and the BSS is configured as a backhaul BSS,
78*03f9172cSAndroid Build Coastguard Workerhostapd sets up 4-address mode. Since there may be multiple stations connected
79*03f9172cSAndroid Build Coastguard Workersimultaneously, and each of them has a different RA (receiver address), a VLAN
80*03f9172cSAndroid Build Coastguard Workeris created for each backhaul STA and it is automatically added to a bridge.
81*03f9172cSAndroid Build Coastguard WorkerThis is the same behavior as for WDS, and the relevant option ('bridge' or
82*03f9172cSAndroid Build Coastguard Worker'wds_bridge') applies here as well.
83*03f9172cSAndroid Build Coastguard Worker
84*03f9172cSAndroid Build Coastguard WorkerIf 'multi_ap' is 1 (backhaul BSS only), any station that tries to associate
85*03f9172cSAndroid Build Coastguard Workerwithout the Multi-AP information element will be denied.
86*03f9172cSAndroid Build Coastguard Worker
87*03f9172cSAndroid Build Coastguard WorkerIf 'multi_ap' is 2 (fronthaul BSS only), any station that tries to associate
88*03f9172cSAndroid Build Coastguard Workerwith the Multi-AP information element will be denied. That is also the only
89*03f9172cSAndroid Build Coastguard Workerdifference with 'multi_ap' set to 0: in the latter case, the Multi-AP
90*03f9172cSAndroid Build Coastguard Workerinformation element is simply ignored.
91*03f9172cSAndroid Build Coastguard Worker
92*03f9172cSAndroid Build Coastguard WorkerIn summary, this is the end-to-end behavior for a backhaul BSS (i.e.,
93*03f9172cSAndroid Build Coastguard Workermulti_ap_backhaul_sta=1 in wpa_supplicant on STA, and multi_ap=1 or 3 in
94*03f9172cSAndroid Build Coastguard Workerhostapd on AP). Note that point 1 means that hostapd must not be configured
95*03f9172cSAndroid Build Coastguard Workerwith WPS support on the backhaul BSS (multi_ap=1). hostapd does not check for
96*03f9172cSAndroid Build Coastguard Workerthat.
97*03f9172cSAndroid Build Coastguard Worker
98*03f9172cSAndroid Build Coastguard Worker1. Backhaul BSS beacons do not advertise WPS support (other than that, nothing
99*03f9172cSAndroid Build Coastguard Worker   Multi-AP specific).
100*03f9172cSAndroid Build Coastguard Worker2. STA sends Authentication frame (nothing Multi-AP specific).
101*03f9172cSAndroid Build Coastguard Worker3. AP sends Authentication frame (nothing Multi-AP specific).
102*03f9172cSAndroid Build Coastguard Worker4. STA sends Association Request frame with Multi-AP IE.
103*03f9172cSAndroid Build Coastguard Worker5. AP sends Association Response frame with Multi-AP IE.
104*03f9172cSAndroid Build Coastguard Worker6. STA and AP both use 4-address mode for Data frames.
105*03f9172cSAndroid Build Coastguard Worker
106*03f9172cSAndroid Build Coastguard Worker
107*03f9172cSAndroid Build Coastguard WorkerWPS support
108*03f9172cSAndroid Build Coastguard Worker-----------
109*03f9172cSAndroid Build Coastguard Worker
110*03f9172cSAndroid Build Coastguard WorkerWPS requires more special handling. WPS must only be advertised on fronthaul
111*03f9172cSAndroid Build Coastguard WorkerBSSs, not on backhaul BSSs, so WPS should not be enabled on a backhaul-only
112*03f9172cSAndroid Build Coastguard WorkerBSS in hostapd.conf. The WPS configuration purely works on the fronthaul BSS.
113*03f9172cSAndroid Build Coastguard WorkerWhen a WPS M1 message has an additional subelement that indicates a request for
114*03f9172cSAndroid Build Coastguard Workera Multi-AP backhaul link, hostapd must not respond with the normal fronthaul
115*03f9172cSAndroid Build Coastguard WorkerBSS credentials; instead, it should respond with the (potentially different)
116*03f9172cSAndroid Build Coastguard Workerbackhaul BSS credentials.
117*03f9172cSAndroid Build Coastguard Worker
118*03f9172cSAndroid Build Coastguard WorkerTo support this, hostapd has the 'multi_ap_backhaul_ssid',
119*03f9172cSAndroid Build Coastguard Worker'multi_ap_backhaul_wpa_psk' and 'multi_ap_backhaul_wpa_passphrase' options.
120*03f9172cSAndroid Build Coastguard WorkerWhen these are set on an BSS with WPS, they are used instead of the normal
121*03f9172cSAndroid Build Coastguard Workercredentials when hostapd receives a WPS M1 message with the Multi-AP IE. Only
122*03f9172cSAndroid Build Coastguard WorkerWPA2-Personal is supported in the Multi-AP specification, so there is no need
123*03f9172cSAndroid Build Coastguard Workerto specify authentication or encryption options. For the backhaul credentials,
124*03f9172cSAndroid Build Coastguard Workerper-device PSK is not supported.
125*03f9172cSAndroid Build Coastguard Worker
126*03f9172cSAndroid Build Coastguard WorkerIf the BSS is a simultaneous backhaul and fronthaul BSS, there is no need to
127*03f9172cSAndroid Build Coastguard Workerspecify the backhaul credentials, since the backhaul and fronthaul credentials
128*03f9172cSAndroid Build Coastguard Workerare identical.
129*03f9172cSAndroid Build Coastguard Worker
130*03f9172cSAndroid Build Coastguard WorkerTo enable the Multi-AP backhaul STA feature when it performs WPS, a new
131*03f9172cSAndroid Build Coastguard Workerparameter has been introduced to the WPS_PBC control interface call. When this
132*03f9172cSAndroid Build Coastguard Worker"multi_ap=1" option is set, it adds the Multi-AP backhaul subelement to the
133*03f9172cSAndroid Build Coastguard WorkerAssociation Request frame and the M1 message. It then configures the new network
134*03f9172cSAndroid Build Coastguard Workerprofile with 'multi_ap_backhaul_sta=1'. Note that this means that if the AP does
135*03f9172cSAndroid Build Coastguard Workernot follow the Multi-AP specification, wpa_supplicant will fail to associate.
136*03f9172cSAndroid Build Coastguard Worker
137*03f9172cSAndroid Build Coastguard WorkerIn summary, this is the end-to-end behavior for WPS of a backhaul link (i.e.,
138*03f9172cSAndroid Build Coastguard Workermulti_ap=1 option is given in the wps_pbc call on the STA side, and multi_ap=2
139*03f9172cSAndroid Build Coastguard Workerand multi_ap_backhaul_ssid and either multi_ap_backhaul_wpa_psk or
140*03f9172cSAndroid Build Coastguard Workermulti_ap_backhaul_wpa_passphrase are set to the credentials of a backhaul BSS
141*03f9172cSAndroid Build Coastguard Workerin hostapd on Registrar AP).
142*03f9172cSAndroid Build Coastguard Worker
143*03f9172cSAndroid Build Coastguard Worker1. Fronthaul BSS Beacon frames advertise WPS support (nothing Multi-AP
144*03f9172cSAndroid Build Coastguard Worker   specific).
145*03f9172cSAndroid Build Coastguard Worker2. Enrollee sends Authentication frame (nothing Multi-AP specific).
146*03f9172cSAndroid Build Coastguard Worker3. AP sends Authentication frame (nothing Multi-AP specific).
147*03f9172cSAndroid Build Coastguard Worker4. Enrollee sends Association Request frame with Multi-AP IE.
148*03f9172cSAndroid Build Coastguard Worker5. AP sends Association Response frame with Multi-AP IE.
149*03f9172cSAndroid Build Coastguard Worker6. Enrollee sends M1 with additional Multi-AP subelement.
150*03f9172cSAndroid Build Coastguard Worker7. AP sends M8 with backhaul instead of fronthaul credentials.
151*03f9172cSAndroid Build Coastguard Worker8. Enrollee sends Deauthentication frame.
152*03f9172cSAndroid Build Coastguard Worker
153*03f9172cSAndroid Build Coastguard Worker
154*03f9172cSAndroid Build Coastguard WorkerReferences
155*03f9172cSAndroid Build Coastguard Worker----------
156*03f9172cSAndroid Build Coastguard Worker
157*03f9172cSAndroid Build Coastguard Worker[1] https://www.wi-fi.org/discover-wi-fi/wi-fi-easymesh
158*03f9172cSAndroid Build Coastguard Worker[2] https://github.com/prplfoundation/prplMesh
159*03f9172cSAndroid Build Coastguard Worker[3] https://www.wi-fi.org/file/multi-ap-specification-v10
160*03f9172cSAndroid Build Coastguard Worker    (requires registration)
161