Skip to content
Snippets Groups Projects

MAP Controller

Map-Controller

Introduction

This package provides the mapcontroller daemon, which is responsible for distributing wireless credentials, vlan configuration and more.

Overview

This README will show how to properly setup the mapcontroller configuration file and trigger mapcontroller functionality.

UCI Configuration

A default configuration file which will propagate one fronthaul and one backhaul interface for the 5GHz and 2.4GHz bands respectively may look as such:

config controller 'controller'
	option enabled '1'
	option registrar '5 2'
	option debug '0'
	option enable_sta_steer '0'
	option enable_bsta_steer '0'
	option use_bcn_metrics '0'
	option use_usta_metrics '0'
	option primary_vid '1'
	option primary_pcp '0'

config interface 'lan'
	option proto 'dhcp'

config ap
	option band '5'
	option ssid 'MAP-EC6C9A52B027-5GHz'
	option encryption 'sae-mixed'
	option vid '1'
	option type 'fronthaul'
	option network 'lan'
	option key '7NTx-APvX-pba7-tvd7'

config ap
	option band '2'
	option ssid 'MAP-EC6C9A52B027-2.4GHz'
	option encryption 'sae-mixed'
	option vid '1'
	option type 'fronthaul'
	option network 'lan'
	option key '7NTx-APvX-pba7-tvd7'

config ap
	option band '5'
	option ssid 'MAP-EC6C9A52B027-BH-5GHz'
	option encryption 'sae'
	option type 'backhaul'
	option vid '1'
	option network 'lan'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'

config ap
	option band '2'
	option ssid 'MAP-EC6C9A52B027-BH-2.4GHz'
	option encryption 'sae'
	option type 'backhaul'
	list disallow_bsta '0'
	option vid '1'
	option network 'lan'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'

config policy 'policy'
	list steer_exclude '00:11:22:33:44:55'
	list steer_exclude_btm '00:aa:bb:cc:dd:ee'
	option steer_policy '2'
	option util_threshold '200'
	option rcpi_threshold '30'
	option report_scan '0'
	option report_sta_assocfails '1'
	option report_sta_assocfails_rate '2'
	option report_metric_periodic '0'
	option report_rcpi_threshold '0'
	option report_util_threshold '0'
	option rcpi_hysteresis_margin '0'
	option include_sta_stats '0'
	option include_sta_metric '0'
	option disallow_bsta_p1 '0'
	option disallow_bsta_p2 '0'

The important part of this configuration file is to properly setup the wireless credentials.

Credentials

The section ap holds the wireless credentials that will be passed to agents in the network, which will setup the local wireless configuration accordingly.

Fronthaul Credentials

Fronthaul AP credentials are identified by type 'fronthaul'. In the wireless uci configuration, these are mapped to the option multi_ap '2', which will be the APs that regular clients connect to.

As such, the following mapagent sections will be correspodning to the respective wireless sections:

config ap
	option band '5'
	option ssid 'MAP-EC6C9A52B027-5GHz'
	option encryption 'sae-mixed'
	option vid '1'
	option type 'fronthaul'
	option network 'lan'
	option key '7NTx-APvX-pba7-tvd7'

config ap
	option band '2'
	option ssid 'MAP-EC6C9A52B027-2.4GHz'
	option encryption 'sae-mixed'
	option vid '1'
	option type 'fronthaul'
	option network 'lan'
	option key '7NTx-APvX-pba7-tvd7'
config wifi-iface 'wl1_ap'
	option ifname 'wl1'
	option network 'lan'
	option ssid 'MAP-EC6C9A52B027-5GHz'
	option key '7NTx-APvX-pba7-tvd7'
	option encryption 'sae-mixed+aes'
	option mode 'ap'
	option device 'wl1'
	option multi_ap '2'
	option ieee80211k '1'
	option ieee80211v '1'
	option uuid 'cfa7df87-06a3-5daf-911f-44d4376af600'
	option wps '1'
	option wps_pushbutton '1'
	option multi_ap_backhaul_ssid 'MAP-EC6C9A52B027-BH-5GHz'
	option multi_ap_backhaul_key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'

config wifi-iface 'wl0_ap'
	option ifname 'wl0'
	option network 'lan'
	option ssid 'MAP-EC6C9A52B027-2.4GHz'
	option key '7NTx-APvX-pba7-tvd7'
	option encryption 'sae-mixed+aes'
	option mode 'ap'
	option device 'wl0'
	option multi_ap '2'
	option ieee80211k '1'
	option ieee80211v '1'
	option uuid 'cfa7df87-06a3-5daf-911f-44d4376af600'
	option wps '1'
	option wps_pushbutton '1'
	option multi_ap_backhaul_ssid 'MAP-EC6C9A52B027-BH-2.4GHz'
	option multi_ap_backhaul_key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'

Backhaul Credentials

Backhaul AP credentials are identified by type 'backhaul'. In the wireless uci configuration, these are mapped to the option multi_ap '1', which will be the APs that backhaul STA clients will connect to, in a Multi-AP environment.

