1e5b75505Sopenharmony_cihostapd, wpa_supplicant and the Multi-AP Specification 2e5b75505Sopenharmony_ci====================================================== 3e5b75505Sopenharmony_ci 4e5b75505Sopenharmony_ciThis document describes how hostapd and wpa_supplicant can be configured to 5e5b75505Sopenharmony_cisupport the Multi-AP Specification. 6e5b75505Sopenharmony_ci 7e5b75505Sopenharmony_ciIntroduction to Multi-AP 8e5b75505Sopenharmony_ci------------------------ 9e5b75505Sopenharmony_ci 10e5b75505Sopenharmony_ciThe Wi-Fi Alliance Multi-AP Specification is the technical specification for 11e5b75505Sopenharmony_ciWi-Fi CERTIFIED EasyMesh(TM) [1], the Wi-Fi Alliance® certification program for 12e5b75505Sopenharmony_ciMulti-AP. It defines control protocols between Wi-Fi® access points (APs) to 13e5b75505Sopenharmony_cijoin them into a network with centralized control and operation. It is targeted 14e5b75505Sopenharmony_cionly at routers (repeaters, gateways, ...), not at clients. Clients are not 15e5b75505Sopenharmony_ciinvolved at all in the protocols. 16e5b75505Sopenharmony_ci 17e5b75505Sopenharmony_ciMost of the Multi-AP specification falls outside of the scope of 18e5b75505Sopenharmony_cihostapd/wpa_supplicant. hostapd/wpa_supplicant is only involved for the items 19e5b75505Sopenharmony_cisummarized below. The rest of the protocol must be implemented by a separate 20e5b75505Sopenharmony_cidaemon, e.g., prplMesh [2]. That daemon also needs to communicate with hostapd, 21e5b75505Sopenharmony_cie.g., to get a list of associated clients, but this can be done using the normal 22e5b75505Sopenharmony_cihostapd interfaces. 23e5b75505Sopenharmony_ci 24e5b75505Sopenharmony_cihostapd/wpa_supplicant needs to be configured specifically to support: 25e5b75505Sopenharmony_ci- the WPS onboarding process; 26e5b75505Sopenharmony_ci- configuring backhaul links. 27e5b75505Sopenharmony_ci 28e5b75505Sopenharmony_ciThe text below refers to "Multi-AP Specification v1.0" [3]. 29e5b75505Sopenharmony_ci 30e5b75505Sopenharmony_ci 31e5b75505Sopenharmony_ciFronthaul and backhaul links 32e5b75505Sopenharmony_ci---------------------------- 33e5b75505Sopenharmony_ci 34e5b75505Sopenharmony_ciIn a Multi-AP network, the central controller can configure the BSSs on the 35e5b75505Sopenharmony_cidevices that are joined into the network. These are called fronthaul BSSs. 36e5b75505Sopenharmony_ciFrom the point of view of hostapd, there is nothing special about these 37e5b75505Sopenharmony_cifronthaul BSSs. 38e5b75505Sopenharmony_ci 39e5b75505Sopenharmony_ciIn addition to fronthaul BSSs, the controller can also configure backhaul 40e5b75505Sopenharmony_cilinks. A backhaul link is a link between two access point devices, giving 41e5b75505Sopenharmony_ciinternet access to access point devices that don't have a wired link. The 42e5b75505Sopenharmony_ciMulti-AP specification doesn't dictate this, but typically the backhaul link 43e5b75505Sopenharmony_ciwill be bridged into a LAN together with (one of) the fronthaul BSS(s) and the 44e5b75505Sopenharmony_ciwired Ethernet ports. 45e5b75505Sopenharmony_ci 46e5b75505Sopenharmony_ciA backhaul link must be treated specially by hostapd and wpa_supplicant. One 47e5b75505Sopenharmony_ciside of the backhaul link is configured through the Multi-AP protocol as the 48e5b75505Sopenharmony_ci"backhaul STA", i.e., the client side of the link. A backhaul STA is like any 49e5b75505Sopenharmony_cistation and is handled appropriately by wpa_supplicant, but two additional 50e5b75505Sopenharmony_cifeatures are required. It must send an additional information element in each 51e5b75505Sopenharmony_ci(Re)Association Request frame ([3], section 5.2, paragraph 4). In addition, it 52e5b75505Sopenharmony_cimust use 4-address mode for all frames sent over this link ([3], section 14). 53e5b75505Sopenharmony_ciTherefore, wpa_supplicant must be configured explicitly as the backhaul STA 54e5b75505Sopenharmony_cirole, by setting 'multi_ap_backhaul_sta=1' in the network configuration block 55e5b75505Sopenharmony_cior when configuring the network profile through the control interface. When 56e5b75505Sopenharmony_ci'multi_ap_backhaul_sta=1', wpa_supplicant includes the Multi-AP IE in 57e5b75505Sopenharmony_ci(Re)Association Request frame and verifies that it is included in the 58e5b75505Sopenharmony_ci(Re)Association Response frame. If it is not, association fails. If it is, 59e5b75505Sopenharmony_ciwpa_supplicant sets 4-address mode for this interface through a driver 60e5b75505Sopenharmony_cicallback. 61e5b75505Sopenharmony_ci 62e5b75505Sopenharmony_ciThe AP side of the backhaul link is called a "backhaul BSS". Such a BSS must 63e5b75505Sopenharmony_cibe handled specially by hostapd, because it must add an additional information 64e5b75505Sopenharmony_cielement in each (Re)Association Response frame, but only to stations that have 65e5b75505Sopenharmony_ciidentified themselves as backhaul stations ([3], section 5.2, paragraph 5-6). 66e5b75505Sopenharmony_ciThis is important because it is possible to use the same BSS and SSID for 67e5b75505Sopenharmony_cifronthaul and backhaul at the same time. The additional information element must 68e5b75505Sopenharmony_cionly be used for frames sent to a backhaul STA, not to a normal STA. Also, 69e5b75505Sopenharmony_ciframes sent to a backhaul STA must use 4-address mode, while frames sent to a 70e5b75505Sopenharmony_cinormal STA (fronthaul, when it's a fronthaul and backhaul BSS) must use 71e5b75505Sopenharmony_ci3-address mode. 72e5b75505Sopenharmony_ci 73e5b75505Sopenharmony_ciA BSS is configured in Multi-AP mode in hostapd by setting the 'multi_ap' 74e5b75505Sopenharmony_ciconfiguration option to 1 (backhaul BSS), 2 (fronthaul BSS), or 3 75e5b75505Sopenharmony_ci(simultaneous backhaul and fronthaul BSS). If this option is set, hostapd 76e5b75505Sopenharmony_ciparses the Multi-AP information element in the Association Request frame. If the 77e5b75505Sopenharmony_cistation is a backhaul STA and the BSS is configured as a backhaul BSS, 78e5b75505Sopenharmony_cihostapd sets up 4-address mode. Since there may be multiple stations connected 79e5b75505Sopenharmony_cisimultaneously, and each of them has a different RA (receiver address), a VLAN 80e5b75505Sopenharmony_ciis created for each backhaul STA and it is automatically added to a bridge. 81e5b75505Sopenharmony_ciThis is the same behavior as for WDS, and the relevant option ('bridge' or 82e5b75505Sopenharmony_ci'wds_bridge') applies here as well. 83e5b75505Sopenharmony_ci 84e5b75505Sopenharmony_ciIf 'multi_ap' is 1 (backhaul BSS only), any station that tries to associate 85e5b75505Sopenharmony_ciwithout the Multi-AP information element will be denied. 86e5b75505Sopenharmony_ci 87e5b75505Sopenharmony_ciIf 'multi_ap' is 2 (fronthaul BSS only), any station that tries to associate 88e5b75505Sopenharmony_ciwith the Multi-AP information element will be denied. That is also the only 89e5b75505Sopenharmony_cidifference with 'multi_ap' set to 0: in the latter case, the Multi-AP 90e5b75505Sopenharmony_ciinformation element is simply ignored. 91e5b75505Sopenharmony_ci 92e5b75505Sopenharmony_ciIn summary, this is the end-to-end behavior for a backhaul BSS (i.e., 93e5b75505Sopenharmony_cimulti_ap_backhaul_sta=1 in wpa_supplicant on STA, and multi_ap=1 or 3 in 94e5b75505Sopenharmony_cihostapd on AP). Note that point 1 means that hostapd must not be configured 95e5b75505Sopenharmony_ciwith WPS support on the backhaul BSS (multi_ap=1). hostapd does not check for 96e5b75505Sopenharmony_cithat. 97e5b75505Sopenharmony_ci 98e5b75505Sopenharmony_ci1. Backhaul BSS beacons do not advertise WPS support (other than that, nothing 99e5b75505Sopenharmony_ci Multi-AP specific). 100e5b75505Sopenharmony_ci2. STA sends Authentication frame (nothing Multi-AP specific). 101e5b75505Sopenharmony_ci3. AP sends Authentication frame (nothing Multi-AP specific). 102e5b75505Sopenharmony_ci4. STA sends Association Request frame with Multi-AP IE. 103e5b75505Sopenharmony_ci5. AP sends Association Response frame with Multi-AP IE. 104e5b75505Sopenharmony_ci6. STA and AP both use 4-address mode for Data frames. 105e5b75505Sopenharmony_ci 106e5b75505Sopenharmony_ci 107e5b75505Sopenharmony_ciWPS support 108e5b75505Sopenharmony_ci----------- 109e5b75505Sopenharmony_ci 110e5b75505Sopenharmony_ciWPS requires more special handling. WPS must only be advertised on fronthaul 111e5b75505Sopenharmony_ciBSSs, not on backhaul BSSs, so WPS should not be enabled on a backhaul-only 112e5b75505Sopenharmony_ciBSS in hostapd.conf. The WPS configuration purely works on the fronthaul BSS. 113e5b75505Sopenharmony_ciWhen a WPS M1 message has an additional subelement that indicates a request for 114e5b75505Sopenharmony_cia Multi-AP backhaul link, hostapd must not respond with the normal fronthaul 115e5b75505Sopenharmony_ciBSS credentials; instead, it should respond with the (potentially different) 116e5b75505Sopenharmony_cibackhaul BSS credentials. 117e5b75505Sopenharmony_ci 118e5b75505Sopenharmony_ciTo support this, hostapd has the 'multi_ap_backhaul_ssid', 119e5b75505Sopenharmony_ci'multi_ap_backhaul_wpa_psk' and 'multi_ap_backhaul_wpa_passphrase' options. 120e5b75505Sopenharmony_ciWhen these are set on an BSS with WPS, they are used instead of the normal 121e5b75505Sopenharmony_cicredentials when hostapd receives a WPS M1 message with the Multi-AP IE. Only 122e5b75505Sopenharmony_ciWPA2-Personal is supported in the Multi-AP specification, so there is no need 123e5b75505Sopenharmony_cito specify authentication or encryption options. For the backhaul credentials, 124e5b75505Sopenharmony_ciper-device PSK is not supported. 125e5b75505Sopenharmony_ci 126e5b75505Sopenharmony_ciIf the BSS is a simultaneous backhaul and fronthaul BSS, there is no need to 127e5b75505Sopenharmony_cispecify the backhaul credentials, since the backhaul and fronthaul credentials 128e5b75505Sopenharmony_ciare identical. 129e5b75505Sopenharmony_ci 130e5b75505Sopenharmony_ciTo enable the Multi-AP backhaul STA feature when it performs WPS, a new 131e5b75505Sopenharmony_ciparameter has been introduced to the WPS_PBC control interface call. When this 132e5b75505Sopenharmony_ci"multi_ap=1" option is set, it adds the Multi-AP backhaul subelement to the 133e5b75505Sopenharmony_ciAssociation Request frame and the M1 message. It then configures the new network 134e5b75505Sopenharmony_ciprofile with 'multi_ap_backhaul_sta=1'. Note that this means that if the AP does 135e5b75505Sopenharmony_cinot follow the Multi-AP specification, wpa_supplicant will fail to associate. 136e5b75505Sopenharmony_ci 137e5b75505Sopenharmony_ciIn summary, this is the end-to-end behavior for WPS of a backhaul link (i.e., 138e5b75505Sopenharmony_cimulti_ap=1 option is given in the wps_pbc call on the STA side, and multi_ap=2 139e5b75505Sopenharmony_ciand multi_ap_backhaul_ssid and either multi_ap_backhaul_wpa_psk or 140e5b75505Sopenharmony_cimulti_ap_backhaul_wpa_passphrase are set to the credentials of a backhaul BSS 141e5b75505Sopenharmony_ciin hostapd on Registrar AP). 142e5b75505Sopenharmony_ci 143e5b75505Sopenharmony_ci1. Fronthaul BSS Beacon frames advertise WPS support (nothing Multi-AP 144e5b75505Sopenharmony_ci specific). 145e5b75505Sopenharmony_ci2. Enrollee sends Authentication frame (nothing Multi-AP specific). 146e5b75505Sopenharmony_ci3. AP sends Authentication frame (nothing Multi-AP specific). 147e5b75505Sopenharmony_ci4. Enrollee sends Association Request frame with Multi-AP IE. 148e5b75505Sopenharmony_ci5. AP sends Association Response frame with Multi-AP IE. 149e5b75505Sopenharmony_ci6. Enrollee sends M1 with additional Multi-AP subelement. 150e5b75505Sopenharmony_ci7. AP sends M8 with backhaul instead of fronthaul credentials. 151e5b75505Sopenharmony_ci8. Enrollee sends Deauthentication frame. 152e5b75505Sopenharmony_ci 153e5b75505Sopenharmony_ci 154e5b75505Sopenharmony_ciReferences 155e5b75505Sopenharmony_ci---------- 156e5b75505Sopenharmony_ci 157e5b75505Sopenharmony_ci[1] https://www.wi-fi.org/discover-wi-fi/wi-fi-easymesh 158e5b75505Sopenharmony_ci[2] https://github.com/prplfoundation/prplMesh 159e5b75505Sopenharmony_ci[3] https://www.wi-fi.org/file/multi-ap-specification-v10 160e5b75505Sopenharmony_ci (requires registration) 161