The following mapagent sections will be correspodning to the respective wireless sections:

config ap
	option band '5'
	option ssid 'MAP-EC6C9A52B027-BH-5GHz'
	option encryption 'sae'
	option type 'backhaul'
	option vid '1'
	option network 'lan'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'

config ap
	option band '2'
	option ssid 'MAP-EC6C9A52B027-BH-2.4GHz'
	option encryption 'sae'
	option type 'backhaul'
	list disallow_bsta '0'
	option vid '1'
	option network 'lan'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'
config wifi-iface 'wl1_1_ap'
	option ifname 'wl1.1'
	option network 'lan'
	option ssid 'MAP-EC6C9A52B027-BH-5GHz'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'
	option encryption 'sae+aes'
	option mode 'ap'
	option device 'wl1'
	option multi_ap '1'
	option ieee80211k '1'
	option ieee80211v '1'
	option uuid 'cfa7df87-06a3-5daf-911f-44d4376af600'

config wifi-iface 'wl0_1_ap'
	option ifname 'wl0.1'
	option network 'lan'
	option ssid 'MAP-EC6C9A52B027-BH-2.4GHz'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'
	option encryption 'sae+aes'
	option mode 'ap'
	option device 'wl0'
	option multi_ap '1'
	option ieee80211k '1'
	option ieee80211v '1'
	option uuid 'cfa7df87-06a3-5daf-911f-44d4376af600'

Combined Front/Back

If combined fronthaul and backhaul interfaces are to be used, a config ap section with the option type 'combined' shall be provided:

config ap
	option band '5'
	option ssid 'MAP-EC6C9A52B027-COMBINED-5GHz'
	option encryption 'sae'
	option type 'combined'
	option vid '1'
	option network 'lan'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'

In turn map-agent will create the interface with the option multi_ap '3', meaning combined fronthaul/backhaul interface.

config wifi-iface 'wl0_ap'
	option ifname 'wl0'
	option network 'lan'
	option ssid 'MAP-EC6C9A52B027-COMBINED-5GHz'
	option key '0138a5f1b2bea4941be88001a55954ca228629eeaf51d66656893791a60bfed'
	option encryption 'sae+aes'
	option mode 'ap'
	option device 'wl0'
	option multi_ap '3'
	option ieee80211k '1'
	option ieee80211v '1'
	option uuid 'cfa7df87-06a3-5daf-911f-44d4376af600'
	option wps '1'
	option wps_pushbutton '1'

AP-Autoconfig Renew

Autoconfig Renew will trigger all agents to be reconfigured with updated credentials.

Prerequisites

  • Mapcontroller must be running

How to Trigger

Mapcontroller will re-read the mapcontroller network credentials (and vlan section) upon receiving SIGHUP. In order to trigger AP-Autoconfig Renew the mapcontroller credentials loaded in memory at runtime, must differ from what are in its config, causing mapcontroller to generate a AP-Autoconfig Renew for all agents to be reconfigured.

uBus

root@iopsys:~# ubus -v list map.controller
'map.controller' @601d80a0
	"status":{}
	"ap_caps":{"agent":"String"}
	"sta_caps":{"agent":"String","sta":"String","bssid":"String"}
	"channel_pref":{"agent":"String"}
	"bk_steer":{"agent":"String","bssid":"String","channel":"Integer","op_class":"Integer","bksta":"String"}
	"agent_policy":{"agent":"String","radiolist":"Array","bsslist":"Array"}
	"channel_select":{"agent":"String","radio_id":"String","class_id":"Integer","channel":"Array","preference":"Integer","transmit_power":"Integer"}
	"reconfig_ap":{"agent":"String"}
	"steer":{"agent":"String","src_bssid":"String","sta":"Array","target_bssid":"Array","steer_timeout":"Integer","btm_timeout":"Integer","steer_req_mode":"Boolean"}
	"client_assoc_cntlr":{"agent":"String","bssid":"String","assoc_cntl_mode":"Integer","assoc_valid_timeout":"Integer","stalist":"Array"}
	"ap_metric_query":{"agent":"String","bsslist":"Array","radiolist":"Array"}
	"scan":{"agent":"String","radio":"Array","channel":"Array"}
	"sta_metric_query":{"agent":"String","sta":"String"}
	"unassoc_sta_lm_query":{"agent":"String","opclass":"Integer","metrics":"Array"}
	"bcn_metrics_query":{"agent":"String","sta":"String","opclass":"Integer","channel":"Integer","bssid":"String","reporting_detail":"Integer","ssid":"String","channel_report":"Array","request_element":"Array"}
	"bk_caps":{"agent":"String"}
	"topology_query":{"agent":"String"}
	"cac_req":{"agent":"String","radiolist":"Array"}
	"cac_term":{"agent":"String","radiolist":"Array"}
	"higher_layer_data":{"agent":"String","protocol":"Integer","data":"String"}