# OpenWiFi Release 2.1

Telecom Infra Project OpenWiFi

## What is OpenWiFi?

TIP OpenWiFi is an open source community project that believes in democratizing premium Wi-Fi experiences for multiple market use cases. The TIP approach to OpenWiFi creates an open source disaggregated technology stack without any vendor lock in. OpenWiFi offers premium managed Wi-Fi features, local break-out design, cloud native open source controller, and an open source AP firmware operating system tested nightly.

![Open Technology Stack - Many Platforms - Many Service Options](/files/-M_5tb3Ga4ewI08f-Ipj)

TIP OpenWiFi is the industry's first CI/CD open source Wi-Fi eco-system. Built nightly with a strong community of Wi-Fi leaders, new features are unit tested in automated RF chambers and checked from cloud to ground for Wi-Fi performance and conformance.

OpenWiFi 2.0 introduces management and telemetry based on uCentral offering expanded selection of managed devices including smaller APs and PoE access switches.

### High Level Features

#### Each OpenWiFi AP offers:

* Multiple topologies including :
  * Bridging, Virtual LAN, VxLAN, NAT Gateway, Local Breakout, Overlay (PPPoE, L2oGRE, L2TP), Mesh, WDS&#x20;
* Multiple authentications including WPA, WPA2, WPA3, Enterprise Radius models, M-PSK
* Passpoint R1 and R2 Mobile Offload
* Encrypted Zero Touch Provisioning and Cloud Discovery
* Autonomous RRM and Channel Control
* Captive Portal & ExpressWiFi

#### Each OpenWiFi PoE Switch offers:

* IEEE802.1Q Virtual LAN
* VxLAN
* DHCP Snooping & Relay
* Multicast
* PoE
* IEEE802.1x Access Control

#### Cloud SDK in OpenWiFi offers:

* Zero Touch Provisioning&#x20;
* Firmware Management
* Integration Northbound Interface (NBI) RESTful
* Data model driven API&#x20;
* Enterprise Message Bus data access&#x20;

**OpenWiFi AP Detail List:**

* Wi-Fi 4 (n) Wi-Fi 5 (ac) Wi-Fi 6 (ax)&#x20;
* Dual Bank Bootloader
* Multi-SSID per Radio
* SSID Authentications: WPA/WPA2/WPA3 - Mixed, Personal, Enterprise
* 802.1Q VLAN per SSID&#x20;
* 802.1d Bridge Mode per SSID
* RADIUS Accounting, Interim-Accounting, NAS-IP, CUI
* Network Address Translation Gateway Mode Operation
* Network Time Protocol Client
* Management VLAN&#x20;
* Wi-Fi 6 (ax) Specific
  * BSS Coloring
  * UL/DL OFDMA sub-carrier allocation
  * Channel Switch Announcement
* Wi-Fi General Features
  * WMM® - Wi-Fi Multi Media
    * UAPSD Procedures (Unscheduled Power Save)&#x20;
    * Upstream/Downstream Queues & L3 DSCP
    * Over The Air QoS EDCH Procedures
* WMM-Admission Control (AC)&#x20;
* WMM-Power Save (PS)
* Wi-Fi Optimized Connectivity
  * (ai) Fast Initial Link Support
* Wi-Fi Agile Multiband
  * (k) Client Radio Resource Management - Directed Steering
  * (v) Network Assisted Roaming
  * (r) Fast BSS Transition
* Protected Management Frames (PMF)&#x20;
  * (w) Management Frame Encryption
* Channel Switch Announcement (CSA)
* Dynamic Frequency Selection & Transmit Power Control (DFS/TPC)
* Beacon Rate&#x20;
* Min Client Noise Immunity
* Basic Rate Control
* De-Auth RSSI Control
* Burst Beacon Support
* Per SSID Client Rate Limiting
* Promiscuous Mode Support&#x20;
* **Additional TIP AP NOS Features**
  * ISP WAN Profiles ( PPPoE, L2TP, L2oGRE )
  * Embedded Captive Portal (Local Splash non-auth)
  * Link Layer Discovery Protocol (LLDP)
  * Dynamic Airtime Fairness
  * Service Flow QoS&#x20;
  * Wireline & Wireless Tracing (PCAP Cloud Remote Troubleshooting)
  * Health Check Reports
  * Local Provisioning over SSID (when Cloud or WAN down)
  * Multimedia Heuristics (Detection of Unified Communication Sessions)
  * SSID Rate Limiting
  * GPS Reporting
  * Autonomous RRM Client Steering&#x20;
  * Client / AP / Network Metric Telemetry&#x20;

**Cloud SDK additional features**

* **Provisioning**&#x20;
  * Device Identity (Model, MAC, Serial Number)
  * Device Software Upgrade
  * Multiple SSID Configuration
  * Bandwidth Rate Control per SSID
  * Multi-Radio 2.4/5/6GHz control
  * AP Network Mode Control (Bridge/NAT mode)
  * Security (WPA-Personal/WPA & WPA2/3 Personal Mixed/WPA & WPA2/3 Enterprise Mixed/WPA2/3 Personal/WPA2/3 Enterprise/WEP)
  * VLAN per SSID
  * VxLAN port configuration
  * NTP Enable/Disable
  * RTLS (Location Services) Enable/Disable&#x20;
* **RF Control**
  * IEEE802.11r Fast BSS Transition per Radio Control
  * IEEE802.11k RRM Radio Information per Radio Control
  * IEEE802.11v Network Assisted Roaming per Radio Control
  * RRM Location AP Channel (uChannel) Provisioning
  * RRM Location Client Steering (uSteer) Threshold Provisioning&#x20;
* **Remote Troubleshooting and Service Assurance**
  * Syslog&#x20;
  * Health Check Reports
    * Remote DHCP, RADIUS, UE Network Analysis&#x20;
  * Remote TTY Shell&#x20;
  * Remote Packet Capture Analysis&#x20;

### **How to contribute**

If you or your company are interested in contributing to TIP Open Wi-Fi, please join the Wi-Fi Product Group by visiting [Telecom Infra Project](https://telecominfraproject.com/apply-for-membership/) to become a member.


# Ordering OpenWiFi APs

TIP Wi-Fi Member Access Point Ordering Information

TIP Wi-Fi members may contact the ODM manufacturers in the TIP Wi-Fi eco-system using the information posted within Community Confluence page.

{% embed url="<https://telecominfraproject.atlassian.net/wiki/spaces/WIFI/pages/112689187/AP+Hardware>" %}


# Getting Started

OpenWiFi 2.0

OpenWiFi 2.0 Minimum Viable Product at the end of July, 2021 enables a cloud native and cloud agnostic Software Development Kit (SDK) with management and deployment support for a wide range of Access Point and PoE network switch platforms.

## Initial release 2.0 SDK includes:

* Zero Touch Cloud Discovery
* Firmware Management
* User Interface&#x20;
  * Device List
  * Device Reboot
  * Device LED Blink
  * Device Remote Packet Capture
  * Device Configuration
  * Device Factory Reset
  * Device Remote TTY shell
  * Remote Wi-Fi Scan
  * Associations
    * UE (Wi-Fi Clients)
    * Mesh and WDS Clients
    * MCS, NSS, RSSI, Channel, SSID, Tx/Rx
  * Device Health Check&#x20;
  * Interface Statistics
  * Device Command History

Upcoming sprint for August includes Dynamic Provisioning service support for template based device configuration.

OpenWiFi 2.0 SDK is deployable as both a Docker Compose or a Helm on Kubernetes model. See [Release 2.0 SDK](/openwifi/2.1.0/getting-started/sdk) section for installation instructions.


# Cloud Discovery

OpenWiFi 2.0

All TIP OpenWiFi devices use the same cloud discovery mechanism on initial boot.

OpenWiFi devices ship from factory with a unique device certificate signed by the Telecom Infra Project Certificate Authority.

When a device boots for the first time, or is factory reset, a 'first-boot' process occurs within the device.\
First-boot initiates a connection over HTTPs to the Certificate Authority requesting the unique device record information. All connections to the Certificate Authority occur over mTLS encrypted session.\
Devices use their unique certificate identity to authenticate and retrieve the location of the assigned cloud.

![Device First Boot / Factory Cloud Discovery](/files/-Mf9lMjQQH2R0ePlhqZ8)

Once the cloud location has been learned from first-boot, the device no longer depends on this cloud discovery and will return to the assigned cloud learned from first-boot.

Devices may periodically initiate connection to the Certificate Authority to validate their unique certificate status. This is a normal process involved in mutual TLS security models.

When an operator or end customer seeks to change the cloud associated with their device(s), the value of the cloud stored in the Certificate Authority device record is updated. A factory reset of the device will cause first-boot to re-occur which will then discover the new cloud.

TIP OpenWiFi ODM partners are able to manage device records directly using the Certificate Authority portal. All other users should send an email to <licensekeys@telecominfraproject.com> to request update of cloud discovery.


# Discovery without Cloud

OpenWiFi 2.0

There could be reasons cloud discovery does not complete.\
These include:

* Lack of Internet Connectivity
  * Device may require additional WAN settings
  * Network may not be connected to Internet
* No Configuration of Cloud in Certificate Authority&#x20;
  * Manufacturer may have left this value blank in the device record stored in Certificate Authority

![Manual Cloud Entry](/files/-Mf9oHgHT0ZhFMtLjylq)

When the cloud can not be automatically discovered, OpenWiFi devices will turn on a local admin web UI made available via SSID "Maverick".

The Maverick UI will support configuring WAN interface parameters, including DHCP, Static, PPPoE, and LTE/5G settings. Please see [Local Device Settings](/openwifi/2.1.0/getting-started/access-points/local-device-settings) for details on using Maverick.\
[  <br>](/openwifi/2.1.0/getting-started/access-points/local-device-settings)Additionally the Maverick UI supports direct entry of the cloud for cases when the cloud value has not been supplied during manufacture.

For non-Wi-Fi devices such as PoE access switches, the same cloud location information may be configured using local management interface.

![Admin / User Entered WAN or Cloud](/files/-Mf9pHz_oDyBMfDrgAtF)


# Release 2.0 SDK

TIP OpenWiFi

Release 2.0 SDK offers a number of ways to consume OpenWiFi. Available as a single Docker for just the uCentralGW or as a set of micro services offering increasing value to consume helps multiple eco-system partners use as much or as little as desired to integrate with or build a commercial product on the TIP OpenWiFi SDK.

Features of the 2.0 SDK at July MVP include:

* RBAC based security framework
* OpenAPI compliant Northbound&#x20;
* Kafka Message Bus
* PGSql HA Cluster
* Firmware Manager&#x20;
* Central Logging Dashboard&#x20;
* User Interface&#x20;
* Docker Compose & Helm DevOps Deployment Automation

![OpenWiFi 2.0 SDK](/files/-MfinINjPKmxuNNPOndF)


# Deploy using Docker Compose

OpenWiFi 2.0 SDK

The [wlan-cloud-ucentral-deploy repository](https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy) contains a Compose file and the related files and directories to set up a local uCentral instance with Docker Compose. You'll find all related data under the `docker-compose/` directory.

### Volumes

The deployment creates local volumes to persist mostly application and database data. In addition to that several bind mounts are created:

`docker-compose/certs/` directory used by multiple services

Service specific data directories and configuration files located under `docker-compose/` mounted into the appropriate containers.

{% hint style="info" %}
Be aware that the deployment uses bind mounts on the host to mount certificate and configuration data for the micro services and therefore these files and directories will be owned by the user in the container.\
Since the files are under version control, you may have to change the ownership to your user again before pulling changes.
{% endhint %}

### Configuration

Changing image tags used in the deployments may be performed in `docker-compose/.env`.

By default this file specifies the micro service image tags according to the release branch you have checked out.

Additional configuration changes such as database settings or passwords are found in the various other service specific `.env` files.

The rest of the configuration is done through the config files located in the appropriate subdirectories of the Compose project directory.

### Ports

Exposed port dependencies by application are listed below:

`127.0.0.1:80/tcp` - OpenWiFi-UI\
`127.0.0.1:5912/tcp` - rttys dev\
`127.0.0.1:5913/tcp` - rttys user\
`0.0.0.0:15002/tcp` - OpenWiFi-uCentralGW websocket\
`127.0.0.1:16002/tcp` - OpenWiFi-uCentralGW REST API public\
`0.0.0.0:16003/tcp` - OpenWiFi-uCentralGW fileupload\
`127.0.0.1:16102/tcp` - OpenWiFi-uCentralGW alivecheck\
`127.0.0.1:16001/tcp` - OpenWiFi-uCentralSec REST API public\
`127.0.0.1:16101/tcp` - OpenWiFi-uCentralSec alivecheck

{% hint style="info" %}
By default only the websocket and fileupload component of the OpenWiFi uCentralGW (Gateway) micro service are exposed on all interfaces. All other exposed services listen on localhost. You can change that according to your needs in the `ports` sections of`docker-compose/docker-compose.yml`.
{% endhint %}

### Certificates

The repository includes a TIP Root CA Digicert-signed (for the Gateway websocket to devices) and a self-signed certificate (for the REST API northbound and other components), which you can use to create a local deployment out of the box.

The certificates are valid for the `*.wlan.local` domain.

## How to

1. First you'll have to [install Docker Compose](https://docs.docker.com/compose/install/) according to your platform specific instructions. After that clone the repository with `git clone https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy`. &#x20;
2. The Docker Compose uCentral micro service configs use `ucentral.wlan.local` as a hostname, so make sure you add an entry in your hosts file (or in your local DNS solution) which points to `127.0.0.1` or whatever the IP of the host running the deployment is. &#x20;
3. Switch to the Compose project directory with `cd docker-compose/`. &#x20;
4. Spin up the deployment with `docker-compose up -d`. If your deployment was successfully created, you should see the following output with `docker-compose ps`:

```
              Name                             Command               State                                                             Ports
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ucentral_kafka_1                    /opt/bitnami/scripts/kafka ...   Up      9092/tcp
ucentral_rttys_1                    /rttys/rttys                     Up      127.0.0.1:5912->5912/tcp, 127.0.0.1:5913->5913/tcp
ucentral_ucentralgw-ui_1            /docker-entrypoint.sh ngin ...   Up      127.0.0.1:80->80/tcp
ucentral_ucentralgw.wlan.local_1    /bin/sh -c /ucentral/ucent ...   Up      0.0.0.0:15002->15002/tcp, 127.0.0.1:16002->16002/tcp, 0.0.0.0:16003->16003/tcp, 127.0.0.1:16102->16102/tcp, 17002/tcp
ucentral_ucentralsec.wlan.local_1   /bin/sh -c /ucentral/ucent ...   Up      127.0.0.1:16001->16001/tcp, 127.0.0.1:16101->16101/tcp, 17001/tcp
ucentral_zookeeper_1                /docker-entrypoint.sh zkSe ...   Up      2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp
```

1. Since the certificate for the REST API and other components is self-signed, you have to add it to the system trust store of the containers communicating together internally via TLS. The `add-ca-cert.sh` script located in the Compose project directory does the work for you. &#x20;

   You also have to trust the self-signed REST API certificate on your local machine. To achieve that you either have to add `certs/restapi-ca.pem` to your trusted browser certificates or add certificate exceptions in your browser by visiting `https://ucentral.wlan.local:16001` and `https://ucentral.wlan.local:16002` and accepting the self-signed SSL certificate warnings (make sure to visit both and add the exceptions). &#x20;
2. Connect to your AP via SSH and add a static hosts entry in `/etc/hosts` for `ucentral.wlan.local` which points to the address of the host the Compose deployment runs on. &#x20;
3. While staying in the SSH session, copy the content of `certs/restapi-ca.pem` on your local machine to your clipboard and append it to the file `/etc/ssl/cert.pem` on the AP. This way your AP will also trust the self-signed certificate. &#x20;
4. Go to `http://ucentral.wlan.local` to visit the UI and login with username `tip@ucentral.com` and password `openwifi` if you didn't change the default credentials in the uCentralSec configuration. &#x20;
5. To use the curl test scripts which are included in the  micro service repositories make sure to set the following environment variables before issuing a request:

```
export UCENTRALSEC="ucentral.wlan.local:16001"
export FLAGS="-s --cacert <your-wlan-cloud-ucentral-deploy-location>/docker-compose/certs/restapi-ca.pem"
```

### Upgrading Compose Deployments

Stop the running containers with `docker-compose down`

Check out the new branch by repeating *Step 1* from *How to*  above for the given release and `docker-compose up -d`. \
\
Don’t forget to re-add the self-signed certificates to the containers with the provided script. \
Also be aware that you may have to change back some file permissions. To obtain the most recent changes as the files are under version control, you may have to change the ownership to your user again before pulling changes.


# Deploy using Helm

OpenWiFi 2.0 SDK

OpenWi-Fi 2.0 SDK can be deployed to Kubernetes using a Helm package. The Helm package code is located at <https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/> repository.

Each micro service in the OpenWiFi SDK system has its own Helm chart that is managed in the micro service’s own repository. The assembly chart collects all the relevant micro service charts and other external dependencies like kafka, rtty, etc. and deploys them together as one cohesive release.

You can review the full list of all the assembled micro services and related dependencies here: <https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/blob/main/chart/Chart.yaml#L6>

## Installation

There are multiple ways you can install OpenWiFi SDK with assembly charts:

1. One way is by installing directly from the assembly chart’s repository. For that, you’ll need to install and extra Helm plugin that is used to pull the latest charts code from all the referenced micro services: <https://github.com/aslafy-z/helm-git>.
2. Another way, which is considered more stable, is by installing from a prepackaged bundle that is published to <https://tip.jfrog.io/ui/native/tip-wlan-cloud-ucentral-helm/> on every official uCentral release. For this approach to work, you don’t need to install any additional plugins or dependencies, just to make sure you’ve got Helm installed on your local system.

### Directly from the Assembly repository

1. Install the helm-git pluging according to the official documentation
2. Run helm upgrade --install tip-ucentral git+<https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/@chart?ref=main>
3. You can also reference any other open branch from the deployment repository. For example, if you want to deploy using the assembly code from the v2.0.0-rc1 branch, you can just run helm upgrade --install tip-ucentral git+<https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/@chart?ref=v2.0.0-rc1>

### Using the pre-built Helm package

1. This method doesn’t require to install anything locally other than Helm
2. Start by adding the wlan-cloud-ucentral Helm repository to your local list of repositories by running helm repo add tip-ucentral <https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/>
3. helm upgrade --install tip-ucentral wlan-cloud-ucentral to install the latest version, or specify the release you want to install by adding the --version x.y.z flag.

## Chart configuration using the Values file

The configuration of OpenWiFi SDK using Helm chart may be separated into layers:

1. Micro services default values - values files that are stored in micro service helm charts (i.e. <https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/helm/values.yaml> ). These values are used by default if no other parameters are supplied, so in case you have any microservice-related variables that need to be added in default installation (for example new application configuration properties), add them in the related helm chart values as they will be applied in next release update.
2. Assembly chart values - values that are stored in the assembly repository (<https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/blob/main/chart/values.yaml> ) – these are values that override default micro services values so that all uCentral components could connect to each other correctly, and the whole system can be installed as one bundle. These parameters are environment specific, and can differ between and installation of the bundle on an EKS cluster or a MicroK8s local setup.
3. Helm upgrade/install flag overwrites - these values cam be specific for each specific helm install command during execution and usually contain installation-specific values like TLS certificates, security credentials, loadbalancer configuration parameters and so on. These may be passed using --set flag or --values flag (details may be found in <https://helm.sh/docs/chart_best_practices/values/> and in micro services helm charts), or you can also save them into one file and reference this file during the helm upgrade command using the --values flag.

During deployment all values are merged as maps with priority to the level of deployment (so Environment-specific values will override any overrides from Assembly chart values and so on).

**Example**: Let’s pass environment-specific ucentralgw\.properties configuration parameter (which is probably quite common thing to test). For example, we have an environment that requires to set parameter ucentral.websocket.host.0.backlog to 1000. For that we would need to run following command, extending our base command:

```
helm upgrade --install tip-ucentral git+https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/@chart?ref=main --set ucentralgw.configProperties."ucentral\.websocket\.host\.0\.backlog"=1000
```

## Automated community deployment

OpenWiFi SDK can also be deployed to an AWS labs environment using a Github actions workflow: <https://github.com/Telecominfraproject/wlan-testing/actions/workflows/ucentralgw-deployment.yaml>.

The configuration is dynamic, and new namespaces (a.k.a environments) may be created by adjusting the json configuration in the workflow.

The json format allows to deploy or upgrade and existing environment using the latest Docker images or to specify a specific version of each micro service.

To deploy specific version to the specific environment a list of things must be done:

1. First, you need to make sure that the Docker image with the correct version exists in Artifactory, otherwise, the Helm upgrade will fail.
2. Update the json configuration in the workflow to reference the require version for the require micro service (examples are attached in the json file itself)
3. Re-run the deployment in Github actions. You can also make all the above changes in a separate branch, and re-run the workflow from that branch (using a drop-down in the top left corner in Github’s UI).


# Access Points

OpenWiFi 2.0

Initial Minimum Viable Product Release 2.0 does not include template driven device provisioning, this will be available in the next sprint.

Given many cloud and ODM partners wish to consume the 2.0 reference stack early, some with their own device provisioning logic as part of commercial cloud controllers, the following describes uCentral based management and telemetry, interactions with the OpenWiFi SDK processing provisioning and telemetry data.

## Device Interactions with SDK

![OpenWiFi with uCentral Management](/files/-MfiT6HEn3ZnoD3MHqzh)

OpenWiFi 2.0 follows the uCentral system. Complete data model is available [here](http://ucentral.io/docs/ucentral-schema.html). Upon discovery of the cloud, a device default or specific configuration is transferred.

All devices are known to the cloud by their unique id and provisioned based on advertised capabilities. Each configuration generates a new unique hash value to ensure as devices report back to the cloud, their configuration state is guaranteed.

If the cloud sends invalid configuration data or the device has insufficient ability to complete the provisioning commands, the error handling process will send this response back to the cloud.

For example results returned to SDK from a device configuration error:

```
"results": { 
  "serial": "aabbcc00120a",  
       "status": {    
          "error": 0,  
                "rejected": [   
                             "[W] ("A Reason will be given"
                             ],
```


# Local Device Settings

OpenWiFi 2.0 Devices

When OpenWiFi devices are unable to connect to the cloud during their initial power on from factory, this may be a result of Internet connectivity issues.

Certain WAN connections may require credentials such as a username and password or a mobile configuration or simply static address assignment instead of dynamic.

OpenWiFi 2.0 supports these scenarios. When a device does not have an existing configuration and is unable to contact the cloud for provisioning it enters "Maverick" mode.

For all Wi-Fi devices this means a Wi-Fi network with the SSID 'Maverick' will become available.\
Association with and logging in to the device will permit initial WAN connectivity to be entered.

## Using Maverick

![Maverick Login Page](/files/-Mfo4Hdy0KWC955sI9mE)

After association to the Maverick SSID, open a web browser to `http://192.168.1.1`\
Log into the OpenWiFi device with username: **`root`** and password: **`openwifi`**

![Logged into Maverick](/files/-Mfo4n2AeRqZvC2jTm4p)

When the page above is displayed, begin to configure Uplink based on the WAN requirements of the deployment.

![Uplink Configuration in Maverick](/files/-Mfo54KMmzF-30DXDPe0)

If connection uses Point to Point over Ethernet (PPPoE) username and password credentials, enter those values and save.

![PPPoE Uplink](/files/-Mfo5OrXic1S7f7gJ9UJ)

If the OpenWiFi device has a Cellular connection which is possible on device models with 4G and 5G radios, the network Access Point Name (APN) and PIN will be required. These values are supplied by your mobile network provider.

![Cellular Uplink](/files/-Mfo5oyi9ziq5nf_GNUv)

When dynamic address allocation is not available, static IP address assignment may be required. IPv4 and IPv6 are supported, enter these values with DNS address and save.

![Uplink Static IP](/files/-Mfo6B1i5KnHaFW7azc-)

Otherwise leave the Uplink configuration to DHCP or cloud defaults.

![Uplink DHCP](/files/-Mfo6PvQxFGsh8O4JAUQ)

## Manual Redirector and Certificate Upload

If under rare circumstances it is not possible to discover the OpenWiFi cloud associated with the device or there is a need to replace device certificates, this may be configured in Settings.

![Local Redirector Setting](/files/-Mfo6xCucizc5mlBjv35)

## System

It is possible to reset the device to defaults, or locally update firmware using the commands available from System.

![System Commands](/files/-Mfo7DbyKNOHl5S8PLF-)

\*\*\*\*


# Provisioning

uCentral Data Model Introduction

OpenWiFi 2.0 makes it possible for integrators of the SDK to implement commercial products leveraging OpenWiFi Gateway service with vendor supplied provisioning above OpenWiFi SDK.\
As a minimum, the OpenWiFi 2.0 SDK framework offers a Security service which handles all OpenAPI authentication northbound, and the Gateway service which provides all uCentral websocket interface functionality southbound.

![Minimum 2.0 SDK - Assumes DB is either SQLite or PGSql](/files/-Mfi-DnmLcM5HhlLhvYS)

OpenWiFi also provides options to receive telemetry and events over both OpenAPI interface as well as Kafka message bus. When using Kafka, OpenWiFi Gateway directly publishes telemetry and event topics to the bus.

In future sprints of OpenWiFi dynamic device provisioning will be available as an added micro service.

## Gateway

OpenWiFi 2.0 Gateway implements the uCentral device management interface. uCentral specifies the data model and interface for management and telemetry of OpenWrt based devices.\
Gateway uCentral interface is a websocket JSON-RPC based design between OpenWiFi Gateway and the device running uCentral agent.

![Southbound Interface to Devices](/files/-Mfi1TiqR1fPS_3rzEqf)

All communications from Gateway to Device are secured using mutual Transport Layer Security (mTLS). In mTLS systems each endpoint is a unique device sharing the same signed root or intermediate trust. In OpenWiFi each device has a signed certificate, key and device identifier. These are validated by the uCentral-Gateway to establish mTLS session.

Upon successful connection the device exchanges its capabilities with the OpenWiFi SDK. OpenWIFi SDK, via the Gateway micro service will send the entire device provisioning data as a JSON payload.\
Within OpenWiFi devices, the uCentral agent has a reader and renderer process providing serialization and validation of data sent from cloud.\
If any data presented can not be processed by the local agent, this is returned within an ERROR message using the same websocket connection.

![High Level SDK Gateway to uCentral Agent](/files/-MgkJ7h26ALprrbWT0YA)

If the device agrees with provisioning information presented, the render process builds calls into the operating system configuration sub-system known as UCI. The Unified Configuration Interface ensures OpenWrt compliant syntax is persisted within the device.

Configuration source of truth is the OpenWiFi SDK. Consistency of device configuration is handled with an applied hash compared by the Gateway for each device. If the value differs on device from that of the stored information in cloud, the device will be immediately resent its configuration from the OpenWiFi SDK Gateway service.

Once present, all configuration data is preserved on device restart.

It is possible to generate device configurations outside of the OpenWiFi 2.0 SDK as shown in the minimum SDK image at the start of this page. This may occur for some integrations or may occur when the OpenWiFi Provisioning micro service is not present. In this way, integrators of commercial products are welcome to build device provisioning outside of OpenWiFi and use the OpenWiFi cloud to manage the scale, state, security and validation of device websocket communications.


# Data Model Introduction

OpenWiFi 2.0

OpenWiFi 2.0 data model for device management is based on uCentral.

uCentral is set to become a leading component of OpenWrt, as such will have a diverse, and worldwide developer and support base in open source.

Within the model it is possible to provision or return state for all aspects of an OpenWiFi based device easily structured as a JSON payload.

The complete data model may be found here : <https://ucentral.io/docs/ucentral-schema.html>

## Organization

Each device has a Universally Unique Identifier (UUID). For each device, the configuration presented either manually, via the future Provisioning service from OpenWifi or via a commercial controller generation of provisioning data, the high level relationships of the schema may be understood as follows.

![uCentral Agent Schema Processing](/files/-MfmX_2eoyRZeRL_by9U)

The unique device record has a set of top level configurations. A device is referred to as a 'unit' that may have a Description, Location, TimeZone as example. Each unit may have globals for IPv4 and IPv6 networks that are derived to lower lever interfaces in later generation.

Services and Metrics are associated with logical and physical interfaces. Services enable configuration of features such as LLDP or SSH, rTTY, IGMP, 802.1x, RADIUS Proxy, WiFi-Steering, or NTP and are then associated with Interfaces as desired.

Interfaces define upstream and downstream configuration over both Wi-Fi logical (SSID) and wired physical ports.

Metrics enable visibility to the cloud for numerous states of the device. These are associated per interface and may be sent in 60 second or greater intervals and include Statistics of SSID, LLDP, Clients. Also include Health check reports of device load, network reachability, temperature.\
To assist with fingerprinting DHCP-Snooping exposes numerous interactions of IP binding to clients. Additionally wifi-frames expose all 802.11 management frames to the SDK Gateway.

It is also possible to configure config-raw elements that will parse direct UCI commands once the device provisioning has been completed by the uCentral agent.


# Creating a Configuration

OpenWiFi 2.0 Device Configuration

To introduce the Community to the uCentral data model structure, the below illustrates a basic Access Point configuration that assumes a typical enterprise Wi-Fi scenario of a ceiling mount or wall mount device presenting a single WAN interface with a private management network and separate Wi-Fi network on a virtual local area network.

## Start with Location and Radios

We will set the unit location and timezone, then proceed to configure radios.

```
{
    "uuid": 2,
    "unit": {
        "location": "TIP Lab Network",
        "timezone": "EST+5EDT,M3.2.0/2,M11.1.0/2"
    },
    "radios": [
        {
            "band": "5G",
            "country": "CA",
            "channel": "auto",
            "channel-mode": "HE",
            "channel-width": 80,
            "require-mode": "HT",
            "rates": {
                "beacon": 6000,
                "multicast": 24000
            }
        },
        {
            "band": "2G",
            "country": "CA",
            "channel": 11,
            "channel-mode": "HE",
            "channel-width": 80,
            "require-mode": "HT",
            "rates": {
                "beacon": 6000,
                "multicast": 24000
            }
        }
    ],
```

In this example, a two radio device that indicates it is Wi-Fi 6 as the channel-mode values for both radios is "HE" which defines 802.11ax operation. Valid values are "HT" -High Throughput 802.11n mode, "VHT" - Very High Throughput 802.11ac mode, "HE" - High Efficiency 802.11ax mode.

Channel defines the specific channel number the radio shall operate on as an integer from 1 - 171 and may also be set to a string for "auto" mode. Channel width permits configuring the amount of RF channel the radio will operator over from 20-40-80-160 including 8080 mode (also known as 80+80) .

OpenWiFi radios may be set to require UE clients to associate to a minimum standard such as excluding any 802.11b associations depicted above with "require-mode" set to "HT" meaning 802.11n or higher clients may associate.

Control of beacon interval and multicast rates is possible per radio as shown in the "rates" section.

## Interfaces

OpenWiFi 2.0 offers a highly flexible model for arranging network interfaces. Multi-port devices may be easily provisioned for numerous types of network segmentation and logical network configuration. We will start with a simple WAN that has a management IP and also a VLAN sub-interface for a logical SSID in a subsequent step.

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp", "dhcp-snooping" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
```

In the above configuration block we have a WAN interface, its role is "upstream" meaning it faces the upstream in terms of service it provides (WAN). This has a direct alignment to how the device interprets a physical or logical port participates in bridge forwarding domains.

Note we want this port to have an IP address for its management, therefore the "ipv4" configuration is associated as a child of any Ethernet WAN ports and set to DHCP.

### Common Config - VLAN on WAN for SSID

Imagine the OpenWiFi device is an enterprise Access Point mounted on a ceiling. These devices do not always have a LAN port. Also in an enterprise, it is likely the Wi-Fi services are in their own network segments and not subject to Network Address Translation (NAT). Since the enterprise would also not want Wi-Fi on the same network as Management, an 802.1Q Virtual LAN is used.

```
           {
                "name": "WAN100",
                "role": "upstream",
                      "services": [ "lldp", "dhcp-snooping" ],                
                "vlan": {
                    "id": 100
                },
                "ethernet": [
                    {
                        "select-ports": [
                            "WAN*"
                        ]
                    }
                ],
```

In this next section of configuration, an additional logical interface associated to the WAN ports for the VLAN id of "100" is shown. Note there is no IP address associated to this interface, it is a layer 2 interface that will emit on any and all WAN ports with VLAN id 100.

To associate the Wi-Fi with the VLAN interface define, we continue within the WAN100 interface adding SSID services.

```
            "ssids": [
                {
                    "name": "TIP OpenWiFi",
                    "wifi-bands": [
                        "5G", "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWiFi",
                        "ieee80211w": "optional"
                    }
                },
                "services": [ "wifi-frames"]
```

Within the "ssids" configuration block we can process an array of SSIDs. Often there may be separate "2G" and "5G" configurations. We have grouped them in this introductory example for simplicity however "2G", "5G", "5G-lower", "5G-upper", "6G" are all valid options.

The "name" value is the advertised SSID clients will discover for this access point. Hidden is supported by setting the "hidden-ssid" to true.\
Which operating mode is determined by "bss-mode". The "bss-mode" is a highly flexible operating parameter to determine "ap", "sta", mesh", "wds-ap", "wds-sta", "wds-repeater" radio modes of operation.

Security of the SSID is determined using the "encryption" section. Many options are possible, in this initial example, a WPA-PSK2 shared key encryption is shown.\
Lastly, for devices that support, 802.11w protected management frames are defined as optional for this SSID. This may also be disabled or required.

Metrics for wifi-frames will be described next.

### Sending Data

Add metrics to our configuration that will help expose state of the Wi-Fi network and its services to the cloud.

```
    "metrics": {
        "statistics": {
            "interval": 120,
            "types": [ "ssids", "lldp", "clients" ]
        },
        "health": {
            "interval": 120
        },
        "wifi-frames": {
            "filters": [ "probe",
                "auth",
                "assoc",
                "disassoc",
                "deauth",
                "local-deauth",
                "inactive-deauth",
                "key-mismatch",
                "beacon-report",
                "radar-detected"]
        },
        "dhcp-snooping": {
            "filters": [ "ack", 
                                    "discover", 
                                    "offer", 
                                    "request", 
                                    "solicit", 
                                    "reply", 
                                    "renew" ]
        }        
    },
```

Within metrics it is possible to define the interval for sending information to the cloud. Additionally the type of information sent is defined here. In this example configuration there are associated services to interfaces along the way. This included LLDP and dhcp-snooping and wifi-frames.

Within each uCentral device, the agent has a global health check feature that includes memory, cpu, temperature operating states in addition to performing various network and service health tests. The interval at which these reports are sent to the cloud is configured within health.

For all SSIDs that have wifi-frames associated as a service, the listed management frame types will be gathered and sent to the cloud, on each interval.

To assist with fingerprinting and client troubleshooting, dhcp-snooping sends the cloud all current client DHCP and DHCPv6 state.

### Global Services

The final section of the simple configuration example turns on LLDP and SSH where those services were associated to interfaces listed above.

```
    "services": {     
        "lldp": {
            "describe": "TIP OpenWiFi",
            "location": "LivingLab"
        },
        "ssh": {
            "port": 22
        }
    }
}
```

The complete simple configuration file as described in this page may be downloaded here:

{% file src="/files/-MfiSNxzRQo2eOj5EOZ6" %}
SimpleConfig\_Wi-Fi\_VLAN
{% endfile %}


# User Interface

OpenWiFi 2.0

Release 2.0 uses a Single-Page Application (SPA) as an example user interface built using React to demonstrate several interactions using the northbound OpenAPI.

## Login to OpenWiFi SDK

![Login Page](/files/-MfiqBJf7DppBlPsXsmG)

Default username is: **`tip@ucentral.com`** and password is: **`openwifi`**

## **Base Navigation**

A left side navigation menu provides direction to major feature or service settings.

![Left Navigation](/files/-MfnhlbZrvc4g_F9d4IK)

## Internationalization

OpenWiFi 2.0 SDK supports multiple languages. Simply select the desired language from the right drop down for pages to re-populate accordingly.

![](/files/-MfniuBz0cWAR4EFUMSM)

## Devices

Upon login the first page presented is a Devices table. This table reflects all discovered and managed devices known by the OpenWiFi SDK.

![Devices Table](/files/-Mg1SJLAc8ILfBbuHBCP)

Devices table indicates device Connected or Disconnected state in the first column with green and red respectively.

Certificate column indicates invalid, valid with mismatch serial, or valid device certificate identity state as red crossed seal, yellow seal and green seal respectively.

Serial Number column links to the device record.

Compatible model, Tx, Rx, and connected IP Address present basic information of the device type and its connection.

Three final columns provide Details (also obtained by selecting the serial number), Wi-Fi Analysis presenting current Wi-Fi associations and their performance and Refresh commands.

## Displaying Associations

From the Devices table, second from right column icon the WiFi Analysis may be accessed. This may also be accessed within the Device View page of a single record along the top right of Statistics section.

![Wi-Fi Analysis](/files/-Mg1SSN4qN3C1tQdrvjj)

Within the WiFi Analysis page, all active associations are displayed with the ability to view approximately the last 30 minutes of data reported from the Access Point.

For each association the device MAC address, mode of connection and SSID are displayed. This will include end devices as well as Wi-Fi infrastructure such as WDS and Mesh associations.

![](/files/-MfitUj_K7xXs8QnFH_B)

Associations have RSSI, Rx Rate & Bytes, Tx Rate & Bytes, MCS negotiated, Number Spatial Streams and IP Address information.

## Dashboard View

OpenWiFi SDK provides visual indications on the overall health of the deployed Wi-Fi network. this includes Device Status for connected and non-connected devices. Device health indicating percentage of devices failing a health check. Distribution of devices by vendor in the network and by model.

![Dashboard View](/files/-Mg1SowZVnkVGXZQfR6x)

Additionally, verified certificates or serial mismatch certificates, number of Command actions from all Gateways to devices and devices with greater than 75% memory utilization, greater than 50% less than 75% memory and less than 50% utilization are displayed.

![](/files/-Mfpa_NXLgWxAPBFnXuL)


# Devices

OpenWiFi 2.0 SDK

Each device presents Metrics and Health check data to the Gateway. Devices view displays this information in the following organization:

* Status&#x20;
* Configuration
* Logs
* Health
* Commands
* Statistics
* Command History

![Initial Device View](/files/-Mfiy8HpuYvhnSe6d2_V)

## Status

Connection status reflects the Gateway to Device current communications status.\
Uptime and Last Contact reflect communication state.\
Load indicates processing load on the device.\
Memory Used indicates free memory on the device.

![Device Status](/files/-MfiyoIZ6_oFRQv1dvvs)

## Configuration

Device UUID, Serial Number, MAC Address and Device Type are displayed.\
Last configuration update date and timestamp reflects the last time a "configure" action completed on the device.\
Password may be set and device notes may be added.

![Device view Configuration Panel](/files/-MfizXN0_OSzSFxAQICt)

## Logs

Log history of the device is presented within Logs. Expand the tile selecting the down arrow.

![](/files/-Mfj-XDn-v5XOz2PuH2n)

## Health

Health score is an active tile reflecting the device health out of a score reported by the device to Gateway. Health metrics are configured on the device based on chosen data model options. When the device falls out of 100%, this tile changes to red. Expanding the tile will present all health reports. Those with less than 100% score will contain reasons for the result from this interface.

![](/files/-Mfj-BQkE8-QtL6A2IFN)

## Commands

Commands tile provides a number of administrative actions for the user:

| Command          | Action                                                  |
| ---------------- | ------------------------------------------------------- |
| Reboot           | Warm Restart remote device                              |
| Firmware Upgrade | Initiate firmware upgrade process                       |
| WiFi Scan        | Initiate remote scan of surrounding Wi-Fi               |
| Connect          | Initiate an rTTY Remote Shell session                   |
| Blink            | Set LEDs to On, Off or Blinking state                   |
| Trace            | Initiate a remote Packet Capture                        |
| Factory Reset    | Hard Reset remote device - destroys device local config |
| Configure        | Upload Device Configuration                             |

![Commands Tile](/files/-Mfj-bLadptNj91kIjik)


# Commands

OpenWiFi 2.0 SDK

Within the devices view, the Commands tile offers a number of features and administrative actions.\
Each of these represent API calls exposed on the OpenAPI northbound interface from the SDK.

## Reboot

Selecting the Reboot action will prompt the below dialog. Options presented permit an immediate reboot or a scheduled reboot based on date and time.

![](/files/-MfnVogWkTF5DIZ6UhZ-)

## Firmware Upgrade

Multiple methods exist to execute a remote Firmware Upgrade of a device. When selecting Firmware Upgrade via the Commands tile, a simple dialog to upgrade immediately or at a scheduled time is presented. Alternatively using the Firmware Management Service provides a complete solution including managed access to all TIP firmware images.

![](/files/-MfnWeoZYndnSE8GO__h)

## Wi-Fi Scan

OpenWiFi devices may perform channel scanning and return this neighbor and RF data to the SDK in an on demand or ongoing manner.

![](/files/-MfnXBaEzH8mZigXZ4wi)

### Wi-Fi Scan Results

Scan operations function over all channels. If 5GHz channels do not display in the returned results ( either via the UI or over API ) this indicates the device is configured in a DFS channel for which it may not return survey scans at this time.

![](/files/-MfnXrGZfS6-4JXZY6iA)

## Connect

OpenWiFi enables remote connection to any managed device using rTTY encrypted shell session. Selecting Connect will cause a browser tab to open with the login session to current device.

![](/files/-MfnYHNWMTaYydU_PfpH)

## Blink

To assist with remote identification of devices in the network, it is possible to turn the LED lights On, Off, of continuous blinking. This may be run on-demand or scheduled.

![](/files/-MfnYf0L9TLrBQPe23Zq)

## Trace

Trace feature enables a remote packet capture to occur on the managed device, over a specified period of time or amount of traffic, returning the "pcap" packet capture file locally to the OpenWiFi admin user.

![](/files/-MfnZ5y2hrNMBo4TBKCT)

Once complete the user is asked to open or save the packet capture file locally.

![](/files/-MfnZtLBpyzy4KL9wsNu)

## Factory Reset

It is possible to revert a device to initial out of box state from the OpenWiFi SDK. Sending a Factory Reset will remove all configuration on the device and optionally reset the discovered cloud stored as the 'Redirector' in the device configuration.

![](/files/-Mfn_ijg3QBitKnjaOyk)

{% hint style="info" %}
Note: When Redirector is not kept, devices will re-contact the Certificate Authority to re-discover their OpenWiFi cloud address
{% endhint %}

## Configure

Prior to the introduction of OpenWiFi 2.0 Provisioning Service, device configuration is done through creation of the JSON provisioning file and either loading that file or applying its contents using the dialog presented via Configure. The same options exist when using the API directly.

![](/files/-MfnaBPQw-UFBnGw5NO7)


# Statistics

OpenWiFi 2.0 SDK

Each device page presents statistics in traffic terms per interface as a line graph of bandwidth over time.

![](/files/-Mfnb1J51NAzZFFd-NUN)

The generated image may be downloaded for offline use.

![](/files/-MfnbGm-BNQxFXkX_nUL)

Accessing Wi-Fi Analysis and Last Statistics may be found at the top right of Statistics tile.

![](/files/-MfneGO_oKIdvBr7GMCv)

## Wi-Fi Analysis

Operating channels, channel width, noise floor and transmit power are the first values reported in Radios table.

Viewing associations, from the Associations table, and their use is important in terms of bandwidth and connection quality. Wi-Fi Analysis helps visualize each client association, this could be an end user device or a WDS or Mesh association.

Each association is known by their MAC address or BSSID value. The mode of connection will indicate if an end user client device entering the "ap" or if a client is associated as "wds" or "mesh.

![](/files/-MfncG3QjBSTnC3vaa9u)

The access point view of RSSI, Rx and Tx Rate, Modulation Coding Scheme and Number of Spatial Streams are exposed for each association.

Using the slider along the top, the last 15 to 30 minutes of performances data may be viewed.

## Latest Statistics

The option to view Latest Statistics is at time of the MVP release, intended to help the Community see on a per device basis how much, or how little depending on device configuration, is being sent to the OpenWiFi Gateway in terms of telemetry.

![](/files/-MfndtZ8tdDUqSIVx9W4)


# Command History

OpenWiFi SDK 2.0

Multiple events are recorded in the Command History tile. Each line item will have a Result, Details, and Delete action.

![Command History Tile](/files/-MfnfB_7pvCJNwn5siHL)

When an rTTY session is executed, this is a displayed command history. Selecting the Result icons will display the Success or Fail of the command.

![rTTY Command History](/files/-MfnfZvy0vQE13Jr9twU)

Each provisioning event is reflected as a configure command history. To see the entire JSON payload and the result, including success or error with message, simply select Details to expand the dialog below with this data. A date and time in the third column indicates when the configure command was executed successfully.

![Configure Command History](/files/-MfnffooIj_jYQYZhhOX)

If a provisioning event has failed to complete, its command history for configure will show as pending.

![configure Pending Command History](/files/-MfngzWs0V4w0D8uYU0r)

Remote packet capture is shown as the trace command history. When packet captures are persisted in the OpenWiFi SDK, they may be downloaded again through the cloud download icon.

![trace Command History](/files/-MfngfjE6ntlHxIZN-Hb)


# Firmware

OpenWiFi 2.0 SDK

Firmware management service integrates across all OpenWiFi Gateways deployed in a cluster enabling updates to running firmware either from the latest published version, or any other released version.

## Dashboard

Firmware dashboard provides a single view for overall health of deployed device firmware. Latest firmware charts, device firmware version distribution, distribution of device by type and current connected devices.

![Firmware Dashboard](/files/-Mg1T5aTc-bXSK3ErbNo)

## Device Table

From the Devices table, any device with a newer firmware published by TIP OpenWiFi is indicated with a yellow icon. Selecting this icon presents the option to upgrade to latest or specify which firmware to use.

![Firmware Control in Device Table](/files/-Mg1TOwYWUzWW3tIPAO6)

When the upgrade has been sent successfully, a green Success dialog will display in the upper right on the screen. Devices with latest firmware version will show a green firmware icon in the Devices row.

## Firmware Management Service

Viewing the contents of Firmware Management Service is available from the left navigation, select Firmware.

Once in Firmware, it is possible to search by device model for all known firmware revisions.

![Firmware Management Service](/files/-Mfo-bX168AhikVGgWna)

If in the Device Table reference above, instead of selecting Upgrade to Latest, the specific URI location of any available firmware is found using the Firmware table.

Selecting Details will present information for any firmware row, including the URI which may be copied into the Choose Custom Firmware dialog prompt accordingly.

![Firmware Entry Details](/files/-Mfo04pCa2k-sPYkkOl4)


# API

OpenWiFi 2.0 SDK

OpenWiFi services follow the OpenAPI 3.0 definition.\
The complete API is described here: [OpenWiFi SDK OpenAPI](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/openapi/ucentral/owgw.yaml)

## Devices

OpenWiFi devices are Access Points or Switches (and other forms in the future), that support the uCentral configuration schema. Devices contact a controller using the uCentral protocol.

## Communication

The communication between the controller and the devices use the uCentral protocol. This protocol is defined in this [document](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/main/PROTOCOL.md).

## Device Configuration

A device is configured by ingesting a uCentral configuration. That configuration will be provided by the SDK Gateway as a result of a command through the API. Command processing occurs when the device's configuration is older than what is known in the SDK Gateway. The uCentral schema is a JSON document containing parameters to set on a particular device.

## SDK Gateway Communication

In order to speak to the Gateway, you must implement a client that uses the OpenAPI definition for the gateway. You can find its [definition here](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/main/openapi/ucentral/ucentral.yaml). You cannot talk to a device directly.

## API Basics

### Device `serialNumber`

Throughout the API, the `serialNumber` of the device is used as the key. The `serialNumber` is actual the MAC address of the device, without its `:`. The `serialNumber` is guaranteed to be unique worldwide. The device uses its serial number to identify itself to the controller.

### Device Configuration

The configuration can be supplied when the device is created. After the device is created, the only way to modify the configuration is by using the `/device/{serialNumber}/configure` endpoint. The Gateway maintains the versioning of the configuration through the use of a `uuid`. The Gateway maintains that number and will ignore anything your supply. The controller also does minimum validation on the configuration: it must be a valid JSON document and must have a `uuid` field which will be ignored.

### Device Capabilities

Device capabilities are uploaded to the Gateway when the device performs its initial connection. Capabilities tell the Gateway what the device is able to support. The Gateway uses this information to provide a configuration matched to the device type.

### Command Queue

The Gateway will send commands to the devices. These commands are kept in a table and are sent at the appropriate time or immediately when the device connects.\
For example, you could ask a device to change its configuration, however it might be unreachable. Upon next device connection, this configure command will be sent. The list of commands is retrieved using the `/commands` endpoint.

### Commands

Several commands maybe sent to a device: reboot, configure, factory reset, firmware upgrade, LEDs, trace, message request, etc. The API endpoint `/device/{serialNumber}/{command}` details all the available commands.

### Device Specific Collections

For each device, a number of collections are collected and kept in the database. Here's a brief list:

* `logs`: device specific logs are kept. A device amy also send something it wants added into its own logs. `crashlogs` are a special type of logs created after a device has had a hard crash.
* `statistics`: statistics about the device. This is current la JSON document and will be documented at a later date.
* `healthchecks`: periodically, a device will run a self-test and report its results. These includes anything that maybe going wrong with the current device configuration. A `sanity` level is associated to the degree of health of the device. 100 meaning a properly operating device.
* `status`: tells you where the device is and how much data is used for protocol communication.

## The API is for an operator

This API is meant for an operator who would have to help a subscriber in configuring devices, reboot, manage firmware, etc.


# OpenAPI Definitions

OpenWiFi 2.0 SDK

## Where is the OpenAPI?

This uses OpenAPI definition 3.0 and can be found [here.](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/openapi/ucentral/owgw.yaml) All endpoints begin with `/api/v1`.

## API Flow

API endpoints are secured with bearer-token authentication using end-point `/oauth2`.\
Once you obtain `access-token`, you will need to pass it in the headers under `Authorization: Bearer <place your token here>`.

## Basic Entities

The API revolves around `devices`, `commands`, and `default_configurations`.\
To retrieve a list of `devices` to know what is available and then use the endpoint `device` to access all device specific information.\
To retrieve `commands` and `default_configurations` follow those endpoints.\
Most operations rely on the `serialNumber` of a device. That `serialNumber` is unique and generated on the device. Serial Number matches the device's MAC address.

* `devices`: The list of all devices in the system. This maybe very large, pagination is recommended.
* `commands`: The list of commands issued by the system. This list could also be large.
* `default_configurations`: A list of default configurations used to supply existing devices.

## Relationships

A device is a physical (or potentially logical) entity using the ucentral protocol.\
Currently, APs and Switches are the only devices used. A device has several attributes.\
Additionally, other collections are supported for each device:

* `logs`: Specific for a device. Logs originate from the device or associated with the device by some mechanism.
* `healthchecks`: Reports from the device coming periodically after device self tests.
* `statistics`: Periodically produced by the devices and document actual state data from each device.
* `capabilities`: This details the actual data model supported by the device.

The `device` entry point is also used to query about the `status` of the device and used to inject certain commands for a specific device.\
Commands supported for each device:

* `reboot`: This will force the device to reboot.
* `configure`: Configure sends a new configuration to a device.
* `factory`: Forces the device to perform a factory-reset.
* `upgrade`: Forces the device to do a firmware upgrade.
* `leds`: Ask the device to flash its LEDs or turn them on or off.
* `trace`: Performs a remove LAN trace. Once the trace is completed, the produced file may be removed using the `file` endpoint.
* `command`: Performs a proprietary command. The meaning depends on the device.
* `request`: Request an immediate message of type `state` or `healthcheck`.

The `file` end point is used to retrieve and remove files produced by the Gateway. Currently this is limited to the results of a `trace` command. The file name will always match the `uuid` of the command that produced it. If several files are needed, the files will be named `uuid`, `uuid.1`, `uuid.2`, etc.

## Dates

All dates should use the format defined in [RFC3339](https://tools.ietf.org/html/rfc3339). All times are UTC based. Here is an example:

```
1985-04-12T23:20:50.52Z
```

## Command `when` parameter

Most commands use a `when` parameter to suggest to the device when to perform the command. This is a *suggestion* only. The device may decide to perform the command when it is optimal for itself. It maybe busy doing something and decline to do a reboot for several minutes for example. The device may reply with the actual `when` it will perform the command.

## Configuration UUID

The gateway manages the configuration UUID. So if you set a UUID for a configuration, it will be ignored. The gateway uses UUID as versioning. The UUID is unique within a single device. The resulting UUID or a configuration change is returned as part of the `configure` command.


# Monitoring

OpenWiFi 2.0 Telemetry and Analysis

TIP OpenWiFi software stack is envisioned to have a rich telemetry data that can be extracted, transformed and stored for analytics purposes. This section will outline various integration using the current capabilities of the OpenWiFi release. These integrations will provide examples for the community to enrich, adopt and productize.

The current release of OpenWiFi utilizes both a rich open API and Kafka for retrieving telemetry information from Access Points and SDK services. For the purpose of this section and Release 2.0 we will be showcasing Kafka integration with third party monitoring subsystems.

## Kafka Data Source

The current release of 2.0 SDK architecture contains a Kafka broker for the purposes inter-services communication, state, healthcheck, device provisioning state producing and consuming Kafka topics. You can find the latest information related to Kafka topics here: <https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/KAFKA.md#kafka-integration>

The current Kafka topics used for this monitoring integration are:

* state
* healthcheck

All Kafka messages carry a JSON payload, example of a healthcheck message is as follow:

```
{
   "system":{
      "id":179033843641952,
      "host":"https://gw-ucentral-dev01.cicd.lab.wlan.tip.build:17002"
   },
   "payload":{
      "data":{
         "interfaces":{
            "up0v0":{
               "dhcp":false,
               "location":"/interfaces/0"
            }
         },
         "unit":{
            "memory":36
         }
      },
      "sanity":67,
      "serial":"112233445566",
      "uuid":1627357625
   }
}
```

A state Kafka message looks like:

```
{
   "system":{
      "id":179033843641952,
      "host":"https://gw-ucentral-dev01.cicd.lab.wlan.tip.build:17002"
   },
   "payload":{
      "serial":"112233445566",
      "state":{
         "interfaces":[
            {
               "clients":[
                  {
                     "ipv6_addresses":[
                        "fe80:0:0:0:206:aeff:fee0:69ad"
                     ],
                     "mac":"07:06:06:06:06:06",
                     "ports":[
                        "eth1"
                     ]
                  },
                  {
                     "ipv4_addresses":[
                        "192.168.4.1"
                     ],
                     "mac":"01:02:03:04:05:06",
                     "ports":[
                        "eth1"
                     ]
                  }
               ],
               "counters":{
                  "collisions":0,
                  "multicast":63,
                  "rx_bytes":14725,
                  "rx_dropped":0,
                  "rx_errors":0,
                  "rx_packets":209,
                  "tx_bytes":13571,
                  "tx_dropped":0,
                  "tx_errors":0,
                  "tx_packets":80
               },
               "dns_servers":[
                  "1.1.1.1",
                  "9.9.9.9"
               ],
               "ipv4":{
                  "addresses":[
                     "192.168.4.33/24"
                  ],
                  "leasetime":600
               },
               "location":"/interfaces/0",
               "name":"up0v0",
               "uptime":31349
            },
            {
               "counters":{
                  "collisions":0,
                  "multicast":0,
                  "rx_bytes":0,
                  "rx_dropped":0,
                  "rx_errors":0,
                  "rx_packets":0,
                  "tx_bytes":1058,
                  "tx_dropped":0,
                  "tx_errors":0,
                  "tx_packets":5
               },
               "ipv4":{
                  "addresses":[
                     "192.168.1.1/24"
                  ]
               },
               "location":"/interfaces/1",
               "name":"down1v0",
               "uptime":31355
            }
         ],
         "radios":[
            {
               "active_ms":24459917,
               "busy_ms":1173593,
               "channel":149,
               "channel_width":"80",
               "noise":4294967198,
               "phy":"soc/40000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0",
               "receive_ms":4647,
               "transmit_ms":88272,
               "tx_power":30
            },
            {
               "active_ms":24456321,
               "busy_ms":11878205,
               "channel":11,
               "channel_width":"20",
               "noise":4294967204,
               "phy":"platform/soc/a000000.wifi",
               "receive_ms":1329,
               "transmit_ms":73228,
               "tx_power":30
            },
            {
               "active_ms":24458178,
               "busy_ms":1162312,
               "channel":36,
               "channel_width":"80",
               "noise":4294967192,
               "phy":"platform/soc/a800000.wifi",
               "receive_ms":12339,
               "transmit_ms":86904,
               "tx_power":23
            }
         ],
         "unit":{
            "load":[
               0.190921,
               0.263188,
               0.240726
            ],
            "localtime":1627418941,
            "memory":{
               "free":348540928,
               "total":520409088
            },
            "uptime":31386
         }
      },
      "uuid":1627357625
   }
}
```


# ELK Integration

Kafka integration with ELK

The following pipeline is used to leverage Kafka messages being emitted from OpenWiFi 2.0 for ELK (Elastic Logstash Kibana) stack integration :

![](/files/-MfjncMwUzU8UZV0BmHK)

TIP OpenWiFi project has deployed an ELK stack for community members to access [here](https://kibana.lab.wlan.tip.build/).

The key for this integration is to use a plugin that enables Kafka to be used as an input for Logstash. This plugin can be found [here](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html). Once installed then Logstash can be configured to listen to the input source of the Kafka broker that is deployed as part of OpenWiFi SDK 2.0 release and its appropriate topics. Here is a [sample](https://github.com/Telecominfraproject/wlan-cloud-ucentral-analytics) Logstash configuration.

It is important to note that Logstash provides the ability to transform messages which then can be pushed to Elasticsearch for storage with effective indexing. Finally Kibana is used to create visualization such as this:

![](/files/-Mfjp_ev6nWkh-k6g6FL)

![](/files/-MfjppDWd4xOcI7GGbjE)

The following [repository](https://github.com/Telecominfraproject/wlan-cloud-ucentral-analytics) will be used to store necessary files for integration examples for monitoring.


# Basic Device Provisioning

OpenWiFi 2.0

One of the benefits of the new data plane in OpenWiFi 2.0 is the flexibility of physical port to logical forwarding that is easily conveyed through configuration structures.

New protocol support is both easily added to the system as well as associated with interfaces by their role in the device.

The following sections offer feature configuration examples.

For complete reference to the device data model please refer [here.](/openwifi/2.1.0/provisioning/data-model-introduction)


# Bridge Mode SSID

OpenWiFi 2.0

Creating logical bridges may be done through association to named "interfaces".\
To associate a logical SSID interface directly to the WAN, place SSID configuration within the interface have a "role" of upstream.

{% tabs %}
{% tab title="SSID to WAN" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            },
            "ssids": [
                {
                    "name": "OpenWifi",
                    "wifi-bands": [
                        "2G", "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                }
            ]
```

{% endtab %}

{% tab title="Dual SSID to WAN" %}

```
"interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            },
            "ssids": [
                {
                    "name": "OpenWifi_2GHz",
                    "wifi-bands": [
                        "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                },
                {
                    "name": "OpenWifi_5GHz",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                }
            ]
```

{% endtab %}

{% tab title="Dual SSID Bridge Rate-Limit to WAN" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            },
            "ssids": [
                {
                    "name": "OpenWifi_2GHz",
                    "wifi-bands": [
                        "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    },
                    "rate-limit": {
                        "ingress-rate": 100,
                        "egress-rate": 100
                    }
                },
                {
                    "name": "OpenWifi_5GHz",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    },
                    "rate-limit": {
                        "ingress-rate": 250,
                        "egress-rate": 250
                    }
                }
            ]
```

{% endtab %}
{% endtabs %}


# NAT Gateway Mode SSID

OpenWiFi 2.0

Creating a NAT Gateway is easily done via association to an interface having a role of "downstream".

{% tabs %}
{% tab title="Dual SSID NAT" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
        {
            "name": "LAN",
            "role": "downstream",
            "services": [ "ssh", "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "LAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "static",
                "subnet": "192.168.1.1/24",
                "dhcp": {
                    "lease-first": 10,
                    "lease-count": 100,
                    "lease-time": "6h"
                }
            },
            "ssids": [
                {
                    "name": "OpenWifi_2GHz",
                    "role": "downstream",
                    "wifi-bands": [
                        "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                },
                {
                    "name": "OpenWifi_5GHz",
                    "role": "downstream",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                }                
            ]

        }
```

{% endtab %}
{% endtabs %}

Based on the above Dual SSID NAT configuration, a unique 2GHz and 5GHz SSID are created and logically bound to the same NAT LAN side network.

The NAT service is inherited by the downstream role with DHCP addressing defined according to the range set within the downstream "ipv4" configuration.


# Multi-VLAN SSID

OpenWiFi 2.0

The most common use case for VLANs and Wi-Fi is likely the service provider, venue, enterprise where Wi-Fi traffic is not subject to address translation. This is the example that will be shown, however it is entirely possible to create multiple downstream VLANs with SSIDs as well. Simply replace the logic of upstream to downstream where desired.

{% tabs %}
{% tab title="Single SSID VLAN" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp", "dhcp-snooping" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
            {
                "name": "WAN100",
                "role": "upstream",
                "vlan": {
                    "id": 100
                },
                "ethernet": [
                    {
                        "select-ports": [
                            "WAN*"
                        ]
                    }
                ],         
            "ssids": [
                {
                    "name": "VLAN 100 Wi-Fi",
                    "wifi-bands": [
                        "2G", "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                }
            ]
        },
```

{% endtab %}

{% tab title="Dual SSID - Dual VLAN" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp", "dhcp-snooping" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
            {
                "name": "WAN100",
                "role": "upstream",
                "vlan": {
                    "id": 100
                },
                "ethernet": [
                    {
                        "select-ports": [
                            "WAN*"
                        ]
                    }
                ],         
            "ssids": [
                {
                    "name": "VLAN 100 Wi-Fi",
                    "wifi-bands": [
                        "2G", "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                }
            ]
        },
            {
                "name": "WAN200",
                "role": "upstream",
                "vlan": {
                    "id": 200
                },
                "ethernet": [
                    {
                        "select-ports": [
                            "WAN*"
                        ]
                    }
                ],         
            "ssids": [
                {
                    "name": "VLAN 200 Wi-Fi",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    }
                }
            ]
        },
```

{% endtab %}
{% endtabs %}

In all cases the WAN port without VLAN id is using DHCP to obtain a management IP address.\
Each additional "upstream" role interface with an SSID associated have no IP configuration.


# ExpressWiFi

OpenWiFi 2.1

At home, in a cafe, or on the go, Express Wi-Fi gives you access to fast, affordable, and reliable internet so you can make connections that matter.

Express Wi-Fi partners with service providers to deliver great wi-fi to people when and where it's needed.

For information about becoming an expressWIFI partner please visit their [site.](https://expresswifi.fb.com/)

![](/files/-Mfosbs01fgZxpuO3X26)

## Configuration

ExpressWiFi builds a captive portal experience using a control plane protocol called OpenFlow.\
Configuring OpenWiFi for use with expressWiFi is as simple as defining a downstream interface and associating with an SSID and the open-flow service.

{% tabs %}
{% tab title="expressWIFI" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
        {
            "name": "LAN",
            "role": "downstream",
            "services": [ "ssh", "lldp", "open-flow"],
            "ethernet": [
                {
                    "select-ports": [
                        "LAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "static",
                "subnet": "192.168.1.1/24",
                "dhcp": {
                    "lease-first": 10,
                    "lease-count": 100,
                    "lease-time": "6h"
                }
            },
            "ssids": [
                {
                    "name": "ExpressWiFi",
                    "wifi-bands": [
                        "5G", "2G"
                    ],
                    "bss-mode": "ap"
                }
            ]
        }
    ],
        "services": {
        "lldp": {
            "describe": "OpenWiFi - expressWiFi",
            "location": "Hotspot"
        },
        "ssh": {
            "port": 22
        },
        "open-flow": {
            "controller": " IP / FQDN of expressWiFi Controller ",
            "mode": "specific mode pssl, ptcp, ssl, tcp"
            "ca-certificate": " the client cert as Base64 here ",
            "ssl-certificate": "the shared ca as Base64 here",
            "private-key": "client key as Base64 here" 
        }
    }
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Contact expressWiFi for appropriate CA, Client Cert, and Key for TLS Security mode in addition to the specific expressWiFi Controller FQDN. Ensure these values are Base64 encoded when passed into the configuration
{% endhint %}


# WDS

OpenWiFi 2.0

Wireless Distribution System (WDS) supports an Access Point, Station and Repeater mode of operation. OpenWiFi 2.0 supports all three.

In the below example, the LAN side of the Access Point at the top of the topology will be wirelessly bridged to the LAN side of the Access Point Station at the bottom of the topology.

{% tabs %}
{% tab title="WDS-AP" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
        {
            "name": "LAN",
            "role": "downstream",
            "services": [ "ssh", "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "LAN*"
                    ]
                }
            ],
            "ssids": [
                {
                    "name": "OpenWifi_WDS_AP",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "wds-ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    },
                    "roaming": {
                        "message-exchange": "ds",
                        "generate-psk": true
                    }
                }
            ],            
            "ipv4": {
                "addressing": "static",
                "subnet": "192.168.10.1/24",
                "dhcp": {
                    "lease-first": 10,
                    "lease-count": 100,
                    "lease-time": "6h"
                }
            }
        }
    ],
```

{% endtab %}

{% tab title="WDS-STA" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
        {
            "name": "LAN",
            "role": "downstream",
            "services": [ "ssh", "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "LAN*"
                    ]
                }
            ],
            "ssids": [
                {
                    "name": "OpenWifi_WDS_AP",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "wds-sta",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWifi",
                        "ieee80211w": "optional"
                    },
                    "roaming": {
                        "message-exchange": "ds",
                        "generate-psk": true
                    }
                }
            ],
    }
```

{% endtab %}
{% endtabs %}

In this configuration, LAN clients of the WDS Station AP receive IP addresses from the WDS Access Point AP from its LAN side DHCP service, via WDS link at 5GHz.


# Mesh

OpenWiFi 2.0

OpenWiFi Mesh has been designed to eliminate configuration complexity while also remaining capable of advanced topology designs including Multi-Gateway, Multi-SSID, VLAN, and Zero Touch Mesh onboarding.

The physical wired interface(s) to participate in the mesh topology egress are defined with the protocol "mesh".

The logical wireless interface(s) to participate in mesh topology are defined by their bss-mode set to "mesh".

{% tabs %}
{% tab title="Basic Mesh" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "tunnel": {
                "proto": "mesh"
            },           
            "services": [ "lldp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            },         
            "ssids": [
                {
                    "name": "transit",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "mesh",
                    "encryption": {
                        "proto": "psk2",
                        "key": "meshpassword",
                        "ieee80211w": "optional"
                    }
                },
                {
                    "name": "2GHz Clients",
                    "wifi-bands": [
                        "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "key": "OpenWiFi",
                        "ieee80211w": "optional"
                    }
                },                  
                    {
                        "name": "5GHz Clients",
                        "wifi-bands": [
                            "5G"
                        ],
                        "bss-mode": "ap",
                        "encryption": {
                            "proto": "psk2",
                            "key": "OpenWiFi",
                            "ieee80211w": "optional"
                        }                    

                    }
            ]
        },
```

{% endtab %}
{% endtabs %}

In this basic mesh, dual SSIDs are configured for clients while an SSID for mesh transit is configured for IEEE802.11s client associations. Additional mesh clients simply use the same approach, no other configuration is required for the client to participate in this mesh.

Advanced examples with VLANs and roaming are all possible by adding additional configuration steps.


# Roaming RRM and SON

OpenWiFi 2.0

Radio Resource Management and Self Organizing Network features in OpenWiFi 2.0 operate by default in local mode from the Access Point device without dependency on the cloud. Data and state related to client steering and roaming is also possible in co-operation with the cloud when so configured.

Metrics and telemetry are sent to the cloud as desired based on configuration however operation of 802.11k/v/r behavior and autonomous channel control are built in features of all OpenWiFi 2.0 Access Points.

## Steering

OpenWiFi services feature "wifi-steering" determines the operating parameters of RRM on the Access Point.

```
    "services": {
      "wifi-steering": {
            "mode": "local",
            "network": "upstream",
            "assoc-steering": true,
            "required-snr": -75,
            "required-probe-snr": -70,
            "required-roam-snr": -85,
            "load-kick-threshold": 90
        },
```

When mode is set to local, the Access Point handles steering decisions autonomously with the surrounding OpenWifi devices.\
Which network association, in this case "upstream" will steering be operating on. Note in prior examples most service provider, venue, enterprise services operate on the WAN side upstream network of the Access Point.

| Parameter           | Value                                                                         |
| ------------------- | ----------------------------------------------------------------------------- |
| mode: local         | autonomous operation                                                          |
| network: upstream   | performs roaming among SSIDs on upstream interfaces                           |
| assoc-steering      | reject client association requests when the UE is subject to a steering event |
| required-snr        | minimum signal in dBm a client will be permitted to remain connected          |
| required-probe-snr  | minimum signal level in dBm for management probes to be replied to            |
| required-roam-snr   | minimum signal level in dBm client roaming threshold                          |
| load-kick-threshold | minimum channel load as % available before clients are kicked                 |

## Apply Wi-Fi Steering to enable 802.11r Fast Roaming SSIDs

```
            "ssids": [
                {
                    "name": "OpenWiFi Roaming",
                    "wifi-bands": [
                        "2G", "5G"
                    ],
           "bss-mode": "ap",
           "encryption": {
                "proto": "psk2",
                "key": "OpenWiFi",
                "ieee80211w": "optional"
                 },                   
                    "roaming": {
                        "message-exchange": "air",
                        "generate-psk": true,
                        "domain-identifier": "EFAB"
                    },
                    "services": [ "wifi-steering" ]
                }
            ]
        },
```

Each SSID to participate in roaming must have "services" : \[ "wifi-steering" ] associated.

Additional fast roaming configuration is possible including setting message-exchange either to "air" or "ds" to determine pre authenticated message exchange occurs over the air or distribution system.

The generate-psk option generates FT response locally for PSK networks. This avoids use of PMK-R1 push/pull from other APs with FT-PSK networks.

Configuring domain-identifier sets Mobility Domain identifier (dot11FTMobilityDomainID, MDID) permitting segmentation of fast roaming RF topologies.

When pmk-r0-key-holder and pmk-r1-key-holder are left un-configured, the pairwise master key R0 and R1 will generate a deterministic key automatically for fast mobility domain exchange over the air.

## RRM 802.11k

To enable 80211k parameters, associate these on a participating SSID basis.

```
            "ssids": [
                {
                    "name": "OpenWiFi Roaming",
                    "wifi-bands": [
                        "2G", "5G"
                    ],
           "bss-mode": "ap",
           "encryption": {
                "proto": "psk2",
                "key": "OpenWiFi",
                "ieee80211w": "optional"
                 },                   
                    "roaming": {
                        "message-exchange": "air",
                        "generate-psk": true,
                        "domain-identifier": "EFAB"
                    },
                    "rrm": {
                        "neighbor-reporting": true,
                        "ftm-responder": true, 
                        "stationary-ap": true
                    },
                    "services": [ "wifi-steering" ]
                }
            ]
        },
```

In addition to 802.11k features for neighbor reporting, fine timing measurement responder and stationary ap indication, OpenWiFi also supports LCI measurement, Civic Location subelement as well.

## Automatic Channel Balancing

As part of "wifi-steering" feature, autonomous channel management algorithm may be enabled to establish a self organizing Wi-Fi network.

The auto-channel setting operates in co-ordination with other OpenWiFi Access Points by enumerating the newest AP in the network, then running neighbor and RF scans to determine the best channel of operation. Once the newest AP completes this process, the next AP is sequence will run the same algorithm for channel balancing until all APs in the network complete. The entire process may take up to 5 minutes the first time a network is powered on. The algorithm will re-run every 12 hours.

```
    "services": {
      "wifi-steering": {
            "mode": "local",
            "network": "upstream",
            "auto-channel": true,
            "assoc-steering": true,
            "required-snr": -75,
            "required-probe-snr": -70,
            "required-roam-snr": -85,
            "load-kick-threshold": 90
        },
```


# Captive Portal

OpenWiFi 2.0

OpenWiFi supports multiple models for Captive Portal. A built-in captive portal is described below. With multiple overlay tunnel services such as GRE and L2TP in addition to VLAN features, OpenWiFi is also easily deployed with any number of Captive Portal appliance solutions in either in-band or out-of-band style deployments.

## Local Captive Portal

Creating a local captive portal involves associating the "captive" service with an interface. In the example below, "captive" is enabled on a downstream role interface. Any associated SSID on LAN side of this Access Point will be subject to configuration of the local captive portal. This would also apply to LAN interfaces if also associated with "captive".

```
        {
            "name": "captive",
            "role": "downstream",
            "captive": {
                "max-clients": 32,
                "gateway-name": "Lobby Wi-Fi Welcome",
                "upload-rate": 10,
                "download-rate": 20,
                "upload-quota": 300,
                "download-quota": 300
            },
            "ipv4": {
                "addressing": "static",
                "subnet": "192.168.2.1/24",
                "dhcp": {
                    "lease-first": 10,
                    "lease-count": 100,
                    "lease-time": "6h"
                }
            },
            "ssids": [
                {
                    "name": "Office Lobby Wi-Fi",
                    "wifi-bands": [
                        "5G",
                        "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "none",
                        "ieee80211w": "optional"
                    },
                    "roaming": {
                        "message-exchange": "ds",
                        "generate-psk": true
                    }
                }
            ]
        }
    ],
```

Local captive portal will redirect to a default landing page and display the name as configured in "gateway-name". Per associated user bandwidth and usage quota limits and total association limits may all be defined.


# External Captive Portal

OpenWiFi 2.1

When an external access controller, such as a captive portal appliance or a Universal Access Method (UAM) redirector is required to handle subscriber login, OpenWiFi optionally supports builds that include use of CoovaChili. This would be found in build profile chilli-redirect.yml.

To configure a CoovaChilli service, OpenWiFi supports the `"third-party"` schema definition. &#x20;

Through the use of third-party, many configurations are possible, for external captive portal, third-party will process a services lookup of `"chilli-redirect"` applied to an interface.&#x20;

Within `"third-party"` will be the necessary CoovaChilli configuration parameters.

```
"third-party": {
                "chilli-redirect": {
                        "uamport": 3990,
                        "radiusauthport": 1812,
                        "radiusacctport": 1813,
                        "radiusserver1": "radiusServerIP",
                        "radiusserver2": "radiusServerIP",
                        "radiusnasid": "nasID",
                        "uamallowed": "allowed.example.com,10.0.0.1,192.168.10.1",
                        "uamdomain": "exampleUAMdomain.com,otherExampleUAMdomain.com",
                        "defidletimeout": 900,
                        "definteriminterval": 600,
                        "acctupdate": 1,
                        "uamserver": "https://portal.example.com/portal/default/index.php?n=NAME&c=3&l=181",
                        "radiussecret": "radiusSecret",
                        "nasmac": "00:01:02:03:04:AA"
                }
        }
```

### NAT Mode&#x20;

Associate to an interface:

```
{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh", "chilli-redirect" ],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.1.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
			},
			"ssids": [
				{
					"name": "Hotspot SSID Name",
					"wifi-bands": [
						"2G", "5G"
					],
					"bss-mode": "ap"
				}
			]
		}
```

### Bridge Mode

In the above example, captive portal redirection occurs via a NAT interface on LAN side or `"downstream"` role.

When a direct to WAN presentation, or bridge mode operation is desired, associate the service to the `"upstream"` interface.

Associate to an interface:

```
"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "chilli-redirect" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},
			"ssids": [
				{
					"name": "Hotspot SSID Name",
					"wifi-bands": [
						"2G", "5G"
					],
					"bss-mode": "ap"
				}
			]
		},
```

&#x20;&#x20;


# Multi-PSK (MDU Shared Key)

OpenWiFi 2.1

Multiple Pre Shared Key is a popular configuration option in Multi Dwelling Unit, dormitory or similar environment where it is costly to implement complex 802.1x security however that same level of per-client security is highly desired.

A SSID when configured for multi-psk can have multiple PSK/VID mappings. Each one of them can be bound to a specific MAC or be a wildcard.

```
            "ssids": [
                {
                    "name": "MDU Wi-Fi",
                    "wifi-bands": [
                        "5G",
                        "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "psk2",
                        "ieee80211w": "optional",
                        "key": "OpenWifi"
                    },
                    "multi-psk": [
                        {
                            "key": "akey",
                            "vlan-id": 100
                        },
                        {
                            "key": "bkey"
                            "vlan-id": 200
                        }
                    ],
                    "roaming": {
                        "message-exchange": "ds",
                        "generate-psk": true
                    }
                }
            ]
```

{% hint style="info" %}
Note: M-PSK passwords must be unique per `vlan-id`  as the device will attempt to match security key to assigned virtual lan. In the above example, a password of `OpenWifi` will match the untagged interface of the SSID and unique password of `"akey"` will match client(s) to virtual lan 100.&#x20;
{% endhint %}


# Dynamic Air-Time Policy

OpenWiFi 2.1

Dynamic Air-Time Policy is a service to influence underlying co-ordination function of the Wi-Fi MAC domain per associated UE in terms of priority to use the air interface.&#x20;

It is possible to govern certain application use cases such as streaming media or real time communications based on the resolution of those services through DNS.&#x20;

This results in the UE, by its IP address having matched a specific fully qualified domain name or a wildcard therein, to having its air-time weighted priority to the value set in the weight parameter.

```
            "services": {     
                "airtime-policies": {
                    "dns-match": ["*.example.com", "host.example2.com" ],
                    "dns-weight": 256
                }
            }
```

{% hint style="info" %}
Note: In release 2.1, airtime-policies must be applied to SSIDs in a NAT configuration. Bridge / VLAN mode SSIDs with airtime-policies will be updated in a future release
{% endhint %}

### Possible Uses&#x20;

Any application a user may commonly use the OpenWiFi administrator seeks to prioritize air-time for may be triggered via the airtime-policies.

For example:

| Service  | FQDN / URL                                                 |
| -------- | ---------------------------------------------------------- |
| MS Teams | *\*.lync.com, \**.teams.microsoft.com, teams.microsoft.com |
| Zoom     | \*.zoom.us                                                 |

Any number of services may interest the administrator for airtime-policies. Simply determine the FQDN or wildcard FQDN applicable and update the OpenWiFi device configuration.&#x20;


# VxLAN

OpenWiFi 2.0

VXLAN’s goal is allowing dynamic large scale isolated virtual L2 networks to be created for virtualized and multi-tenant environments. It does this by encapsulating Ethernet frames in VXLAN packets which when deployed in Wi-Fi topologies can create highly extensible Layer 2 inter-network domains over large campus, MDU, venue service networks.

VxLAN header uses a 24-bit VNID as a unique layer 2 forwarding domain value. VxLAN maintains layer 2 isolation between the forwarding domains and does not leak MAC addresses into upstream switches. Through the use of 24 bits in VNID VxLAN scales up to 16 million unique LAN forwarding domains.

The VXLAN encapsulation method is IP based and provides for a virtual L2 network. With VXLAN the full Ethernet Frame (with the exception of the Frame Check Sequence: FCS) is carried as the payload of a UDP packet. VXLAN utilizes a 24-bit VXLAN header, to identify virtual networks. This header provides for up to 16 million virtual L2 networks.

Frame encapsulation is done by an entity known as a VxLAN Tunnel Endpoint (VTEP.) A VTEP has two logical interfaces: an uplink and a downlink. The uplink is responsible for receiving VxLAN frames and acts as a tunnel endpoint with an IP address used for routing VxLAN encapsulated frames.

The VTEP in a TIP OpenWiFi device would be a management interface or designated uplink port(s). VTEP in an AP would be the AP WAN interface, or otherwise designated management interface (such as sub-interface on bridge wan).

In a traditional L2 switch a behavior known as flood and learn is used for unknown destinations (i.e. a MAC not stored in the MAC table). This means that if there is a miss when looking up the MAC the frame is flooded out all ports except the one on which it was received. When a response is sent the MAC is then learned and written to the table.

The next frame for the same MAC will not incur a miss because the table will reflect the port it exists on. VXLAN preserves this behavior over an IP network using IP multicast groups.

## Configure VxLAN

OpenWiFi device will establish a VTEP adjacency to the upstream switch. It is anticipated that any Wi-Fi networks in a VxLAN topology are associated to "upstream" interface(s).

The following example creates a VxLAN endpoint from a WAN upstream port that will participate in VLAN 100, encapsulate this into VxLAN where it may be distributed across the campus or venue transparently.

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
        {
            "name": "VXLAN",
            "role": "upstream",
            "vlan": {
                "id": 100
            },
            "tunnel": {
                "proto": "vxlan",
                "peer-address": "192.168.178.9",
                "peer-port": 4789
            },
            "ipv4": {
                "addressing": "static",
                "subnet": "10.0.0.1/24"
            }
        },
```


# L2TP

OpenWiFi 2.0

Layer 2 Tunneling Protocol may be associated to any interface using the "tunnel" configuration option.

This makes it possible to configure L2TP for multiple types of deployments as any interface may be encapsulated by the "tunnel" parameter.

For example, to send all content of a specific SSID over an L2TP tunnel, the following configuration would apply.

```
        {
            "name": "LAN",
            "role": "downstream",
            "services": [ "ssh" ],
            "ethernet": [
                {
                    "select-ports": [
                        "LAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "static",
                "subnet": "192.168.1.1/24",
                "dhcp": {
                    "lease-first": 10,
                    "lease-count": 100,
                    "lease-time": "6h"
                }
            }
        },
        {
            "name": "L2TP",
            "role": "downstream",
            "tunnel": {
                "proto": "l2tp",
                "server": " far end IP address ",
                "user-name": "secret-l2tp-username",
                "password": "secrectPassword"
            },
            "ipv4": {
                "addressing": "static",
                "subnet": "192.168.10.1/24",
                "dhcp": {
                    "lease-first": 10,
                    "lease-count": 100,
                    "lease-time": "6h"
                }
            },
            "ssids": [
                {
                    "name": "Tunneled SSID",
                    "wifi-bands": [
                        "5G", "2G"
                    ],
                    "bss-mode": "ap"
                }
            ]
        }
    ],
```


# GRE

OpenWiFi 2.0

OpenWiFi 2.0 supports Generic Routing Encapsulation as an available "tunnel" protocol type.

This makes it possible to configure GRE for multiple types of deployments as any interface may be encapsulated by the "tunnel" parameter.

For example, to send all content of a specific SSID over an GRE tunnel, the following configuration would apply.

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
        },
        {
            "name": "GRE",
            "role": "upstream",
            "vlan": {
                "id": 20
            },
            "tunnel": {
                "proto": "gre",
                "peer-address": "far end IP address",
                "vlan-id": 30
            },
            "ssids": [
                {
                    "name": "Tunneled SSID via GRE from VLAN 20 Interface",
                    "wifi-bands": [
                        "2G", "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "none",
                        "ieee80211w": "optional"
                    },
                    "rate-limit": {
                        "ingress-rate": 100,
                        "egress-rate": 100
                    },                    
                    "roaming": {
                        "message-exchange": "ds",
                        "generate-psk": true
                    }
                }
            ]
        },
```

In the above example, the WAN untagged port will request DHCP in addition to present a VLAN interface with id 20 that both initiates the GRE tunnel as well as passes SSID traffic over that tunnel. Optionally the GRE tunnel itself may also carry a VLAN encapsulated payload. In the above example a WAN presentation of VLAN interface 20 has GRE tunnel. Within the GRE tunnel on WAN interface of VLAN 20 is a GRE payload with VLAN 30 in the payload header.&#x20;


# RADIUS Authenticated SSID

OpenWiFi 2.0

When authenticating clients with back office RADIUS systems, the configuration of OpenWiFi permits this on a per SSID basis.

{% tabs %}
{% tab title="Simple RADIUS" %}

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            },
            "ssids": [
                {
                    "name": "OpenWifi",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "wpa2",
                        "ieee80211w": "optional"
                    },
                    "radius": {
                        "authentication": {
                            "host": "192.168.178.192",
                            "port": 1812,
                            "secret": "secret"
                        },
                        "accounting": {
                            "host": "192.168.178.192",
                            "port": 1813,
                            "secret": "secret"
                        }
                    }
                }
            ]
        },
```

{% endtab %}

{% tab title="EAP-Local SSID" %}

```
            "ssids": [
                {
                    "name": "OpenWifi",
                    "wifi-bands": [
                        "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "wpa2",
                        "ieee80211w": "optional"
                    },
                    "certificates": {
                        "ca-certificate": "/etc/ucentral/cas.pem",
                        "certificate": "/etc/ucentral/cert.pem",
                        "private-key": "/etc/ucentral/key.pem"
                    },
                    "radius": {
                        "local": {
                            "server-identity": "OpenWiFi-Local-EAP",
                            "users": [
                                {
                                    "user-name": "open",
                                    "password": "wifi"
                                }
                            ]
                        }
                    }
                }
            ]
        },
```

{% endtab %}
{% endtabs %}

Many parameters are possible with RADIUS authentications given the many methods in use worldwide. Many of the EAP methods have configuration options described below.

| RADIUS Attribute   | Description                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| nas-identifier     | Unique NAS Id used with RADIUS server                                                                                                                                                                                                                                                                                                                                                                                |
| chargeable-user-id | Chargeable User Entity per RFC4372                                                                                                                                                                                                                                                                                                                                                                                   |
| local              | <p>Local RADIUS within AP device</p><ul><li><p>server-identity</p><ul><li>users - Local EAP users based on username, PreShared Key and VLAN id</li></ul></li></ul>                                                                                                                                                                                                                                                   |
| authentication     | <p>RADIUS server</p><ul><li>host IP address</li><li>port ( example 1812)</li><li>secret ( Shared secret with RADIUS server )</li></ul><p>Additional methods within Access-Request</p><ul><li><p>request-attribute ( id of RADIUS server )</p><ul><li>id ( numeric value of RADIUS server )</li><li><p>value</p><p>Any sub-value defined as integer RADIUS attribute value</p></li></ul></li></ul>                    |
| accounting         | <p>RADIUS server</p><ul><li>host IP address</li><li>port ( example 1813)</li><li>secret ( Shared secret with RADIUS server )</li></ul><p>Additional methods within Access-Request sent in Accounting</p><ul><li><p>request-attribute ( id of RADIUS server )</p><ul><li>id ( numeric value of RADIUS server )</li><li><p>value</p><p>Any sub-value defined as integer RADIUS attribute value</p></li></ul></li></ul> |
| accounting         | interval ( Interim accounting interval defined in seconds )                                                                                                                                                                                                                                                                                                                                                          |


# Dynamic VLANs with RADIUS

OpenWiFi 2.0

In many deployment scenarios, user authentication is centralized with RADIUS systems. In addition, users may have association to their own networks or private networks. A common approach for this is to dynamically assign VLANs to Wi-Fi subscribers as they join the OpenWiFi network.

To configure Dynamic VLANs with RADIUS, associate an SSID with RADIUS authentication, and associate the interface to "upstream" role as dynamic VLANs are most likely to be applicable across the service provider, venue, enterprise network.

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            },
            "ssids": [
                {
                    "name": "OpenWifi",
                    "wifi-bands": [
                        "5G", "2G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "wpa2",
                        "ieee80211w": "optional"
                    },
                    "radius": {
                        "authentication": {
                            "host": "192.168.178.192",
                            "port": 1812,
                            "secret": "secret"
                        },
                        "accounting": {
                            "host": "192.168.178.192",
                            "port": 1813,
                            "secret": "secret"
                        }
                    }
                }
            ]
        },
```

## RADIUS Access-Accept

OpenWiFi devices will determine a VLAN is associated to the authentication of a subscriber when the access-accept message returns the following attribute value pairs:

* Tunnel-Type = 13
* Tunnel-Medium-Type = 6
* Tunnel-Private-Group-Id = VLAN Id Number

Upon return of an access-accept from RADIUS, based on any method chosen for security, OpenWiFi will dynamically create a VLAN Id as described in Tunnel-Private-Group-Id, associated to the interface role, in this example upstream.


# Passpoint®

OpenWiFi 2.0

Passpoint® brings seamless, automatic and secure Wi-Fi connectivity using either pre-provisioned credentials or the SIM card in a mobile device. Passpoint provides simple, fast online sign-up and provisioning that is only required upon a user’s first visit to a Passpoint network. Once a Passpoint enabled device contains the Wi-Fi AP or network credentials, it will discover and securely connect when the user is nearby—without requiring additional user action. This makes staying connected while mobile infinitely easier, and because Passpoint employs enterprise-level security, users can feel confident their data is better protected.

Passpoint® also delivers more value to carriers, service providers, and IT managers of enterprise networks, enabling:

* Mobile data offload
* Wi-Fi networks for&#x20;
  * Hospitality, venues and enterprise&#x20;
  * Streamlined, enterprise-class device provisioning and credential management for enterprise and other private networks
* Wi-Fi–based services such as Wi-Fi calling, and collaboration tools&#x20;
* Wi-Fi roaming agreements across carriers and service providers&#x20;
* Opportunities to engage users and extract additional value from the network&#x20;

Passpoint® is already supported by most enterprise-class APs on the market today, and natively supported by major mobile operating systems including Android, iOS, macOS, and Windows 10. With active support from a wide ecosystem of device manufacturers, mobile operators, and service providers, Passpoint® benefits both users and Wi-Fi network providers


# Configuration Introduction

OpenWiFi 2.0

TIP OpenWiFi devices implement support for both the air interface and systems interfaces necessary to support Passpoint® Release 2 and above. Once also termed Hotspot 2.0, IEEE 802.11u specified added air interface fields exposing Access Network Query Protocol interactions for clients to discovery Access Point capabilities.

Wi-Fi Alliance expanded ANQP to include Online Signup (OSU) concepts to leverage seamless onboarding and client security for Passpoint® networks. Following on from these efforts, Wireless Broadband Alliance has provided the necessary system interfaces for identity, security, mobile offload within a common federated operator solution known as OpenRoaming.

TIP OpenWiFi enables operators to deploy the full range of Passpoint® and OpenRoaming solutions.

| Term              | Description                                                                                                                                                                                                                                                                                                                    |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Operator          | <p>Wi-Fi Infrastructure Operator</p><p>Access Network Provider (ANP) as defined by OpenRoaming</p>                                                                                                                                                                                                                             |
| Venue             | Deployed location of Wi-Fi service                                                                                                                                                                                                                                                                                             |
| Identity Provider | <p>Subscriber authenticating service provider</p><p>Home Service Provider (HSP) as defined by OpenRoaming</p>                                                                                                                                                                                                                  |
| Roaming Exchange  | Operator and Identity Provider Authentication, Authorization, Accounting                                                                                                                                                                                                                                                       |
| ANQP              | <p>Access Network Query Protocol contains:</p><ul><li>Domain</li><li>Venue Name</li><li>Venue Info</li><li>Operator Friendly Name</li><li>IP Type</li><li>WAN Metric</li><li>Connection Capability</li><li>Operating Class</li><li>Authentication Type</li><li>Service Providers List</li></ul>                                |
| GAS               | <p>Generic Advertisement Layer 2 Service for client query</p><ul><li><p>Client query returns:</p><ul><li>Organization Identifier / Service Provider Identity</li><li>Domain</li><li>Authentication</li><li>Roaming Consortium List</li><li>Network Access Identifier Realm (NAI)</li><li>3GPP Network Data</li></ul></li></ul> |
| OSU               | <p>Online Signup - Advertised over ANQP contains:</p><ul><li>OSU SSID</li><li>OSU URI</li><li>OSU Method</li><li>OSU Available Icons</li><li>OSU ESS (OSEN) SSID</li><li>OSU Description</li></ul>                                                                                                                             |
| OSEN              | OSU Server Authenticated Layer 2 Encryption Network                                                                                                                                                                                                                                                                            |


# Advertising Services

OpenWiFi 2.0

Passpoint® requires ANQP to supply three information elements from the Access Point.

## PLMN-Id

Public Land Mobile Network Id is defined by 3GPP and comprised of two, three digit numbers to uniquely identify the Mobile Network Operator (MNO).

## Realm

A Fully Qualified Domain Name (FQDN) is a realm representing the service provider of the Wi-Fi service. Non MNO operators are an example of 'realm-based' service advertisements. Examples include Cable MSOs, Enterprises or other on MNO providers. Authentication methods used with realm-based configuration are EAP-TLS and EAP-TTLS.

## OI / RCOI

Organization Id or as defined by Wireless Broadband Alliance, Roaming Consortium Organization Id indicate the federated identity capable of authentication. Examples would be OpenRoaming, Eduroam and follow the Passpoint® EAP authentication methods.


# Passpoint® Configuration

OpenWiFi 2.0

Ahead of the Provisioning service coming in release 2.1 sprint, it is possible to configure all Passpoint attributes as OpenWiFi has tested in prior OpenWiFi releases.

Capabilities for Hotspot 2.0 / Passpoint® include:

* venue-name
* venue-group
* venue-type
* venue-url
* auth-type
* domain-name
* nai-realm
* osen
* anqp-domain
* anqp-3gpp-cell-net
* firendly-name
* icons

```
    "interfaces": [
        {
            "name": "WAN",
            "role": "upstream",
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            },
            "ssids": [
                {
                    "name": "OpenRoaming",
                    "wifi-bands": [
                        "5G"
                    ],
                    "bss-mode": "ap",
                    "encryption": {
                        "proto": "wpa-mixed",
                        "ieee80211w": "optional"
                    },
                    "radius": {
                        "nas-identifier": "TIPLABAP101",
                        "chargeable-user-id": true,
                        "authentication": {
                            "host": "IP Address of RADIUS",
                            "port": 11812,
                            "secret": "passphrase",
                            "request-attribute": [
                                {
                                    "id": 126,
                                    "value": "s:TIP"
                                }
                            ]
                        },
                        "accounting": {
                            "host": "IP Address of RADIUS",
                            "port": 11813,
                            "secret": "passphrase",
                            "request-attribute": [
                                {
                                    "id": 126,
                                    "value": "s:TIP"
                                }
                            ],
                            "interval": 600
                        }
                    },
                    "pass-point": {
                        "venue-name": [
                            "eng:Example passpoint_venue",
                            "fra:Exemple de lieu"
                        ],
                        "venue-group": 2,
                        "venue-type": 8,
                        "venue-url": [
                            "http://www.example.com/info-fra",
                            "http://www.example.com/info-eng"
                        ],
                        "auth-type": {
                            "type": "terms-and-conditions"
                        },
                        "domain-name": "onboard.example.com",
                        "nai-realm": [
                            "0,oss.example.com,21[5:7][2:4]"
                        ],
                        "osen": false,
                        "anqp-domain": 1234,
                        "anqp-3gpp-cell-net": [
                            "310,260",
                            "310,410"
                        ],
                        "friendly-name": [
                            "eng:TIPLabs",
                            "fra:TIPLabs"
                        ],
                        "icons": [
                            {
                                "icon": "iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsSAAALEgHS3X78AAAEDklEQVRYhc1YTUgUcRR/q7uGUzsuYSClNRcbymS3wII6KNF0Cly7dHSNioIiD3Ppg9IOETHQB50S2vUqhBt1qBZ0pWuQG3VYJJ1SI8h0d4qRsnbjrW+Xv+N87VbYg2H/M/P/v/d732/W499+KA9rTFo64fECLSqBoitCBwDEAGCbxZYxAOjjZDVpxYMXpYIhqiq1BYEYtQGB1I57dEWIOPErG4iuCAKBuM08TgFAFyerHrxwDQCPmPdROmNJ3jIAoFZ9JhZAEB2crGaKDzhZjQNAnM5E6TGetQTjyiK6IsSIoZkbwiwIljhZxXOD9KgdrWklw9EiuiKEAaCbbrMUnKhxCAAynKyqDixuM+cRiOl+UyCEvI+EBRkQ6IJxurfMBJZwv66UDBHRFWHczIKrXEN+nSItgsyrGAOiRLwoPedF6YoVEIM7kGdSV4SQLRCK7KhhT4rqQcwExGMAkACgnxelUxZYUPs7ZFEg5VbxMlqk1wBgNyerIU5WO8ysAQA36XcRAIbMUKAbOFntJTe/L4Ix1hYjkE5mHbYQXiItnXhB67taOmGaOQwgleKuxN8UiMGXKRfZUAmxigXY82zW8EzOT7oRwotS0bwRXpRuOFmFUtdUBuuajRTVeB0sU9sA1QhborQ1lVFx04PlGClGf0xLJ2zjyYlKrjkz0jC/wZcrmG0p55m8L5fFZ5PbjYeHtxZk1HpzkwlGRgnI8Dt/0TVIY/cBrjkx5UXpAS07eVEKubHK67l1JRnAyKjYNRSoPXRbjRWTFyXHOLEiFsgvKmJ4zTqAMFZgPFOHzZAXpYDNUbCSwQJBrYJUgrfYgAhR9wXGInEahILMOysylVGWa0jbOGnfz2QNUoQ0bedFaVUvcSLXQAhEkoajQS2dYMs1UDELU3PrZord3wVCAw6aNKWlEzhXBHRFKMwk8p75q9jEtHRCpXEQwUR5UQo7s3UBBKczFHbiyL4ZqoYpZu6MZH9U4ZQOQxP+BRqQBUrhQhev9eaHRuUdL3VFwPnVNogtgVATHD490tA6NMFv4WtycKHtyz2mnwSeqhve4mLmm4+b/uqDYpnH2DkXWniz+NPjO/qkMTT9zdtpNoO4tYiAzOPLhQ4iOzPZ86H5RuZ98th2reXy3rlXz8Iflpr8S1n2Q+pS29yu9b7c/K88VHc9bpq1m+CdgKhN/iW4vv/z9IHNi1MX277UsYMvCe06G1zQWuu/PzQR9Ch+ZKaG8+YWotLHOqcZ12qKFxoGmjOfTk70HG/J9B1vyaBV+unzoETF7xcLHpHW+u/xyZ537VRjIlSDygKCKZpsGGjupfqwTAOSrXlXUjMYJjLkc6tcIECpOupe8J8RGyPo/+y/EGJBK6a5/+b/EU8+v+Y4AADgN/LdfxH+Qd9IAAAAAElFTkSuQmCC",
                                "width": 32,
                                "height": 32,
                                "type": "image/png",
                                "language": "fra"
                            },
                            {
                                "icon": "iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsSAAALEgHS3X78AAAEDklEQVRYhc1YTUgUcRR/q7uGUzsuYSClNRcbymS3wII6KNF0Cly7dHSNioIiD3Ppg9IOETHQB50S2vUqhBt1qBZ0pWuQG3VYJJ1SI8h0d4qRsnbjrW+Xv+N87VbYg2H/M/P/v/d732/W499+KA9rTFo64fECLSqBoitCBwDEAGCbxZYxAOjjZDVpxYMXpYIhqiq1BYEYtQGB1I57dEWIOPErG4iuCAKBuM08TgFAFyerHrxwDQCPmPdROmNJ3jIAoFZ9JhZAEB2crGaKDzhZjQNAnM5E6TGetQTjyiK6IsSIoZkbwiwIljhZxXOD9KgdrWklw9EiuiKEAaCbbrMUnKhxCAAynKyqDixuM+cRiOl+UyCEvI+EBRkQ6IJxurfMBJZwv66UDBHRFWHczIKrXEN+nSItgsyrGAOiRLwoPedF6YoVEIM7kGdSV4SQLRCK7KhhT4rqQcwExGMAkACgnxelUxZYUPs7ZFEg5VbxMlqk1wBgNyerIU5WO8ysAQA36XcRAIbMUKAbOFntJTe/L4Ix1hYjkE5mHbYQXiItnXhB67taOmGaOQwgleKuxN8UiMGXKRfZUAmxigXY82zW8EzOT7oRwotS0bwRXpRuOFmFUtdUBuuajRTVeB0sU9sA1QhborQ1lVFx04PlGClGf0xLJ2zjyYlKrjkz0jC/wZcrmG0p55m8L5fFZ5PbjYeHtxZk1HpzkwlGRgnI8Dt/0TVIY/cBrjkx5UXpAS07eVEKubHK67l1JRnAyKjYNRSoPXRbjRWTFyXHOLEiFsgvKmJ4zTqAMFZgPFOHzZAXpYDNUbCSwQJBrYJUgrfYgAhR9wXGInEahILMOysylVGWa0jbOGnfz2QNUoQ0bedFaVUvcSLXQAhEkoajQS2dYMs1UDELU3PrZord3wVCAw6aNKWlEzhXBHRFKMwk8p75q9jEtHRCpXEQwUR5UQo7s3UBBKczFHbiyL4ZqoYpZu6MZH9U4ZQOQxP+BRqQBUrhQhev9eaHRuUdL3VFwPnVNogtgVATHD490tA6NMFv4WtycKHtyz2mnwSeqhve4mLmm4+b/uqDYpnH2DkXWniz+NPjO/qkMTT9zdtpNoO4tYiAzOPLhQ4iOzPZ86H5RuZ98th2reXy3rlXz8Iflpr8S1n2Q+pS29yu9b7c/K88VHc9bpq1m+CdgKhN/iW4vv/z9IHNi1MX277UsYMvCe06G1zQWuu/PzQR9Ch+ZKaG8+YWotLHOqcZ12qKFxoGmjOfTk70HG/J9B1vyaBV+unzoETF7xcLHpHW+u/xyZ537VRjIlSDygKCKZpsGGjupfqwTAOSrXlXUjMYJjLkc6tcIECpOupe8J8RGyPo/+y/EGJBK6a5/+b/EU8+v+Y4AADgN/LdfxH+Qd9IAAAAAElFTkSuQmCC",
                                "width": 32,
                                "height": 32,
                                "type": "image/png",
                                "language": "eng"
                            }
                        ]
                    }
                }
            ]
        },
```


# Switching

OpenWiFi 2.1

PoE access switch content...&#x20;


# Port Speed

OpenWiFi 2.1

Configuring port speed and operation is most commonly done with PoE access switches however the same configurations are possible for all OpenWiFi device types.&#x20;

By default all ports attempt 1,000 Mb/s full duplex operation.&#x20;

```
 "ethernet": [
            {
                    "select-ports": [
                            "WAN1"
                    ],
                    "speed": 100,
                    "duplex": "half"
            },
            {
                    "select-ports": [
                            "WAN2"
                    ],
                    "speed": 1000,
                    "duplex": "full"
            },
            {
                    "select-ports": [
                            "WAN3"
                    ],
                    "speed": 100,
                    "duplex": "half"
            }
    ],
```


# Metrics

OpenWiFi 2.0

## Metrics

Several metrics are reported during intervals to the OpenWiFi Gateway. In general metrics contain traffic counters, neighbor tables, discovered clients.

Each OpenWiFi device is capable of sending statistics on SSID, LLDP, and associated Clients learned by the device.

Additionally, OpenWiFi devices expose all 802.11 management data within wifi-frames and to assist network troubleshooting and client fingerprinting solutions OpenWiFi provides dhcp-snooping for all possible client exchanges over DHCP and DHCPv6.

```
    "metrics": {
        "statistics": {
            "interval": 60,
            "types": [ "ssids", "lldp", "clients" ]
        },
        "health": {
            "interval": 300
        },
        "wifi-frames": {
            "filters": [ "probe",
                "auth",
                "assoc",
                "disassoc",
                "deauth",
                "local-deauth",
                "inactive-deauth",
                "key-mismatch",
                "beacon-report",
                "radar-detected"]
        },
        "dhcp-snooping": {
            "filters": [ "ack", 
                                "discover", 
                                "offer", 
                                "request", 
                                "solicit", 
                                "reply", 
                                "renew" ]
        }
```

The metrics data is sent to OpenWiFi Gateway at the intervals set where configurable.

Metrics must be associated with the interfaces they are to report on. For example, to send DHCP data from LAN to OpenWiFi Gateway, the following configuration would apply.

```
        {
            "name": "LAN",
            "role": "downstream",
            "services": [ "ssh", "lldp", "dhcp-snooping" ],
            "ethernet": [
                {
                    "select-ports": [
                        "LAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "static",
                "subnet": "192.168.1.1/24",
                "dhcp": {
                    "lease-first": 10,
                    "lease-count": 100,
                    "lease-time": "6h"
                }
            }
        }
    ],
```


# P4

OpenWiFi 2.0

Content coming soon...


# Services

OpenWiFi 2.0

OpenWiFi devices have global services that operate either independently system wide or as an association to a physical or logical interface.

Within the "services" configuration block, define the operating mode for each service, then associate a service with an interface.

## SSH

Secure shell may optionally be enabled on OpenWiFi devices, associated to specific interface(s), and optionally support operator defined keys or password authentication.

```
    "services": {
        "ssh": {
            "port": 22,
            "authorized-keys": {
                "items": [
                "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC0ghdSd2D2y08TFowZLMZn3x1/Djw3BkNsIeHt/Z+RaXwvfV1NQAnNdaOngMT/3uf5jZtYxhpl+dbZtRhoUPRvKflKBeFHYBqjZVzD3r4ns2Ofm2UpHlbdOpMuy9oeTSCeF0IKZZ6szpkvSirQogeP2fe9KRkzQpiza6YxxaJlWw== user@example",
          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ4FDjyCsg+1Mh2C5G7ibR3z0Kw1dU57kfXebLRwS6CL bob@work",
          "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBP/JpJ/KHtKKImzISBDwLO0/EwytIr4pGZQXcP6GCSHchLMyfjf147KNlF9gC+3FibzqKH02EiQspVhRgfuK6y0= alice@home"
                ]
            }
        }
    }
```

### Associate Service to Interface

```
        {
            "name": "LAN",
            "role": "downstream",
            "services": [ "ssh" ],
            "ethernet": [
                {
                    "select-ports": [
                        "LAN*"
                    ]
                }
            ],
```

## NTP

Network time protocol for OpenWiFi devices may be configured to listen for time synchronization from NTP sources and may also be configured to supply NTP source.

```
    "services": {
        "ntp": {
            "servers": [
            "0.openwrt.pool.ntp.org",
            "1.openwrt.pool.ntp.org"
            ]
        }
    }
```

### Associate to an Interface

```
        {
            "name": "WAN",
            "role": "downstream",
            "services": [ "ntp" ],
            "ethernet": [
                {
                    "select-ports": [
                        "WAN*"
                    ]
                }
            ],
            "ipv4": {
                "addressing": "dynamic"
            }
    },
```

## LLDP

Link Layer Discovery Protocol describes interfaces and capabilities between directly attached neighbors over Layer 2.

```
        "lldp": {
            "describe": "OpenWiFi",
            "location": "Stadium Level 2"
        },
```

Associate "lldp" as a services attribute to any interface.

## MDNS

To assist in device or service discovery over smaller networks, multicast DNS (mDNS) protocol if often used. In an mDNS environment there is no local name server for resources to leverage. mDNS zero-configuration service effectively behaves as unicast Domain Name Service (DNS).

```
        "mdns": {
            "enable": true
        },
```

Associate "mdns" as a services attribute to any interface.

## Syslog

Remote syslog systems may be configured to receive device logs in a central location. This content is standard device log and not related to telemetry for metrics and service information received by the OpenWiFi Gateway. Valid port range is from 100 - 65535 with operation over UDP or TCP.

```
        "log": {
            "host": "Syslog Server IP",
            "port": 514,
            "proto": "udp"
        },
```

Associate "log" as a services attribute to appropriate interface.

## IGMP

When enabled the OpenWiFi device will process IGMP Proxy.

```
        "igmp": {
            "enable": true
        },
```

Associate "igmp" as a services attribute to any interface participating in IGMP Proxy.


# OpenWiFi Release 2.0

Telecom Infra Project OpenWiFi

## What is OpenWiFi?

TIP OpenWiFi is an open source community project that believes in democratizing premium Wi-Fi experiences for multiple market use cases. The TIP approach to OpenWiFi creates an open source disaggregated technology stack without any vendor lock in. OpenWiFi offers premium managed Wi-Fi features, local break-out design, cloud native open source controller, and an open source AP firmware operating system tested nightly.

![Open Technology Stack - Many Platforms - Many Service Options](/files/-M_5tb3Ga4ewI08f-Ipj)

TIP OpenWiFi is the industry's first CI/CD open source Wi-Fi eco-system. Built nightly with a strong community of Wi-Fi leaders, new features are unit tested in automated RF chambers and checked from cloud to ground for Wi-Fi performance and conformance.

OpenWiFi 2.0 introduces management and telemetry based on uCentral offering expanded selection of managed devices including smaller APs and PoE access switches.&#x20;

### High Level Features

#### Each OpenWiFi AP offers:

* Multiple topologies including :
  * Bridging, Virtual LAN, VxLAN, NAT Gateway, Local Breakout, Overlay (PPPoE, L2oGRE, L2TP), Mesh, WDS&#x20;
* Multiple authentications including WPA, WPA2, WPA3, Enterprise Radius models, M-PSK
* Passpoint R1 and R2 Mobile Offload
* Encrypted Zero Touch Provisioning and Cloud Discovery
* Autonomous RRM and Channel Control
* Captive Portal & ExpressWiFi

#### Each OpenWiFi PoE Switch offers:

* IEEE802.1Q Virtual LAN
* VxLAN
* DHCP Snooping & Relay
* Multicast
* PoE
* IEEE802.1x Access Control

#### Cloud SDK in OpenWiFi offers:

* Zero Touch Provisioning&#x20;
* Firmware Management
* Integration Northbound Interface (NBI) RESTful
* Data model driven API&#x20;
* Enterprise Message Bus data access&#x20;

**OpenWiFi AP Detail List:**

* Wi-Fi 4 (n) Wi-Fi 5 (ac) Wi-Fi 6 (ax)&#x20;
* Dual Bank Bootloader
* Multi-SSID per Radio
* SSID Authentications: WPA/WPA2/WPA3 - Mixed, Personal, Enterprise
* 802.1Q VLAN per SSID&#x20;
* 802.1d Bridge Mode per SSID
* RADIUS Accounting, Interim-Accounting, NAS-IP, CUI
* Network Address Translation Gateway Mode Operation
* Network Time Protocol Client
* Management VLAN&#x20;
* Wi-Fi 6 (ax) Specific
  * BSS Coloring
  * UL/DL OFDMA sub-carrier allocation
  * Channel Switch Announcement
* Wi-Fi General Features
  * WMM® - Wi-Fi Multi Media
    * UAPSD Procedures (Unscheduled Power Save)&#x20;
    * Upstream/Downstream Queues & L3 DSCP
    * Over The Air QoS EDCH Procedures
* WMM-Admission Control (AC)&#x20;
* WMM-Power Save (PS)
* Wi-Fi Optimized Connectivity
  * (ai) Fast Initial Link Support
* Wi-Fi Agile Multiband
  * (k) Client Radio Resource Management - Directed Steering
  * (v) Network Assisted Roaming
  * (r) Fast BSS Transition
* Protected Management Frames (PMF)&#x20;
  * (w) Management Frame Encryption
* Channel Switch Announcement (CSA)
* Dynamic Frequency Selection & Transmit Power Control (DFS/TPC)
* Beacon Rate&#x20;
* Min Client Noise Immunity
* Basic Rate Control
* De-Auth RSSI Control
* Burst Beacon Support
* Per SSID Client Rate Limiting
* Promiscuous Mode Support<br>
* **Additional TIP AP NOS Features**
  * ISP WAN Profiles ( PPPoE, L2TP, L2oGRE )
  * Embedded Captive Portal (Local Splash non-auth)
  * Link Layer Discovery Protocol (LLDP)
  * Dynamic Airtime Fairness
  * Service Flow QoS&#x20;
  * Wireline & Wireless Tracing (PCAP Cloud Remote Troubleshooting)
  * Health Check Reports
  * Local Provisioning over SSID (when Cloud or WAN down)
  * Multimedia Heuristics (Detection of Unified Communication Sessions)
  * SSID Rate Limiting
  * GPS Reporting
  * Autonomous RRM Client Steering&#x20;
  * Client / AP / Network Metric Telemetry&#x20;

**Cloud SDK additional features**

* **Provisioning**&#x20;
  * Device Identity (Model, MAC, Serial Number)
  * Device Software Upgrade
  * Multiple SSID Configuration
  * Bandwidth Rate Control per SSID
  * Multi-Radio 2.4/5/6GHz control
  * AP Network Mode Control (Bridge/NAT mode)
  * Security (WPA-Personal/WPA & WPA2/3 Personal Mixed/WPA & WPA2/3 Enterprise Mixed/WPA2/3 Personal/WPA2/3 Enterprise/WEP)
  * VLAN per SSID
  * VxLAN port configuration
  * NTP Enable/Disable
  * RTLS (Location Services) Enable/Disable&#x20;
* **RF Control**
  * IEEE802.11r Fast BSS Transition per Radio Control
  * IEEE802.11k RRM Radio Information per Radio Control
  * IEEE802.11v Network Assisted Roaming per Radio Control
  * RRM Location AP Channel (uChannel) Provisioning
  * RRM Location Client Steering (uSteer) Threshold Provisioning&#x20;
* **Remote Troubleshooting and Service Assurance**
  * Syslog&#x20;
  * Health Check Reports
    * Remote DHCP, RADIUS, UE Network Analysis&#x20;
  * Remote TTY Shell&#x20;
  * Remote Packet Capture Analysis&#x20;

### **How to contribute**

If you or your company are interested in contributing to TIP Open Wi-Fi, please join the Wi-Fi Product Group by visiting [Telecom Infra Project](https://telecominfraproject.com/apply-for-membership/) to become a member.


# Ordering OpenWiFi APs

TIP Wi-Fi Member Access Point Ordering Information

TIP Wi-Fi members may contact the ODM manufacturers in the TIP Wi-Fi eco-system using the information posted within Community Confluence page.

{% embed url="<https://telecominfraproject.atlassian.net/wiki/spaces/WIFI/pages/112689187/AP+Hardware>" %}


# Getting Started

OpenWiFi 2.0

OpenWiFi 2.0 Minimum Viable Product at the end of July, 2021 enables a cloud native and cloud agnostic Software Development Kit (SDK) with management and deployment support for a wide range of Access Point and PoE network switch platforms.&#x20;

### Initial release 2.0 SDK includes:

* Zero Touch Cloud Discovery
* Firmware Management
* User Interface&#x20;
  * Device List
  * Device Reboot
  * Device LED Blink
  * Device Remote Packet Capture
  * Device Configuration
  * Device Factory Reset
  * Device Remote TTY shell
  * Remote Wi-Fi Scan
  * Associations
    * UE (Wi-Fi Clients)
    * Mesh and WDS Clients
    * MCS, NSS, RSSI, Channel, SSID, Tx/Rx
  * Device Health Check&#x20;
  * Interface Statistics
  * Device Command History

Upcoming sprint for August includes Dynamic Provisioning service support for template based device configuration.

OpenWiFi 2.0 SDK is deployable as both a Docker Compose or a Helm on Kubernetes model. See [Release 2.0 SDK](/openwifi/2.0.0/getting-started/sdk) section for installation instructions.


# Cloud Discovery

OpenWiFi 2.0

All TIP OpenWiFi devices use the same cloud discovery mechanism on initial boot.&#x20;

OpenWiFi devices ship from factory with a unique device certificate signed by the Telecom Infra Project Certificate Authority.&#x20;

When a device boots for the first time, or is factory reset, a 'first-boot' process occurs within the device. \
First-boot initiates a connection over HTTPs to the Certificate Authority requesting the unique device record information. All connections to the Certificate Authority occur over mTLS encrypted session. \
Devices use their unique certificate identity to authenticate and retrieve the location of the assigned cloud.&#x20;

![Device First Boot / Factory Cloud Discovery](/files/-Mf9lMjQQH2R0ePlhqZ8)

Once the cloud location has been learned from first-boot, the device no longer depends on this cloud discovery and will return to the assigned cloud learned from first-boot.&#x20;

Devices may periodically initiate connection to the Certificate Authority to validate their unique certificate status. This is a normal process involved in mutual TLS security models.&#x20;

When an operator or end customer seeks to change the cloud associated with their device(s), the value of the cloud stored in the Certificate Authority device record is updated. A factory reset of the device will cause first-boot to re-occur which will then discover the new cloud.&#x20;

TIP OpenWiFi ODM partners are able to manage device records directly using the Certificate Authority portal. All other users should send an email to <licensekeys@telecominfraproject.com> to request update of cloud discovery.&#x20;

&#x20;&#x20;


# Discovery without Cloud

OpenWiFi 2.0

There could be reasons cloud discovery does not complete. \
These include:

* Lack of Internet Connectivity
  * Device may require additional WAN settings
  * Network may not be connected to Internet
* No Configuration of Cloud in Certificate Authority&#x20;
  * Manufacturer may have left this value blank in the device record stored in Certificate Authority

![Manual Cloud Entry](/files/-Mf9oHgHT0ZhFMtLjylq)

When the cloud can not be automatically discovered, OpenWiFi devices will turn on a local admin web UI made available via SSID "Maverick".&#x20;

The Maverick UI will support configuring WAN interface parameters, including DHCP, Static, PPPoE, and LTE/5G settings.  Please see [Local Device Settings](/openwifi/2.0.0/getting-started/access-points/local-device-settings) for details on using Maverick. \
[<br>](/openwifi/2.0.0/getting-started/access-points/local-device-settings)Additionally the Maverick UI supports direct entry of the cloud for cases when the cloud value has not been supplied during manufacture.

For non-Wi-Fi devices such as PoE access switches, the same cloud location information may be configured using local management interface.&#x20;

![Admin / User Entered WAN or Cloud](/files/-Mf9pHz_oDyBMfDrgAtF)


# Release 2.0 SDK

TIP OpenWiFi

Release 2.0 SDK offers a number of ways to consume OpenWiFi. Available as a single Docker for just the uCentralGW or as a set of micro services offering increasing value to consume helps multiple eco-system partners use as much or as little as desired to integrate with or build a commercial product on the TIP OpenWiFi SDK.&#x20;

Features of the 2.0 SDK at July MVP include:

* RBAC based security framework
* OpenAPI compliant Northbound&#x20;
* Kafka Message Bus
* PGSql HA Cluster
* Firmware Manager&#x20;
* Central Logging Dashboard&#x20;
* User Interface&#x20;
* Docker Compose & Helm DevOps Deployment Automation

![OpenWiFi 2.0 SDK](/files/-MfinINjPKmxuNNPOndF)


# Deploy using Docker Compose

OpenWiFi 2.0 SDK

The [wlan-cloud-ucentral-deploy repository](https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy) contains a Compose file and the related files and directories to set up a local uCentral instance with Docker Compose. You'll find all related data under the `docker-compose/` directory.

### Volumes

The deployment creates local volumes to persist mostly application and database data. In addition to that several bind mounts are created: \
\
`docker-compose/certs/` directory used by multiple services\
\
Service specific data directories and configuration files located under `docker-compose/` mounted into the appropriate containers.

{% hint style="info" %}
Be aware that the deployment uses bind mounts on the host to mount certificate and configuration data for the micro services and therefore these files and directories will be owned by the user in the container. \
Since the files are under version control, you may have to change the ownership to your user again before pulling changes.
{% endhint %}

### Configuration

Changing image tags used in the deployments may be performed in `docker-compose/.env`.&#x20;

By default this file specifies the micro service image tags according to the release branch you have checked out.&#x20;

Additional configuration changes such as database settings or passwords are found in the various other service specific `.env` files.&#x20;

The rest of the configuration is done through the config files located in the appropriate subdirectories of the Compose project directory.

### Ports

Exposed port dependencies by application are listed below:\
\
`127.0.0.1:80/tcp`        - OpenWiFi-UI\
`127.0.0.1:5912/tcp`    - rttys dev\
`127.0.0.1:5913/tcp`    - rttys user\
`0.0.0.0:15002/tcp`      - OpenWiFi-uCentralGW websocket\
`127.0.0.1:16002/tcp`  - OpenWiFi-uCentralGW REST API public\
`0.0.0.0:16003/tcp`      - OpenWiFi-uCentralGW fileupload\
`127.0.0.1:16102/tcp`  - OpenWiFi-uCentralGW alivecheck\
`127.0.0.1:16001/tcp`  - OpenWiFi-uCentralSec REST API public\
`127.0.0.1:16101/tcp`  - OpenWiFi-uCentralSec alivecheck

{% hint style="info" %}
By default only the websocket and fileupload component of the OpenWiFi uCentralGW (Gateway) micro service are exposed on all interfaces. All other exposed services listen on localhost. You can change that according to your needs in the `ports` sections of`docker-compose/docker-compose.yml`.
{% endhint %}

### Certificates

The repository includes a TIP Root CA Digicert-signed (for the Gateway websocket to devices) and a self-signed certificate (for the REST API northbound and other components), which you can use to create a local deployment out of the box.&#x20;

The certificates are valid for the `*.wlan.local` domain.&#x20;

## How to

1\. First you'll have to [install Docker Compose](https://docs.docker.com/compose/install/) according to your platform specific instructions. After that clone the repository with `git clone https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy`.\
2\. The Docker Compose uCentral micro service configs use `ucentral.wlan.local` as a hostname, so make sure you add an entry in your hosts file (or in your local DNS solution) which points to `127.0.0.1` or whatever the IP of the host running the deployment is.\
3\. Switch to the Compose project directory with `cd docker-compose/`.\
4\. Spin up the deployment with `docker-compose up -d`. If your deployment was successfully created, you should see the following output with `docker-compose ps`:

```
              Name                             Command               State                                                             Ports
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ucentral_kafka_1                    /opt/bitnami/scripts/kafka ...   Up      9092/tcp
ucentral_rttys_1                    /rttys/rttys                     Up      127.0.0.1:5912->5912/tcp, 127.0.0.1:5913->5913/tcp
ucentral_ucentralgw-ui_1            /docker-entrypoint.sh ngin ...   Up      127.0.0.1:80->80/tcp
ucentral_ucentralgw.wlan.local_1    /bin/sh -c /ucentral/ucent ...   Up      0.0.0.0:15002->15002/tcp, 127.0.0.1:16002->16002/tcp, 0.0.0.0:16003->16003/tcp, 127.0.0.1:16102->16102/tcp, 17002/tcp
ucentral_ucentralsec.wlan.local_1   /bin/sh -c /ucentral/ucent ...   Up      127.0.0.1:16001->16001/tcp, 127.0.0.1:16101->16101/tcp, 17001/tcp
ucentral_zookeeper_1                /docker-entrypoint.sh zkSe ...   Up      2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp
```

5\. Since the certificate for the REST API and other components is self-signed, you have to add it to the system trust store of the containers communicating together internally via TLS. The `add-ca-cert.sh` script located in the Compose project directory does the work for you.\
You also have to trust the self-signed REST API certificate on your local machine. To achieve that you either have to add `certs/restapi-ca.pem` to your trusted browser certificates or add certificate exceptions in your browser by visiting `https://ucentral.wlan.local:16001` and `https://ucentral.wlan.local:16002` and accepting the self-signed SSL certificate warnings (make sure to visit both and add the exceptions).\
6\. Connect to your AP via SSH and add a static hosts entry in `/etc/hosts` for `ucentral.wlan.local` which points to the address of the host the Compose deployment runs on.\
7\. While staying in the SSH session, copy the content of `certs/restapi-ca.pem` on your local machine to your clipboard and append it to the file `/etc/ssl/cert.pem` on the AP. This way your AP will also trust the self-signed certificate.\
8\. Go to `http://ucentral.wlan.local` to visit the UI and login with username `tip@ucentral.com` and password `openwifi` if you didn't change the default credentials in the uCentralSec configuration.\
9\. To use the curl test scripts which are included in the  micro service repositories make sure to set the following environment variables before issuing a request:

```
export UCENTRALSEC="ucentral.wlan.local:16001"
export FLAGS="-s --cacert <your-wlan-cloud-ucentral-deploy-location>/docker-compose/certs/restapi-ca.pem"
```

### Upgrading Compose Deployments

Stop the running containers with `docker-compose down`

Check out the new branch by repeating *Step 1* from *How to*  above for the given release and `docker-compose up -d`. \
\
Don’t forget to re-add the self-signed certificates to the containers with the provided script. \
Also be aware that you may have to change back some file permissions. To obtain the most recent changes as the files are under version control, you may have to change the ownership to your user again before pulling changes.


# Deploy using Helm

OpenWiFi 2.0 SDK

OpenWi-Fi 2.0 SDK can be deployed to Kubernetes using a Helm package. The Helm package code is located at <https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/> repository.

Each micro service in the OpenWiFi SDK system has its own Helm chart that is managed in the micro service’s own repository. The assembly chart collects all the relevant micro service charts and other external dependencies like kafka, rtty, etc. and deploys them together as one cohesive release.

You can review the full list of all the assembled micro services and related dependencies here: <https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/blob/main/chart/Chart.yaml#L6>

## Installation

There are multiple ways you can install OpenWiFi SDK with assembly charts:

1. One way is by installing directly from the assembly chart’s repository. For that, you’ll need to install and extra Helm plugin that is used to pull the latest charts code from all the referenced micro services: <https://github.com/aslafy-z/helm-git>.
2. Another way, which is considered more stable, is by installing from a prepackaged bundle that is published to <https://tip.jfrog.io/ui/native/tip-wlan-cloud-ucentral-helm/> on every official uCentral release. For this approach to work, you don’t need to install any additional plugins or dependencies, just to make sure you’ve got Helm installed on your local system.

#### Directly from the Assembly repository

1. Install the helm-git pluging according to the official documentation
2. Run helm upgrade --install tip-ucentral git+<https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/@chart?ref=main>
3. You can also reference any other open branch from the deployment repository. For example, if you want to deploy using the assembly code from the v2.0.0-rc1 branch, you can just run helm upgrade --install tip-ucentral git+<https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/@chart?ref=v2.0.0-rc1>

#### Using the pre-built Helm package

1. This method doesn’t require to install anything locally other than Helm
2. &#x20;Start by adding the wlan-cloud-ucentral Helm repository to your local list of repositories by running helm repo add tip-ucentral <https://tip.jfrog.io/artifactory/tip-wlan-cloud-ucentral-helm/>
3. helm upgrade --install tip-ucentral wlan-cloud-ucentral to install the latest version, or specify the release you want to install by adding the --version x.y.z flag.

## Chart configuration using the Values file

The configuration of OpenWiFi SDK using Helm chart may be separated into layers:

1. Micro services default values - values files that are stored in micro service helm charts (i.e. <https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/helm/values.yaml> ). These values are used by default if no other parameters are supplied, so in case you have any microservice-related variables that need to be added in default installation (for example new application configuration properties), add them in the related helm chart values as they will be applied in next release update.
2. Assembly chart values - values that are stored in the assembly repository (<https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/blob/main/chart/values.yaml> ) – these are values that override default micro services values so that all uCentral components could connect to each other correctly, and the whole system can be installed as one bundle. These parameters are environment specific, and can differ between and installation of the bundle on an EKS cluster or a MicroK8s local setup.
3. Helm upgrade/install flag overwrites - these values cam be specific for each specific helm install command during execution and usually contain installation-specific values like TLS certificates, security credentials, loadbalancer configuration parameters and so on. These may be passed using --set flag or --values flag (details may be found in <https://helm.sh/docs/chart_best_practices/values/> and in micro services helm charts), or you can also save them into one file and reference this file during the helm upgrade command using the --values flag.

During deployment all values are merged as maps with priority to the level of deployment (so Environment-specific values will override any overrides from Assembly chart values and so on).

**Example**: Let’s pass environment-specific ucentralgw\.properties configuration parameter (which is probably quite common thing to test). For example, we have an environment that requires to set parameter ucentral.websocket.host.0.backlog to 1000. For that we would need to run following command, extending our base command:

```
helm upgrade --install tip-ucentral git+https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/@chart?ref=main --set ucentralgw.configProperties."ucentral\.websocket\.host\.0\.backlog"=1000
```

## Automated community deployment

OpenWiFi SDK can also be deployed to an AWS labs environment using a Github actions workflow: <https://github.com/Telecominfraproject/wlan-testing/actions/workflows/ucentralgw-deployment.yaml>.

The configuration is dynamic, and new namespaces (a.k.a environments) may be created by adjusting the json configuration in the workflow.

The json format allows to deploy or upgrade and existing environment using the latest Docker images or to specify a specific version of each micro service.

To deploy specific version to the specific environment a list of things must be done:

1. First, you need to make sure that the Docker image with the correct version exists in Artifactory, otherwise, the Helm upgrade will fail.
2. Update the json configuration in the workflow to reference the require version for the require micro service (examples are attached in the json file itself)
3. Re-run the deployment in Github actions. You can also make all the above changes in a separate branch, and re-run the workflow from that branch (using a drop-down in the top left corner in Github’s UI).


# Access Points

OpenWiFi 2.0

Initial Minimum Viable Product Release 2.0 does not include template driven device provisioning, this will be available in the next sprint.&#x20;

Given many cloud and ODM partners wish to consume the 2.0 reference stack early, some with their own device provisioning logic as part of commercial cloud controllers, the following describes uCentral based management and telemetry, interactions with the OpenWiFi SDK processing provisioning and telemetry data.&#x20;

### Device Interactions with SDK

![OpenWiFi with uCentral Management](/files/-Mf9rix2Wu8ZbuVApx2I)

OpenWiFi 2.0 follows the uCentral system. Complete data model is available [here](http://ucentral.io/docs/ucentral-schema.html). Upon discovery of the cloud, a device default or specific configuration is transferred.&#x20;

All devices are known to the cloud by their unique id and provisioned based on advertised capabilities. Each configuration generates a new unique hash value to ensure as devices report back to the cloud, their configuration state is guaranteed.&#x20;

If the cloud sends invalid configuration data or the device has insufficient ability to complete the provisioning commands, the error handling process will send this response back to the cloud.&#x20;

For example results returned to SDK from a device configuration error:&#x20;

```
"results": { 
  "serial": "aabbcc00120a",  
       "status": {    
          "error": 0,  
                "rejected": [   
                             "[W] ("A Reason will be given"
                             ],
```


# Local Device Settings

OpenWiFi 2.0 Devices

When OpenWiFi devices are unable to connect to the cloud during their initial power on from factory, this may be a result of Internet connectivity issues.&#x20;

Certain WAN connections may require credentials such as a username and password or a mobile configuration or simply static address assignment instead of dynamic.&#x20;

OpenWiFi 2.0 supports these scenarios. When a device does not have an existing configuration and is unable to contact the cloud for provisioning it enters "Maverick" mode.&#x20;

For all Wi-Fi devices this means a Wi-Fi network with the SSID 'Maverick' will become available. \
Association with and logging in to the device will permit initial WAN connectivity to be entered.&#x20;

### Using Maverick

![Maverick Login Page](/files/-Mfo4Hdy0KWC955sI9mE)

After association to the Maverick SSID, open a web browser to `http://192.168.1.1` \
Log into the OpenWiFi device with username: **`root`** and password: **`openwifi`**

![Logged into Maverick](/files/-Mfo4n2AeRqZvC2jTm4p)

When the page above is displayed, begin to configure Uplink based on the WAN requirements of the deployment.

![Uplink Configuration in Maverick](/files/-Mfo54KMmzF-30DXDPe0)

If connection uses Point to Point over Ethernet (PPPoE) username and password credentials, enter those values and save.

![PPPoE Uplink](/files/-Mfo5OrXic1S7f7gJ9UJ)

If the OpenWiFi device has a Cellular connection which is possible on device models with 4G and 5G radios, the  network Access Point Name (APN) and PIN will be required. These values are supplied by your mobile network provider.&#x20;

![Cellular Uplink](/files/-Mfo5oyi9ziq5nf_GNUv)

When dynamic address allocation is not available, static IP address assignment may be required. IPv4 and IPv6 are supported, enter these values with DNS address and save.&#x20;

![Uplink Static IP](/files/-Mfo6B1i5KnHaFW7azc-)

Otherwise leave the Uplink configuration to DHCP or cloud defaults.&#x20;

![Uplink DHCP](/files/-Mfo6PvQxFGsh8O4JAUQ)

### Manual Redirector and Certificate Upload

If under rare circumstances it is not possible to discover the OpenWiFi cloud associated with the device or there is a need to replace device certificates, this may be configured in Settings.

![Local Redirector Setting](/files/-Mfo6xCucizc5mlBjv35)

### System

It is possible to reset the device to defaults, or locally update firmware using the commands available from System.&#x20;

![System Commands](/files/-Mfo7DbyKNOHl5S8PLF-)


# Provisioning

uCentral Data Model Introduction

OpenWiFi 2.0 makes it possible for integrators of the SDK to implement commercial products leveraging OpenWiFi Gateway service with vendor supplied provisioning above OpenWiFi SDK.\
As a minimum, the OpenWiFi 2.0 SDK framework offers a Security service which handles all OpenAPI authentication northbound, and the Gateway service which provides all uCentral websocket interface functionality southbound.

![Minimum 2.0 SDK - Assumes DB is either SQLite or PGSql](/files/-Mfi-DnmLcM5HhlLhvYS)

OpenWiFi also provides options to receive telemetry and events over both OpenAPI interface as well as Kafka message bus. When using Kafka, OpenWiFi Gateway directly publishes telemetry and event topics to the bus.

In future sprints of OpenWiFi dynamic device provisioning will be available as an added micro service.&#x20;

### Gateway

OpenWiFi 2.0 Gateway implements the uCentral device management interface. uCentral specifies the data model and interface for management and telemetry of OpenWrt based devices. \
Gateway uCentral interface is a websocket JSON-RPC based design between OpenWiFi Gateway and the device running uCentral agent.

![Southbound Interface to Devices](/files/-Mfi1TiqR1fPS_3rzEqf)

\
All communications from Gateway to Device are secured using mutual Transport Layer Security (mTLS). In mTLS systems each endpoint is a unique device sharing the same signed root or intermediate trust. In OpenWiFi each device has a signed certificate, key and device identifier. These are validated by the uCentral-Gateway to establish mTLS session.&#x20;

Upon successful connection the device exchanges its capabilities with the OpenWiFi SDK. OpenWIFi SDK, via the Gateway micro service will send the entire device provisioning data as a JSON payload. \
Within OpenWiFi devices, the uCentral agent has a reader and renderer process providing serialization and validation of data sent from cloud. \
If any data presented can not be processed by the local agent, this is returned within an ERROR message using the same websocket connection.&#x20;

![High Level SDK Gateway to uCentral Agent](/files/-MfiT6HEn3ZnoD3MHqzh)

\
If the device agrees with provisioning information presented, the render process builds calls into the operating system configuration sub-system known as UCI. The Unified Configuration Interface ensures OpenWrt compliant syntax is persisted within the device.&#x20;

Configuration source of truth is the OpenWiFi SDK. Consistency of device configuration is handled with an applied hash compared by the Gateway for each device. If the value differs on device from that of the stored information in cloud, the device will be immediately resent its configuration from the OpenWiFi SDK Gateway service.&#x20;

Once present, all configuration data is preserved on device restart.

It is possible to generate device configurations outside of the OpenWiFi 2.0 SDK as shown in the minimum SDK image at the start of this page. This may occur for some integrations or may occur when the OpenWiFi Provisioning micro service is not present. In this way, integrators of commercial products are welcome to build device provisioning outside of OpenWiFi and use the OpenWiFi cloud to manage the scale, state, security and validation of device websocket communications.&#x20;


# Data Model Introduction

OpenWiFi 2.0

OpenWiFi 2.0 data model for device management is based on uCentral.&#x20;

uCentral is set to become a leading component of OpenWrt, as such will have a diverse, and worldwide developer and support base in open source.&#x20;

Within the model it is possible to provision or return state for all aspects of an OpenWiFi based device easily structured as a JSON payload.&#x20;

The complete data model may be found here : <https://ucentral.io/docs/ucentral-schema.html>&#x20;

### Organization

Each device has a Universally Unique Identifier (UUID). For each device, the configuration presented either manually, via the future Provisioning service from OpenWifi or via a commercial controller generation of provisioning data, the high level relationships of the schema may be understood as follows.

![uCentral Agent Schema Processing](/files/-MfmX_2eoyRZeRL_by9U)

\
The unique device record has a set of top level configurations. A device is referred to as a 'unit' that may have a Description, Location, TimeZone as example.  Each unit may have globals for IPv4 and IPv6 networks that are derived to lower lever interfaces in later generation. \
\
Services and Metrics are associated with logical and physical interfaces. Services enable configuration of features such as LLDP or SSH, rTTY, IGMP, 802.1x, RADIUS Proxy, WiFi-Steering, or NTP and are then associated with Interfaces as desired. \
\
Interfaces define upstream and downstream configuration over both Wi-Fi logical (SSID) and wired physical ports.&#x20;

Metrics enable visibility to the cloud for numerous states of the device. These are associated per interface and may be sent in 60 second or greater intervals and include Statistics of SSID, LLDP, Clients. Also include Health check reports of device load, network reachability, temperature. \
To assist with fingerprinting DHCP-Snooping exposes numerous interactions of IP binding to clients. Additionally wifi-frames expose all 802.11 management frames to the SDK Gateway.&#x20;

It is also possible to configure config-raw elements that will parse direct UCI commands once the device provisioning has been completed by the uCentral agent.&#x20;


# Creating a Configuration

OpenWiFi 2.0 Device Configuration

To introduce the Community to the uCentral data model structure, the below illustrates a basic Access Point configuration that assumes a typical enterprise Wi-Fi scenario of a ceiling mount or wall mount device presenting a single WAN interface with a private management network and separate  Wi-Fi network on a virtual local area network.&#x20;

### Start with Location and Radios

We will set the unit location and timezone, then proceed to configure radios.

```
{
	"uuid": 2,
	"unit": {
		"location": "TIP Lab Network",
		"timezone": "EST+5EDT,M3.2.0/2,M11.1.0/2"
	},
	"radios": [
		{
			"band": "5G",
			"country": "CA",
			"channel": "auto",
			"channel-mode": "HE",
			"channel-width": 80,
			"require-mode": "HT",
			"rates": {
				"beacon": 6000,
				"multicast": 24000
			}
		},
		{
			"band": "2G",
			"country": "CA",
			"channel": 11,
			"channel-mode": "HE",
			"channel-width": 80,
			"require-mode": "HT",
			"rates": {
				"beacon": 6000,
				"multicast": 24000
			}
		}
	],
```

In this example, a two radio device that indicates it is Wi-Fi 6 as the channel-mode values for both radios is "HE" which defines 802.11ax operation. Valid values are "HT" -High Throughput 802.11n mode, "VHT" - Very High Throughput 802.11ac mode, "HE" - High Efficiency 802.11ax mode.

Channel defines the specific channel number the radio shall operate on as an integer from 1 - 171 and may also be set to a string for "auto" mode. Channel width permits configuring the amount of RF channel the radio will operator over from 20-40-80-160 including 8080 mode (also known as 80+80) .

OpenWiFi radios may be set to require UE clients to associate to a minimum standard such as excluding any 802.11b associations depicted above with "require-mode" set to "HT" meaning 802.11n or higher clients may associate.&#x20;

Control of beacon interval and multicast rates is possible per radio as shown in the "rates" section.&#x20;

### Interfaces

OpenWiFi 2.0 offers a highly flexible model for arranging network interfaces. Multi-port devices may be easily provisioned for numerous types of network segmentation and logical network configuration. We will start with a simple WAN that has a management IP and also a VLAN sub-interface for a logical SSID in a subsequent step.&#x20;

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp", "dhcp-snooping" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
        },
```

In the above configuration block we have a WAN interface, its role is "upstream" meaning it faces the upstream in terms of service it provides (WAN). This has a direct alignment to how the device interprets a physical or logical port participates in bridge forwarding domains.&#x20;

Note we want this port to have an IP address for its management, therefore the "ipv4" configuration is associated as a child of any Ethernet WAN ports and set to DHCP.&#x20;

#### Common Config - VLAN on WAN for SSID

Imagine the OpenWiFi device is an enterprise Access Point mounted on a ceiling. These devices do not always have a LAN port. Also in an enterprise, it is likely the Wi-Fi services are in their own network segments and not subject to Network Address Translation (NAT). Since the enterprise would also not want Wi-Fi on the same network as Management, an 802.1Q Virtual LAN is used.

```
           {
                "name": "WAN100",
                "role": "upstream",
			          "services": [ "lldp", "dhcp-snooping" ],                
                "vlan": {
                    "id": 100
                },
                "ethernet": [
                    {
                        "select-ports": [
                            "WAN*"
                        ]
                    }
                ],   
```

In this next section of configuration, an additional logical interface associated to the WAN ports for the VLAN id of "100" is shown. Note there is no IP address associated to this interface, it is a layer 2 interface that will emit on any and all WAN ports with VLAN id 100.

To associate the Wi-Fi with the VLAN interface define, we continue within the WAN100 interface adding SSID services.

```
			"ssids": [
				{
					"name": "TIP OpenWiFi",
					"wifi-bands": [
						"5G", "2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWiFi",
						"ieee80211w": "optional"
					}
				},
				"services": [ "wifi-frames"]
```

&#x20;Within the "ssids" configuration block we can process an array of SSIDs. Often there may be separate "2G" and "5G" configurations. We have grouped them in this introductory example for simplicity however "2G", "5G", "5G-lower", "5G-upper", "6G" are all valid options.&#x20;

The "name" value is the advertised SSID clients will discover for this access point. Hidden is supported by setting the "hidden-ssid" to true. \
Which operating mode is determined by "bss-mode".  The "bss-mode" is a highly flexible operating parameter to determine "ap", "sta", mesh", "wds-ap", "wds-sta", "wds-repeater" radio modes of operation.

Security of the SSID is determined using the "encryption" section. Many options are possible, in this initial example, a WPA-PSK2 shared key encryption is shown. \
Lastly, for devices that support, 802.11w protected management frames are defined as optional for this SSID.  This may also be disabled or required.&#x20;

Metrics for wifi-frames will be described next.

#### Sending Data

Add metrics to our configuration that will help expose state of the Wi-Fi network and its services to the cloud.&#x20;

```
	"metrics": {
		"statistics": {
			"interval": 120,
			"types": [ "ssids", "lldp", "clients" ]
		},
		"health": {
			"interval": 120
		},
		"wifi-frames": {
			"filters": [ "probe",
				"auth",
				"assoc",
				"disassoc",
				"deauth",
				"local-deauth",
				"inactive-deauth",
				"key-mismatch",
				"beacon-report",
				"radar-detected"]
		},
		"dhcp-snooping": {
			"filters": [ "ack", 
									"discover", 
									"offer", 
									"request", 
									"solicit", 
									"reply", 
									"renew" ]
		}        
	},
```

Within metrics it is possible to define the interval for sending information to the cloud. Additionally the type of information sent is defined here. In this example configuration there are associated services to interfaces along the way. This included LLDP and dhcp-snooping and wifi-frames.&#x20;

Within each uCentral device, the agent has a global health check feature that includes memory, cpu, temperature operating states in addition to performing various network and service health tests. The interval at which these reports are sent to the cloud is configured within health.&#x20;

For all SSIDs that have wifi-frames associated as a service, the listed management frame types will be gathered and sent to the cloud, on each interval.&#x20;

To assist with fingerprinting and client troubleshooting, dhcp-snooping sends the cloud all current client DHCP and DHCPv6 state.&#x20;

#### Global Services

The final section of the simple configuration example turns on LLDP and SSH where those services were associated to interfaces listed above.&#x20;

```
	"services": {     
		"lldp": {
			"describe": "TIP OpenWiFi",
			"location": "LivingLab"
		},
		"ssh": {
			"port": 22
		}
	}
}
```

The complete simple configuration file as described in this page may be downloaded here:<br>

{% file src="/files/-MfiSNxzRQo2eOj5EOZ6" %}
SimpleConfig\_Wi-Fi\_VLAN
{% endfile %}


# User Interface

OpenWiFi 2.0

Release 2.0 uses a Single-Page Application (SPA) as an example user interface built using React to demonstrate several interactions using the northbound OpenAPI.&#x20;

### Login to OpenWiFi SDK

![Login Page](/files/-MfiqBJf7DppBlPsXsmG)

Default username is: **`tip@ucentral.com`** and password is: **`openwifi`**

### **Base Navigation**

A left side navigation menu provides direction to major feature or service settings.&#x20;

![Left Navigation](/files/-MfnhlbZrvc4g_F9d4IK)

### Internationalization

OpenWiFi 2.0 SDK supports multiple languages. Simply select the desired language from the right drop down for pages to re-populate accordingly.&#x20;

![](/files/-MfniuBz0cWAR4EFUMSM)

### Devices

Upon login the first page presented is a Devices table. This table reflects all discovered and managed devices known by the OpenWiFi SDK.

![Devices Table](/files/-Mg1SJLAc8ILfBbuHBCP)

Devices table indicates device Connected or Disconnected state in the first column with green and red respectively.

Certificate column indicates invalid, valid with mismatch serial, or valid device certificate identity state as red crossed seal, yellow seal and green seal respectively.

Serial Number column links to the device record.&#x20;

Compatible model, Tx, Rx, and connected IP Address present basic information of the device type and its connection.&#x20;

Three final columns provide Details (also obtained by selecting the serial number), Wi-Fi Analysis presenting current Wi-Fi associations and their performance and Refresh commands.  &#x20;

### Displaying Associations

From the Devices table, second from right column icon the WiFi Analysis may be accessed. This may also be accessed within the Device View page of a single record along the top right of Statistics section.&#x20;

![Wi-Fi Analysis](/files/-Mg1SSN4qN3C1tQdrvjj)

Within the WiFi Analysis page, all active associations are displayed with the ability to view approximately the last 30 minutes of data reported from the Access Point.&#x20;

For each association the device MAC address, mode of connection and SSID are displayed. This will include end devices as well as Wi-Fi infrastructure such as WDS and Mesh associations.&#x20;

![](/files/-MfitUj_K7xXs8QnFH_B)

Associations have RSSI, Rx Rate & Bytes, Tx Rate & Bytes, MCS negotiated, Number Spatial Streams and IP Address information.  &#x20;

### Dashboard View

OpenWiFi SDK provides visual indications on the overall health of the deployed Wi-Fi network. this includes Device Status for connected and non-connected devices. Device health indicating percentage of devices failing a health check. Distribution of devices by vendor in the network and by model.&#x20;

![Dashboard View](/files/-Mg1SowZVnkVGXZQfR6x)

Additionally, verified certificates or serial mismatch certificates, number of Command actions from all Gateways to devices and devices with greater than 75% memory utilization, greater than 50% less than 75% memory and less than 50% utilization are displayed.&#x20;

![](/files/-Mfpa_NXLgWxAPBFnXuL)


# Devices

OpenWiFi 2.0 SDK

Each device presents Metrics and Health check  data to the Gateway. Devices view displays this information in the following organization:

* Status&#x20;
* Configuration
* Logs
* Health
* Commands
* Statistics
* Command History

![Initial Device View](/files/-Mfiy8HpuYvhnSe6d2_V)

### Status

Connection status reflects the Gateway to Device current communications status.\
Uptime and Last Contact reflect communication state. \
Load indicates processing load on the device. \
Memory Used indicates free memory on the device. <br>

![Device Status](/files/-MfiyoIZ6_oFRQv1dvvs)

### Configuration

Device UUID, Serial Number, MAC Address and Device Type are displayed.\
Last configuration update date and timestamp reflects the last time a "configure" action completed on the device. \
Password may be set and device notes may be added.&#x20;

![Device view Configuration Panel](/files/-MfizXN0_OSzSFxAQICt)

### Logs

Log history of the device is presented within Logs. Expand the tile selecting the down arrow.&#x20;

![](/files/-Mfj-XDn-v5XOz2PuH2n)

### Health

Health score is an active tile reflecting the device health out of a score reported by the device to Gateway. Health metrics are configured on the device based on chosen data model options. When the device falls out of 100%, this tile changes to red. Expanding the tile will present all health reports. Those with less than 100% score will contain reasons for the result from this interface.

![](/files/-Mfj-BQkE8-QtL6A2IFN)

### Commands

Commands tile provides a number of administrative actions for the user:

| Command          | Action                                                  |
| ---------------- | ------------------------------------------------------- |
| Reboot           | Warm Restart remote device                              |
| Firmware Upgrade | Initiate firmware upgrade process                       |
| WiFi Scan        | Initiate remote scan of surrounding Wi-Fi               |
| Connect          | Initiate an rTTY Remote Shell session                   |
| Blink            | Set LEDs to On, Off or Blinking state                   |
| Trace            | Initiate a remote Packet Capture                        |
| Factory Reset    | Hard Reset remote device - destroys device local config |
| Configure        | Upload Device Configuration                             |

![Commands Tile](/files/-Mfj-bLadptNj91kIjik)


# Commands

OpenWiFi 2.0 SDK

Within the devices view, the Commands tile offers a number of features and administrative actions. \
Each of these represent API calls exposed on the OpenAPI northbound interface from the SDK.&#x20;

### Reboot

Selecting the Reboot action will prompt the below dialog. Options presented permit an immediate reboot or a scheduled reboot based on date and time.&#x20;

![](/files/-MfnVogWkTF5DIZ6UhZ-)

### Firmware Upgrade

Multiple methods exist to execute a remote Firmware Upgrade of a device. When selecting Firmware Upgrade via the Commands tile, a simple dialog to upgrade immediately or at a scheduled time is presented. Alternatively using the Firmware Management Service provides a complete solution including managed access to all TIP firmware images.&#x20;

![](/files/-MfnWeoZYndnSE8GO__h)

### Wi-Fi Scan

OpenWiFi devices may perform channel scanning and return this neighbor and RF data to the SDK in an on demand or ongoing manner.&#x20;

![](/files/-MfnXBaEzH8mZigXZ4wi)

#### Wi-Fi Scan Results

Scan operations function over all channels. If 5GHz channels do not display in the returned results ( either via the UI or over API ) this indicates the device is configured in a DFS channel for which it may not return survey scans at this time.&#x20;

![](/files/-MfnXrGZfS6-4JXZY6iA)

### Connect

OpenWiFi enables remote connection to any managed device using rTTY encrypted shell session. Selecting Connect will cause a browser tab to open with the login session to current device.

![](/files/-MfnYHNWMTaYydU_PfpH)

### Blink

To assist with remote identification of devices in the network, it is possible to turn the LED lights On, Off, of continuous blinking. This may be run on-demand or scheduled.&#x20;

![](/files/-MfnYf0L9TLrBQPe23Zq)

### Trace

Trace feature enables a remote packet capture to occur on the managed device, over a specified period of time or amount of traffic, returning the "pcap" packet capture file locally to the OpenWiFi admin user.&#x20;

![](/files/-MfnZ5y2hrNMBo4TBKCT)

Once complete the user is asked to open or save the packet capture file locally.

![](/files/-MfnZtLBpyzy4KL9wsNu)

### Factory Reset

It is possible to revert a device to initial out of box state from the OpenWiFi SDK. Sending a Factory Reset will remove all configuration on the device and optionally reset the discovered cloud stored as the 'Redirector' in the device configuration.&#x20;

![](/files/-Mfn_ijg3QBitKnjaOyk)

{% hint style="info" %}
Note: When Redirector is not kept, devices will re-contact the Certificate Authority to re-discover their OpenWiFi cloud address
{% endhint %}

### Configure

Prior to the introduction of OpenWiFi 2.0 Provisioning Service, device configuration is done through creation of the JSON provisioning file and either loading that file or applying its contents using the dialog presented via Configure. The same options exist when using the API directly.&#x20;

![](/files/-MfnaBPQw-UFBnGw5NO7)


# Statistics

OpenWiFi 2.0 SDK

Each device page presents statistics in traffic terms per interface as a line graph of bandwidth over time.

![](/files/-Mfnb1J51NAzZFFd-NUN)

The generated image may be downloaded for offline use.&#x20;

![](/files/-MfnbGm-BNQxFXkX_nUL)

Accessing Wi-Fi Analysis and Last Statistics may be found at the top right of Statistics tile.&#x20;

![](/files/-MfneGO_oKIdvBr7GMCv)

### Wi-Fi Analysis

Operating channels, channel width, noise floor and transmit power are the first values reported in Radios table.&#x20;

Viewing associations, from the Associations table, and their use is important in terms of bandwidth and connection quality. Wi-Fi Analysis helps visualize each client association, this could be an end user device or a WDS or Mesh association.&#x20;

Each association is known by their MAC address or BSSID value. The mode of connection will indicate if an end user client device entering the "ap" or if a client is associated as "wds" or "mesh.

![](/files/-MfncG3QjBSTnC3vaa9u)

The access point view of RSSI, Rx and Tx Rate, Modulation Coding Scheme and Number of Spatial Streams are exposed for each association.&#x20;

Using the slider along the top, the last 15 to 30 minutes of performances data may be viewed.&#x20;

### Latest Statistics

The option to view Latest Statistics is at time of the MVP release, intended to help the Community see on a per device basis how much, or how little depending on device configuration, is being sent to the OpenWiFi Gateway in terms of telemetry. &#x20;

![](/files/-MfndtZ8tdDUqSIVx9W4)


# Command History

OpenWiFi SDK 2.0

Multiple events are recorded in the Command History tile. Each line item will have a Result, Details, and Delete action.&#x20;

![Command History Tile](/files/-MfnfB_7pvCJNwn5siHL)

When an rTTY session is executed, this is a displayed command history. Selecting the Result icons will display the Success or Fail of the command.

![rTTY Command History](/files/-MfnfZvy0vQE13Jr9twU)

Each provisioning event is reflected as a configure command history. To see the entire JSON payload and the result, including success or error with message, simply select Details to expand the dialog below with this data. A date and time in the third column indicates when the configure command was executed successfully.

![Configure Command History](/files/-MfnffooIj_jYQYZhhOX)

If a provisioning event has failed to complete, its command history for configure will show as pending.

![configure Pending Command History](/files/-MfngzWs0V4w0D8uYU0r)

Remote packet capture is shown as the trace command history. When packet captures are persisted in the OpenWiFi SDK, they may be downloaded again through the cloud download icon.

![trace Command History](/files/-MfngfjE6ntlHxIZN-Hb)


# Firmware

OpenWiFi 2.0 SDK

Firmware management service integrates across all OpenWiFi Gateways deployed in a cluster enabling updates to running firmware either from the latest published version, or any other released version.&#x20;

### Dashboard

Firmware dashboard provides a single view for overall health of deployed device firmware. Latest firmware charts, device  firmware version distribution, distribution of device by type and current connected devices.

![Firmware Dashboard](/files/-Mg1T5aTc-bXSK3ErbNo)

### Device Table

From the Devices table, any device with a newer firmware published by TIP OpenWiFi is indicated with a yellow icon. Selecting this icon presents the option to upgrade to latest or specify which firmware to use.&#x20;

![Firmware Control in Device Table](/files/-Mg1TOwYWUzWW3tIPAO6)

When the upgrade has been sent successfully, a green Success dialog will display in the upper right  on the screen. Devices with latest firmware version will show a green firmware icon in the Devices row.&#x20;

### Firmware Management Service

Viewing the contents of Firmware Management Service is available from the left navigation, select Firmware.&#x20;

Once in Firmware, it is possible to search by device model for all known firmware revisions.&#x20;

![Firmware Management Service](/files/-Mfo-bX168AhikVGgWna)

If in the Device Table reference above,  instead of selecting Upgrade to Latest, the specific URI location of any available firmware is found using the Firmware table.&#x20;

Selecting Details will present information for any firmware row, including the URI which may be copied into the Choose Custom Firmware dialog prompt accordingly.&#x20;

![Firmware Entry Details](/files/-Mfo04pCa2k-sPYkkOl4)


# API

OpenWiFi 2.0 SDK

OpenWiFi services follow the OpenAPI 3.0 definition. \
The complete API is described here: [OpenWiFi SDK OpenAPI](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/openapi/ucentral/ucentral.yaml)

### Devices

OpenWiFi devices are Access Points or Switches (and other forms in the future), that support the uCentral configuration schema. Devices contact a controller using the uCentral protocol.

### Communication

The communication between the controller and the devices use the uCentral protocol. This protocol is defined in this [document](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/main/PROTOCOL.md).

### Device Configuration

A device is configured by ingesting a uCentral configuration. That configuration will be provided by the SDK Gateway as a result of a command through the API. Command processing occurs when the device's configuration is older than what is known in the SDK Gateway. The uCentral schema is a JSON document containing parameters to set on a particular device.

### SDK Gateway Communication

In order to speak to the Gateway, you must implement a client that uses the OpenAPI definition for the gateway. You can find its [definition here](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/main/openapi/ucentral/ucentral.yaml). You cannot talk to a device directly.

### API Basics

#### Device `serialNumber`

Throughout the API, the `serialNumber` of the device is used as the key. The `serialNumber` is actual the MAC address of the device, without its `:`. The `serialNumber` is guaranteed to be unique worldwide. The device uses its serial number to identify itself to the controller.

#### Device Configuration

The configuration can be supplied when the device is created. After the device is created, the only way to modify the configuration is by using the `/device/{serialNumber}/configure` endpoint. The Gateway maintains the versioning of the configuration through the use of a `uuid`. The Gateway maintains that number and will ignore anything your supply. The controller also does minimum validation on the configuration: it must be a valid JSON document and must have a `uuid` field which will be ignored.

#### Device Capabilities

Device capabilities are uploaded to the Gateway when the device performs its initial connection. Capabilities tell the Gateway what the device is able to support. The Gateway uses this information to provide a configuration matched to the device type.

#### Command Queue

The Gateway will send commands to the devices. These commands are kept in a table and are sent at the appropriate time or immediately when the device connects. \
For example, you could ask a device to change its configuration, however it might be unreachable. Upon next device connection, this configure command will be sent. The list of commands is retrieved using the `/commands` endpoint.

#### Commands

Several commands maybe sent to a device: reboot, configure, factory reset, firmware upgrade, LEDs, trace, message request, etc. The API endpoint `/device/{serialNumber}/{command}` details all the available commands.

#### Device Specific Collections

For each device, a number of collections are collected and kept in the database. Here's a brief list:

* `logs`: device specific logs are kept. A device amy also send something it wants added into its own logs. `crashlogs` are a special type of logs created after a device has had a hard crash.
* `statistics`: statistics about the device. This is current la JSON document and will be documented at a later date.
* `healthchecks`: periodically, a device will run a self-test and report its results. These includes anything that maybe going wrong with the current device configuration. A `sanity` level is associated to the degree of health of the device. 100 meaning a properly operating device.
* `status`: tells you where the device is and how much data is used for protocol communication.

### The API is for an operator

This API is meant for an operator who would have to help a subscriber in configuring devices, reboot, manage  firmware, etc.&#x20;


# OpenAPI Definitions

OpenWiFi 2.0 SDK

### Where is the OpenAPI?

This uses OpenAPI definition 3.0 and can be found [here](https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/main/openapi/ucentral/ucentral.yaml). All endpoints begin with `/api/v1`.

### API Flow

API endpoints are secured with bearer-token authentication using end-point `/oauth2`. \
Once you obtain `access-token`, you will need to pass it in the headers under `Authorization: Bearer <place your token here>`.

### Basic Entities

The API revolves around `devices`, `commands`, and `default_configurations`.\
To retrieve a list of `devices` to know what is available and then use the endpoint `device` to access all device specific information. \
To retrieve `commands` and `default_configurations` follow those endpoints. \
Most operations rely on the `serialNumber` of a device. That `serialNumber` is unique and generated on the device. Serial Number matches the device's MAC address.

* `devices`: The list of all devices in the system. This maybe very large, pagination is recommended.
* `commands`: The list of commands issued by the system. This list could also be large.
* `default_configurations`: A list of default configurations used to supply existing devices.

### Relationships

A device is a physical (or potentially logical) entity using the ucentral protocol. \
Currently, APs and Switches are the only devices used. A device has several attributes. \
Additionally, other collections are supported for each device:

* `logs`: Specific for a device. Logs originate from the device or associated with the device by some mechanism.
* `healthchecks`: Reports from the device coming periodically after device self tests.
* `statistics`: Periodically produced by the devices and document actual state data from each device.
* `capabilities`: This details the actual data model supported by the device.

The `device` entry point is also used to query about the `status` of the device and used to inject certain commands for a specific device. \
Commands supported for each device:

* `reboot`: This will force the device to reboot.
* `configure`: Configure sends a new configuration to a device.
* `factory`: Forces the device to perform a factory-reset.
* `upgrade`: Forces the device to do a firmware upgrade.
* `leds`: Ask the device to flash its LEDs or turn them on or off.
* `trace`: Performs a remove LAN trace. Once the trace is completed, the produced file may be removed using the `file` endpoint.
* `command`: Performs a proprietary command. The meaning depends on the device.
* `request`: Request an immediate message of type `state` or `healthcheck`.

The `file` end point is used to retrieve and remove files produced by the Gateway. Currently this is limited to the results of a `trace` command. The file name will always match the `uuid` of the command that produced it. If several files are needed, the files will be named `uuid`, `uuid.1`, `uuid.2`, etc.

### Dates

All dates should use the format defined in [RFC3339](https://tools.ietf.org/html/rfc3339). All times are UTC based. Here is an example:

```
1985-04-12T23:20:50.52Z
```

### Command `when` parameter

Most commands use a `when` parameter to suggest to the device when to perform the command. This is a *suggestion* only. The device may decide to perform the command when it is optimal for itself. It maybe busy doing something and decline to do a reboot for several minutes for example. The device may reply with the actual `when` it will perform the command.

### Configuration UUID

The gateway manages the configuration UUID. So if you set a UUID for a configuration, it will be ignored. The gateway uses UUID as versioning. The UUID is unique within a single device. The resulting UUID or a configuration change is returned as part of the `configure` command.


# Monitoring

OpenWiFi 2.0 Telemetry and Analysis

TIP OpenWiFi software stack is envisioned to have a rich telemetry data that can be extracted, transformed and stored for analytics purposes. This section will outline various integration using the current capabilities of the OpenWiFi release. These integrations will provide examples for the community to enrich, adopt and productize.&#x20;

The current release of OpenWiFi utilizes both a rich open API and Kafka for retrieving telemetry information from Access Points and  SDK services. For the purpose of this section and Release 2.0  we will be showcasing Kafka integration with third party monitoring subsystems.

## Kafka Data Source

The current release of 2.0 SDK architecture contains a Kafka broker for the purposes inter-services communication, state, healthcheck, device provisioning state  producing and consuming Kafka topics. You can find the latest information related to Kafka topics here: <https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/KAFKA.md#kafka-integration>&#x20;

The current Kafka topics used for this monitoring integration are:

* state
* healthcheck

All Kafka messages carry a JSON payload, example of a healthcheck message is as follow:

```
{
   "system":{
      "id":179033843641952,
      "host":"https://gw-ucentral-dev01.cicd.lab.wlan.tip.build:17002"
   },
   "payload":{
      "data":{
         "interfaces":{
            "up0v0":{
               "dhcp":false,
               "location":"/interfaces/0"
            }
         },
         "unit":{
            "memory":36
         }
      },
      "sanity":67,
      "serial":"112233445566",
      "uuid":1627357625
   }
}
```

A state Kafka message looks like:

```
{
   "system":{
      "id":179033843641952,
      "host":"https://gw-ucentral-dev01.cicd.lab.wlan.tip.build:17002"
   },
   "payload":{
      "serial":"112233445566",
      "state":{
         "interfaces":[
            {
               "clients":[
                  {
                     "ipv6_addresses":[
                        "fe80:0:0:0:206:aeff:fee0:69ad"
                     ],
                     "mac":"07:06:06:06:06:06",
                     "ports":[
                        "eth1"
                     ]
                  },
                  {
                     "ipv4_addresses":[
                        "192.168.4.1"
                     ],
                     "mac":"01:02:03:04:05:06",
                     "ports":[
                        "eth1"
                     ]
                  }
               ],
               "counters":{
                  "collisions":0,
                  "multicast":63,
                  "rx_bytes":14725,
                  "rx_dropped":0,
                  "rx_errors":0,
                  "rx_packets":209,
                  "tx_bytes":13571,
                  "tx_dropped":0,
                  "tx_errors":0,
                  "tx_packets":80
               },
               "dns_servers":[
                  "1.1.1.1",
                  "9.9.9.9"
               ],
               "ipv4":{
                  "addresses":[
                     "192.168.4.33/24"
                  ],
                  "leasetime":600
               },
               "location":"/interfaces/0",
               "name":"up0v0",
               "uptime":31349
            },
            {
               "counters":{
                  "collisions":0,
                  "multicast":0,
                  "rx_bytes":0,
                  "rx_dropped":0,
                  "rx_errors":0,
                  "rx_packets":0,
                  "tx_bytes":1058,
                  "tx_dropped":0,
                  "tx_errors":0,
                  "tx_packets":5
               },
               "ipv4":{
                  "addresses":[
                     "192.168.1.1/24"
                  ]
               },
               "location":"/interfaces/1",
               "name":"down1v0",
               "uptime":31355
            }
         ],
         "radios":[
            {
               "active_ms":24459917,
               "busy_ms":1173593,
               "channel":149,
               "channel_width":"80",
               "noise":4294967198,
               "phy":"soc/40000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0",
               "receive_ms":4647,
               "transmit_ms":88272,
               "tx_power":30
            },
            {
               "active_ms":24456321,
               "busy_ms":11878205,
               "channel":11,
               "channel_width":"20",
               "noise":4294967204,
               "phy":"platform/soc/a000000.wifi",
               "receive_ms":1329,
               "transmit_ms":73228,
               "tx_power":30
            },
            {
               "active_ms":24458178,
               "busy_ms":1162312,
               "channel":36,
               "channel_width":"80",
               "noise":4294967192,
               "phy":"platform/soc/a800000.wifi",
               "receive_ms":12339,
               "transmit_ms":86904,
               "tx_power":23
            }
         ],
         "unit":{
            "load":[
               0.190921,
               0.263188,
               0.240726
            ],
            "localtime":1627418941,
            "memory":{
               "free":348540928,
               "total":520409088
            },
            "uptime":31386
         }
      },
      "uuid":1627357625
   }
}
```


# ELK Integration

Kafka integration with ELK

The  following pipeline is used to leverage Kafka messages being emitted from OpenWiFi 2.0 for ELK (Elastic Logstash Kibana) stack integration :

![](/files/-MfjncMwUzU8UZV0BmHK)

TIP OpenWiFi project has deployed an ELK stack for community members to access [here](https://kibana.lab.wlan.tip.build/).

The key for this integration is to use a plugin that enables Kafka to be used as an input for Logstash. This plugin can be found [here](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html). Once installed then Logstash  can be configured to listen to  the input source of the Kafka broker that is deployed as part of OpenWiFi SDK 2.0 release and its appropriate topics.  Here is a  [sample](https://github.com/Telecominfraproject/wlan-cloud-ucentral-analytics) Logstash configuration.&#x20;

It is important to note that Logstash provides the ability to transform  messages which then can be pushed to Elasticsearch for storage with effective indexing. Finally Kibana is used to create visualization such as this:&#x20;

![](/files/-Mfjp_ev6nWkh-k6g6FL)

![](/files/-MfjppDWd4xOcI7GGbjE)

The following [repository](https://github.com/Telecominfraproject/wlan-cloud-ucentral-analytics) will be used to store necessary files for integration examples for monitoring.


# Basic Device Provisioning

OpenWiFi 2.0

One of the benefits of the new data plane in OpenWiFi 2.0 is the flexibility of physical port to logical forwarding that is easily conveyed through configuration structures.

New protocol support is both easily added to the system as well as associated with interfaces by their role in the device.&#x20;

The following sections offer feature configuration examples.&#x20;

For complete reference to the device data model please refer [here.](/openwifi/2.0.0/provisioning/data-model-introduction)&#x20;


# Bridge Mode SSID

OpenWiFi 2.0

Creating logical bridges may be done through association to named "interfaces". \
To associate a logical SSID interface directly to the WAN, place SSID configuration within the interface have a "role" of upstream.&#x20;

{% tabs %}
{% tab title="SSID to WAN" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},
			"ssids": [
				{
					"name": "OpenWifi",
					"wifi-bands": [
						"2G", "5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
				}
			]
```

{% endtab %}

{% tab title="Dual SSID to WAN" %}

```
"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},
			"ssids": [
				{
					"name": "OpenWifi_2GHz",
					"wifi-bands": [
						"2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
                },
                {
					"name": "OpenWifi_5GHz",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
				}
			]
```

{% endtab %}

{% tab title="Dual SSID Bridge Rate-Limit to WAN" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},
			"ssids": [
				{
					"name": "OpenWifi_2GHz",
					"wifi-bands": [
						"2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					},
					"rate-limit": {
						"ingress-rate": 100,
						"egress-rate": 100
					}
				},
                {
					"name": "OpenWifi_5GHz",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					},
					"rate-limit": {
						"ingress-rate": 250,
						"egress-rate": 250
					}
				}
			]
```

{% endtab %}
{% endtabs %}


# NAT Gateway Mode SSID

OpenWiFi 2.0

Creating a NAT Gateway is easily done via association to an interface having a role of "downstream".

{% tabs %}
{% tab title="Dual SSID NAT" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
        },
		{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh", "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.1.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
			},
			"ssids": [
				{
					"name": "OpenWifi_2GHz",
                    "role": "downstream",
					"wifi-bands": [
						"2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
				},
				{
					"name": "OpenWifi_5GHz",
                    "role": "downstream",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
				}				
			]

		}
```

{% endtab %}
{% endtabs %}

Based on the above Dual SSID NAT configuration, a unique 2GHz and 5GHz SSID are created and logically bound to the same NAT LAN side network.&#x20;

The NAT service is inherited by the downstream role with DHCP addressing defined according to the range set within the downstream "ipv4" configuration.&#x20;


# Multi-VLAN SSID

OpenWiFi 2.0

The most common use case for VLANs and Wi-Fi is likely the service provider, venue, enterprise where Wi-Fi traffic is not subject to address translation. This is the example that will be shown, however it is entirely possible to create multiple downstream VLANs with SSIDs as well. Simply replace the logic of upstream to downstream where desired.&#x20;

{% tabs %}
{% tab title="Single SSID VLAN" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp", "dhcp-snooping" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
        },
            {
                "name": "WAN100",
                "role": "upstream",
                "vlan": {
                    "id": 100
                },
                "ethernet": [
                    {
                        "select-ports": [
                            "WAN*"
                        ]
                    }
                ],         
			"ssids": [
				{
					"name": "VLAN 100 Wi-Fi",
					"wifi-bands": [
						"2G", "5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
                }
			]
		},
```

{% endtab %}

{% tab title="Dual SSID - Dual VLAN" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp", "dhcp-snooping" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
        },
            {
                "name": "WAN100",
                "role": "upstream",
                "vlan": {
                    "id": 100
                },
                "ethernet": [
                    {
                        "select-ports": [
                            "WAN*"
                        ]
                    }
                ],         
			"ssids": [
				{
					"name": "VLAN 100 Wi-Fi",
					"wifi-bands": [
						"2G", "5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
                }
			]
		},
			{
				"name": "WAN200",
				"role": "upstream",
				"vlan": {
					"id": 200
				},
				"ethernet": [
					{
						"select-ports": [
							"WAN*"
						]
					}
				],         
			"ssids": [
				{
					"name": "VLAN 200 Wi-Fi",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					}
				}
			]
		},
```

{% endtab %}
{% endtabs %}

In all cases the WAN port without VLAN id is using DHCP to obtain a management IP address. \
Each additional "upstream" role interface with an SSID associated have no IP configuration.


# ExpressWiFi

OpenWiFi 2.0

At home, in a cafe, or on the go, Express Wi-Fi gives you access to fast, affordable, and reliable internet so you can make connections that matter.

Express Wi-Fi partners with service providers to deliver great wi-fi to people when and where it's needed.

For information about becoming an expressWIFI partner please visit their [site.](https://expresswifi.fb.com/)

![](/files/-Mfosbs01fgZxpuO3X26)

### Configuration&#x20;

ExpressWiFi builds a captive portal experience using a control plane protocol called OpenFlow. \
Configuring OpenWiFi for use with expressWiFi is as simple as defining a downstream interface and associating with an SSID and the open-flow service.&#x20;

{% tabs %}
{% tab title="expressWIFI" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
        },
		{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh", "lldp", "open-flow"],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.1.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
            },
			"ssids": [
				{
					"name": "ExpressWiFi",
					"wifi-bands": [
						"5G", "2G"
					],
					"bss-mode": "ap"
				}
			]
		}
	],
		"services": {
		"lldp": {
			"describe": "OpenWiFi - expressWiFi",
			"location": "Hotspot"
		},
		"ssh": {
			"port": 22
		},
		"open-flow": {
			"controller": " IP / FQDN of expressWiFi Controller " 
		}
	}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
TLS Security is coming to OpenWiFi OpenFlow implementation in next sprint
{% endhint %}


# WDS

OpenWiFi 2.0

Wireless Distribution System (WDS) supports an Access Point, Station and Repeater mode of operation. OpenWiFi 2.0 supports all three.&#x20;

In the below example, the LAN side of the Access Point at the top of the topology will be wirelessly bridged to the LAN side of the Access Point Station at the bottom of the topology.&#x20;

{% tabs %}
{% tab title="WDS-AP" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
		},
		{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh", "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
            "ssids": [
				{
					"name": "OpenWifi_WDS_AP",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "wds-ap",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					},
                    "roaming": {
						"message-exchange": "ds",
						"generate-psk": true
					}
                }
			],            
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.10.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
			}
		}
	],
```

{% endtab %}

{% tab title="WDS-STA" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
		},
		{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh", "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
			"ssids": [
				{
					"name": "OpenWifi_WDS_AP",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "wds-sta",
					"encryption": {
						"proto": "psk2",
						"key": "OpenWifi",
						"ieee80211w": "optional"
					},
                    "roaming": {
						"message-exchange": "ds",
						"generate-psk": true
					}
                }
			],
	}
```

{% endtab %}
{% endtabs %}

In this configuration, LAN clients of the WDS Station AP receive IP addresses from the WDS Access Point AP from its LAN side DHCP service, via WDS link at 5GHz.&#x20;


# Mesh

OpenWiFi 2.0

OpenWiFi Mesh has been designed to eliminate configuration complexity while also remaining capable of advanced topology designs including Multi-Gateway, Multi-SSID, VLAN, and Zero Touch Mesh onboarding.&#x20;

The physical wired interface(s) to participate in the mesh topology egress are defined with the protocol "mesh".

The logical wireless interface(s) to participate in mesh topology are defined by their bss-mode set to "mesh".

{% tabs %}
{% tab title="Basic Mesh" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
            "tunnel": {
				"proto": "mesh"
			},           
			"services": [ "lldp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},         
			"ssids": [
				{
					"name": "transit",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "mesh",
					"encryption": {
						"proto": "psk2",
						"key": "meshpassword",
						"ieee80211w": "optional"
					}
				},
                {
					"name": "2GHz Clients",
					"wifi-bands": [
						"2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
                        "key": "OpenWiFi",
						"ieee80211w": "optional"
					}
				},                  
					{
						"name": "5GHz Clients",
						"wifi-bands": [
							"5G"
						],
						"bss-mode": "ap",
						"encryption": {
							"proto": "psk2",
							"key": "OpenWiFi",
							"ieee80211w": "optional"
						}					

					}
			]
		},
```

{% endtab %}
{% endtabs %}

In this basic mesh, dual SSIDs are configured for clients while an SSID for mesh transit is configured for IEEE802.11s client associations. Additional mesh clients simply use the same approach, no other configuration is required for the client to participate in this mesh.&#x20;

Advanced examples with VLANs and roaming are all possible by adding additional configuration steps.&#x20;


# Roaming RRM and SON

OpenWiFi 2.0

Radio Resource Management and Self Organizing Network features in OpenWiFi 2.0 operate by default in local mode from the Access Point device without dependency on the cloud. Data and state related to client steering and roaming is also possible in co-operation with the cloud when so configured.

&#x20;Metrics and telemetry are sent to the cloud as desired based on configuration however operation of 802.11k/v/r behavior and autonomous channel control are built in features of all OpenWiFi 2.0 Access Points.&#x20;

### Steering

&#x20;OpenWiFi services feature "wifi-steering" determines the operating parameters of RRM on the Access Point.&#x20;

```
	"services": {
      "wifi-steering": {
			"mode": "local",
			"network": "upstream",
			"assoc-steering": true,
			"required-snr": -75,
			"required-probe-snr": -70,
			"required-roam-snr": -85,
			"load-kick-threshold": 90
		},  
```

When mode is set to local, the Access Point handles steering decisions autonomously with the surrounding OpenWifi devices. \
Which network association, in this case "upstream" will steering be operating on. Note in prior examples most service provider, venue, enterprise services operate on the WAN side upstream network of the Access Point.&#x20;

| Parameter           | Value                                                                         |
| ------------------- | ----------------------------------------------------------------------------- |
| mode: local         | autonomous operation                                                          |
| network: upstream   | performs roaming among SSIDs on upstream interfaces                           |
| assoc-steering      | reject client association requests when the UE is subject to a steering event |
| required-snr        | minimum signal in dBm a client will be permitted to remain connected          |
| required-probe-snr  | minimum signal level in dBm for management probes to be replied to            |
| required-roam-snr   | minimum signal level in dBm client roaming threshold                          |
| load-kick-threshold | minimum channel load as % available before clients are kicked                 |

### Apply Wi-Fi Steering to enable 802.11r Fast Roaming SSIDs

```
			"ssids": [
				{
					"name": "OpenWiFi Roaming",
					"wifi-bands": [
						"2G", "5G"
					],
           "bss-mode": "ap",
           "encryption": {
                "proto": "psk2",
                "key": "OpenWiFi",
                "ieee80211w": "optional"
                 },                   
					"roaming": {
						"message-exchange": "air",
						"generate-psk": true,
						"domain-identifier": "EFAB"
					},
					"services": [ "wifi-steering" ]
                }
			]
		},
```

Each SSID to participate in roaming must have "services" : \[ "wifi-steering" ] associated.&#x20;

Additional fast roaming configuration is possible including setting message-exchange either to "air" or "ds" to determine pre authenticated message exchange occurs over the air or distribution system.&#x20;

\
The generate-psk option generates FT response locally for PSK networks. This avoids use of PMK-R1 push/pull from other APs with FT-PSK networks.<br>

Configuring domain-identifier sets Mobility Domain identifier (dot11FTMobilityDomainID, MDID) permitting segmentation of fast roaming RF topologies.<br>

When pmk-r0-key-holder and pmk-r1-key-holder are left un-configured, the pairwise master key R0 and R1 will generate a deterministic key automatically for fast mobility domain exchange over the air.&#x20;

### RRM 802.11k&#x20;

To enable 80211k parameters, associate these on a participating SSID basis.

```
			"ssids": [
				{
					"name": "OpenWiFi Roaming",
					"wifi-bands": [
						"2G", "5G"
					],
           "bss-mode": "ap",
           "encryption": {
                "proto": "psk2",
                "key": "OpenWiFi",
                "ieee80211w": "optional"
                 },                   
					"roaming": {
						"message-exchange": "air",
						"generate-psk": true,
						"domain-identifier": "EFAB"
					},
					"rrm": {
						"neighbor-reporting": true,
						"ftm-responder": true, 
						"stationary-ap": true
					},
					"services": [ "wifi-steering" ]
                }
			]
		},
```

In addition to 802.11k features for neighbor reporting, fine timing measurement responder and stationary ap indication, OpenWiFi also supports LCI measurement, Civic Location subelement as well.&#x20;

### Automatic Channel Balancing

As part of "wifi-steering" feature, autonomous channel management algorithm may be enabled to establish a self organizing Wi-Fi network.&#x20;

The auto-channel setting operates in co-ordination with other OpenWiFi Access Points by enumerating the newest AP in the network, then running neighbor and RF scans to determine the best channel of operation. Once the newest AP completes this process, the next AP is sequence will run the same algorithm for channel balancing until all APs in the network complete. The entire process may take up to 5 minutes the first time a network is powered on. The algorithm will re-run every 12 hours.&#x20;

```
	"services": {
      "wifi-steering": {
			"mode": "local",
			"network": "upstream",
			"auto-channel": true,
			"assoc-steering": true,
			"required-snr": -75,
			"required-probe-snr": -70,
			"required-roam-snr": -85,
			"load-kick-threshold": 90
		},  
```


# Captive Portal

OpenWiFi 2.0

OpenWiFi supports multiple models for Captive Portal. A built-in captive portal is described below. With multiple overlay tunnel services such as GRE and L2TP in addition to VLAN features, OpenWiFi is also easily deployed with any number of Captive Portal appliance solutions in either in-band or out-of-band style deployments.&#x20;

### Local Captive Portal

Creating a local captive portal involves associating the "captive" service with an interface. In the example below, "captive" is enabled on a downstream role interface. Any associated SSID on LAN side of this Access Point will be subject to configuration of the local captive portal. This would also apply to LAN interfaces if also associated with "captive".

```
		{
			"name": "captive",
			"role": "downstream",
			"captive": {
				"max-clients": 32,
				"gateway-name": "Lobby Wi-Fi Welcome",
				"upload-rate": 10,
				"download-rate": 20,
				"upload-quota": 300,
				"download-quota": 300
			},
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.2.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
			},
			"ssids": [
				{
					"name": "Office Lobby Wi-Fi",
					"wifi-bands": [
						"5G",
						"2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "none",
						"ieee80211w": "optional"
					},
					"roaming": {
						"message-exchange": "ds",
						"generate-psk": true
					}
				}
			]
		}
	],
```

Local captive portal will redirect to a default landing page and display the name as configured in "gateway-name".  Per associated user bandwidth and usage quota limits and total association limits may all be defined.&#x20;


# Multi-PSK (MDU Shared Key)

OpenWiFi 2.0

Multiple Pre Shared Key is a popular configuration option in Multi Dwelling Unit, dormitory or similar environment where it is costly to implement complex 802.1x security however that same level of per-client security is highly desired.&#x20;

A SSID when configured for multi-psk can have multiple PSK/VID mappings. Each one of them can be bound to a specific MAC or be a wildcard.

```
			"ssids": [
				{
					"name": "MDU Wi-Fi",
					"wifi-bands": [
						"5G",
						"2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "psk2",
						"ieee80211w": "optional",
						"key": "OpenWifi"
					},
					"multi-psk": [
						{
							"key": "akey",
							"vlan-id": 100
						},
						{
							"key": "bkey"
						}
					],
					"roaming": {
						"message-exchange": "ds",
						"generate-psk": true
					}
				}
			]
```


# VxLAN

OpenWiFi 2.0

VXLAN’s goal is allowing dynamic large scale isolated virtual L2 networks to be created for virtualized and multi-tenant environments.  It does this by encapsulating Ethernet frames in VXLAN packets which when deployed in Wi-Fi topologies can create highly extensible Layer 2 inter-network domains over large campus, MDU, venue service networks.&#x20;

VxLAN header uses a 24-bit VNID as a unique layer 2 forwarding domain value. VxLAN maintains layer 2 isolation between the forwarding domains and does not leak MAC addresses into upstream switches. Through the use of 24 bits in VNID VxLAN scales up to 16 million unique LAN forwarding domains.

The VXLAN encapsulation method is IP based and provides for a virtual L2 network.  With VXLAN the full Ethernet Frame (with the exception of the Frame Check Sequence: FCS) is carried as the payload of a UDP packet.  VXLAN utilizes a 24-bit VXLAN header, to identify virtual networks.  This header provides for up to 16 million virtual L2 networks.

Frame encapsulation is done by an entity known as a VxLAN Tunnel Endpoint (VTEP.)  A VTEP has two logical interfaces: an uplink and a downlink.  The uplink is responsible for receiving VxLAN frames and acts as a tunnel endpoint with an IP address used for routing VxLAN encapsulated frames.&#x20;

The VTEP in a TIP OpenWiFi device would be a management interface or designated uplink port(s). VTEP in an AP would be the AP WAN interface, or otherwise designated management interface (such as sub-interface on bridge wan).

In a traditional L2 switch a behavior known as flood and learn is used for unknown destinations (i.e. a MAC not stored in the MAC table).  This means that if there is a miss when looking up the MAC the frame is flooded out all ports except the one on which it was received.  When a response is sent the MAC is then learned and written to the table. &#x20;

The next frame for the same MAC will not incur a miss because the table will reflect the port it exists on.  VXLAN preserves this behavior over an IP network using IP multicast groups.

### Configure VxLAN

OpenWiFi device will establish a VTEP adjacency to the upstream switch. It is anticipated that any Wi-Fi networks in a VxLAN topology are associated to "upstream" interface(s).&#x20;

The following example creates a VxLAN endpoint from a WAN upstream port that will participate in VLAN 100, encapsulate this into VxLAN where it may be distributed across the campus or venue transparently.&#x20;

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
		},
		{
			"name": "VXLAN",
			"role": "upstream",
			"vlan": {
				"id": 100
			},
			"tunnel": {
				"proto": "vxlan",
				"peer-address": "192.168.178.9",
				"peer-port": 4789
			},
			"ipv4": {
				"addressing": "static",
				"subnet": "10.0.0.1/24"
			}
		},
```


# L2TP

OpenWiFi 2.0

Layer 2 Tunneling Protocol may be associated to any interface using the "tunnel" configuration option.&#x20;

This makes it possible to configure L2TP for multiple types of deployments as any interface may be encapsulated by the "tunnel" parameter.&#x20;

For example, to send all content of a specific SSID over an L2TP tunnel, the following configuration would apply.&#x20;

```
		{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh" ],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.1.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
			}
		},
		{
			"name": "L2TP",
			"role": "downstream",
			"tunnel": {
				"proto": "l2tp",
				"server": " far end IP address ",
				"user-name": "secret-l2tp-username",
				"password": "secrectPassword"
			},
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.10.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
			},
			"ssids": [
				{
					"name": "Tunneled SSID",
					"wifi-bands": [
						"5G", "2G"
					],
					"bss-mode": "ap"
				}
			]
		}
	],

```


# GRE

OpenWiFi 2.0

OpenWiFi 2.0 supports Generic Routing Encapsulation as an available "tunnel" protocol type.&#x20;

This makes it possible to configure GRE for multiple types of deployments as any interface may be encapsulated by the "tunnel" parameter.&#x20;

For example, to send all content of a specific SSID over an GRE tunnel, the following configuration would apply.&#x20;

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
		},
		{
			"name": "GRE",
			"role": "upstream",
			"vlan": {
				"id": 20
			},
			"tunnel": {
				"proto": "gre",
				"peer-address": "far end IP address"
			},
			"ssids": [
				{
					"name": "Tunneled SSID via GRE from VLAN 20 Interface",
					"wifi-bands": [
						"2G", "5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "none",
						"ieee80211w": "optional"
					},
					"rate-limit": {
						"ingress-rate": 100,
						"egress-rate": 100
					},                    
					"roaming": {
						"message-exchange": "ds",
						"generate-psk": true
					}
                }
			]
		},	
```

In the above example, the WAN untagged port will request DHCP in addition to present a VLAN interface with id 20 that both initiates the GRE tunnel as well as passes SSID traffic over that tunnel.


# RADIUS Authenticated SSID

OpenWiFi 2.0

When authenticating clients with back office RADIUS systems, the configuration of OpenWiFi permits this on a per SSID basis.&#x20;

{% tabs %}
{% tab title="Simple RADIUS" %}

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},
			"ssids": [
				{
					"name": "OpenWifi",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "wpa2",
						"ieee80211w": "optional"
					},
					"radius": {
						"authentication": {
							"host": "192.168.178.192",
							"port": 1812,
							"secret": "secret"
						},
						"accounting": {
							"host": "192.168.178.192",
							"port": 1813,
							"secret": "secret"
						}
					}
				}
			]
		},
```

{% endtab %}

{% tab title="EAP-Local SSID" %}

```
			"ssids": [
				{
					"name": "OpenWifi",
					"wifi-bands": [
						"2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "wpa2",
						"ieee80211w": "optional"
					},
					"certificates": {
						"ca-certificate": "/etc/ucentral/cas.pem",
						"certificate": "/etc/ucentral/cert.pem",
						"private-key": "/etc/ucentral/key.pem"
					},
					"radius": {
						"local": {
							"server-identity": "OpenWiFi-Local-EAP",
							"users": [
								{
									"user-name": "open",
									"password": "wifi"
								}
							]
						}
					}
				}
			]
		},
```

{% endtab %}
{% endtabs %}

Many parameters are possible with RADIUS authentications given the many methods in use worldwide. Many of the EAP methods have configuration options described below.

| RADIUS Attribute   | Description                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| nas-identifier     | Unique NAS Id used with RADIUS server                                                                                                                                                                                                                                                                                                                                                                                         |
| chargeable-user-id | Chargeable User Entity per RFC4372                                                                                                                                                                                                                                                                                                                                                                                            |
| local              | <p>Local RADIUS within AP device</p><ul><li><p>server-identity</p><ul><li>users - Local EAP users based on username, PreShared Key and VLAN id</li></ul></li></ul>                                                                                                                                                                                                                                                            |
| authentication     | <p>RADIUS server </p><ul><li>host IP address</li><li>port ( example 1812)</li><li>secret ( Shared secret with RADIUS server )</li></ul><p>Additional methods within Access-Request</p><ul><li><p>request-attribute ( id of RADIUS server ) </p><ul><li>id ( numeric value of RADIUS server )</li><li><p>value</p><p>Any sub-value defined as integer RADIUS attribute value</p></li></ul></li></ul>                           |
| accounting         | <p>RADIUS server </p><ul><li>host IP address</li><li>port ( example 1813)</li><li>secret ( Shared secret with RADIUS server )</li></ul><p></p><p>Additional methods within Access-Request sent in Accounting</p><ul><li><p>request-attribute ( id of RADIUS server ) </p><ul><li>id ( numeric value of RADIUS server )</li><li><p>value</p><p>Any sub-value defined as integer RADIUS attribute value</p></li></ul></li></ul> |
| accounting         | interval ( Interim accounting interval defined in seconds )                                                                                                                                                                                                                                                                                                                                                                   |


# Dynamic VLANs with RADIUS

OpenWiFi 2.0

In many deployment scenarios, user authentication is centralized with RADIUS systems. In addition, users may have association to their own networks or private networks. A common approach for this is to dynamically assign VLANs to Wi-Fi subscribers as they join the OpenWiFi network.&#x20;

To configure Dynamic VLANs with RADIUS, associate an SSID with RADIUS authentication, and associate the interface to "upstream" role as dynamic VLANs are most likely to be applicable across the service provider, venue, enterprise network.&#x20;

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},
			"ssids": [
				{
					"name": "OpenWifi",
					"wifi-bands": [
						"5G", "2G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "wpa2",
						"ieee80211w": "optional"
					},
					"radius": {
						"authentication": {
							"host": "192.168.178.192",
							"port": 1812,
							"secret": "secret"
						},
						"accounting": {
							"host": "192.168.178.192",
							"port": 1813,
							"secret": "secret"
						}
					}
				}
			]
		},
```

### &#x20; RADIUS Access-Accept

OpenWiFi devices will determine a VLAN is associated to the authentication of a subscriber when the access-accept message returns the following attribute value pairs:

* Tunnel-Type = 13
* Tunnel-Medium-Type = 6
* Tunnel-Private-Group-Id = VLAN Id Number

Upon return of an access-accept from RADIUS, based on any method chosen for security, OpenWiFi will dynamically create a VLAN Id as described in Tunnel-Private-Group-Id, associated to the interface role, in this example upstream.


# Passpoint®

OpenWiFi 2.0

Passpoint® brings seamless, automatic and  secure Wi-Fi connectivity using either pre-provisioned credentials or the SIM card in a mobile device.  Passpoint provides simple, fast online sign-up and provisioning that is only required upon a user’s first visit to a Passpoint network. Once a Passpoint enabled device contains the Wi-Fi AP or network credentials, it will discover and securely connect when the user is nearby—without requiring additional user action. This makes staying connected while mobile infinitely easier, and because Passpoint employs enterprise-level security, users can feel confident their data is better protected.&#x20;

Passpoint® also delivers more value to carriers, service providers, and IT managers of enterprise networks, enabling:

* Mobile data offload
* Wi-Fi networks for&#x20;
  * Hospitality, venues and enterprise&#x20;
  * Streamlined, enterprise-class device provisioning and credential management for enterprise and other private networks
* Wi-Fi–based services such as Wi-Fi calling, and collaboration tools&#x20;
* Wi-Fi roaming agreements across carriers and service providers&#x20;
* Opportunities to engage users and extract additional value from the network&#x20;

Passpoint® is already supported by most enterprise-class APs on the market today, and natively supported by major mobile operating systems including Android, iOS, macOS, and Windows 10. With active support from a wide ecosystem of device manufacturers, mobile operators, and service providers, Passpoint® benefits both users and Wi-Fi network providers


# Configuration Introduction

OpenWiFi 2.0

TIP OpenWiFi devices implement support for both the air interface and systems interfaces necessary to support Passpoint® Release 2 and above. Once also termed Hotspot 2.0, IEEE 802.11u specified added air interface fields exposing Access Network Query Protocol interactions for clients to discovery Access Point capabilities.&#x20;

Wi-Fi Alliance expanded ANQP to include Online Signup (OSU) concepts to leverage seamless onboarding and client security for Passpoint® networks. Following on from these efforts, Wireless Broadband Alliance has provided the necessary system interfaces for identity, security, mobile offload within a common federated operator solution known as OpenRoaming.&#x20;

TIP OpenWiFi enables operators to deploy the full range of Passpoint® and OpenRoaming solutions.&#x20;

| Term              | Description                                                                                                                                                                                                                                                                                                                      |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Operator          | <p>Wi-Fi Infrastructure Operator</p><p>Access Network Provider (ANP) as defined by OpenRoaming</p>                                                                                                                                                                                                                               |
| Venue             | Deployed location of Wi-Fi service                                                                                                                                                                                                                                                                                               |
| Identity Provider | <p>Subscriber authenticating service provider</p><p>Home Service Provider (HSP) as defined by OpenRoaming</p>                                                                                                                                                                                                                    |
| Roaming Exchange  | Operator and Identity Provider Authentication, Authorization, Accounting                                                                                                                                                                                                                                                         |
| ANQP              | <p>Access Network Query Protocol contains:</p><ul><li>Domain</li><li>Venue Name</li><li>Venue Info</li><li>Operator Friendly Name</li><li>IP Type</li><li>WAN Metric</li><li>Connection Capability</li><li>Operating Class</li><li>Authentication Type</li><li>Service Providers List</li></ul>                                  |
| GAS               | <p>Generic Advertisement Layer 2 Service for client query</p><ul><li><p>Client query returns:</p><ul><li>Organization Identifier / Service Provider Identity </li><li>Domain</li><li>Authentication</li><li>Roaming Consortium List</li><li>Network Access Identifier Realm (NAI) </li><li>3GPP Network Data</li></ul></li></ul> |
| OSU               | <p>Online Signup - Advertised over ANQP contains:</p><p></p><ul><li>OSU SSID</li><li>OSU URI</li><li>OSU Method</li><li>OSU Available Icons</li><li>OSU ESS (OSEN) SSID</li><li>OSU Description</li></ul>                                                                                                                        |
| OSEN              | OSU Server Authenticated Layer 2 Encryption Network                                                                                                                                                                                                                                                                              |

&#x20;


# Advertising Services

OpenWiFi 2.0

Passpoint® requires ANQP to supply three information elements from the Access Point.&#x20;

#### PLMN-Id

Public Land Mobile Network Id is defined by 3GPP and comprised of two, three digit numbers to uniquely identify the Mobile Network Operator (MNO).

#### Realm

A Fully Qualified Domain Name (FQDN) is a realm representing the service provider of the Wi-Fi service. Non MNO operators are an example of 'realm-based' service advertisements. Examples include Cable MSOs, Enterprises or other on MNO providers. Authentication methods used with realm-based configuration are EAP-TLS and EAP-TTLS.&#x20;

#### OI / RCOI

Organization Id or as defined by Wireless Broadband Alliance, Roaming Consortium Organization Id indicate the federated identity capable of authentication. Examples would be OpenRoaming, Eduroam and follow the Passpoint® EAP authentication methods.&#x20;


# Passpoint® Configuration

OpenWiFi 2.0

Ahead of the Provisioning service coming in release 2.1 sprint, it is possible to configure all Passpoint attributes as OpenWiFi has tested in prior OpenWiFi releases.&#x20;

Capabilities for Hotspot 2.0 / Passpoint® include:

* venue-name
* venue-group
* venue-type
* venue-url
* auth-type
* domain-name
* nai-realm
* osen
* anqp-domain
* anqp-3gpp-cell-net
* firendly-name
* icons

```
	"interfaces": [
		{
			"name": "WAN",
			"role": "upstream",
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			},
			"ssids": [
				{
					"name": "OpenRoaming",
					"wifi-bands": [
						"5G"
					],
					"bss-mode": "ap",
					"encryption": {
						"proto": "wpa-mixed",
						"ieee80211w": "optional"
					},
					"radius": {
						"nas-identifier": "TIPLABAP101",
						"chargeable-user-id": true,
						"authentication": {
							"host": "IP Address of RADIUS",
							"port": 11812,
							"secret": "passphrase",
							"request-attribute": [
								{
									"id": 126,
									"value": "s:TIP"
								}
							]
						},
						"accounting": {
							"host": "IP Address of RADIUS",
							"port": 11813,
							"secret": "passphrase",
							"request-attribute": [
								{
									"id": 126,
									"value": "s:TIP"
								}
							],
							"interval": 600
						}
					},
					"pass-point": {
						"venue-name": [
							"eng:Example passpoint_venue",
							"fra:Exemple de lieu"
						],
						"venue-group": 2,
						"venue-type": 8,
						"venue-url": [
							"http://www.example.com/info-fra",
							"http://www.example.com/info-eng"
						],
						"auth-type": {
							"type": "terms-and-conditions"
						},
						"domain-name": "onboard.example.com",
						"nai-realm": [
							"0,oss.example.com,21[5:7][2:4]"
						],
						"osen": false,
						"anqp-domain": 1234,
						"anqp-3gpp-cell-net": [
							"310,260",
							"310,410"
						],
						"friendly-name": [
							"eng:TIPLabs",
							"fra:TIPLabs"
						],
						"icons": [
							{
								"icon": "iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsSAAALEgHS3X78AAAEDklEQVRYhc1YTUgUcRR/q7uGUzsuYSClNRcbymS3wII6KNF0Cly7dHSNioIiD3Ppg9IOETHQB50S2vUqhBt1qBZ0pWuQG3VYJJ1SI8h0d4qRsnbjrW+Xv+N87VbYg2H/M/P/v/d732/W499+KA9rTFo64fECLSqBoitCBwDEAGCbxZYxAOjjZDVpxYMXpYIhqiq1BYEYtQGB1I57dEWIOPErG4iuCAKBuM08TgFAFyerHrxwDQCPmPdROmNJ3jIAoFZ9JhZAEB2crGaKDzhZjQNAnM5E6TGetQTjyiK6IsSIoZkbwiwIljhZxXOD9KgdrWklw9EiuiKEAaCbbrMUnKhxCAAynKyqDixuM+cRiOl+UyCEvI+EBRkQ6IJxurfMBJZwv66UDBHRFWHczIKrXEN+nSItgsyrGAOiRLwoPedF6YoVEIM7kGdSV4SQLRCK7KhhT4rqQcwExGMAkACgnxelUxZYUPs7ZFEg5VbxMlqk1wBgNyerIU5WO8ysAQA36XcRAIbMUKAbOFntJTe/L4Ix1hYjkE5mHbYQXiItnXhB67taOmGaOQwgleKuxN8UiMGXKRfZUAmxigXY82zW8EzOT7oRwotS0bwRXpRuOFmFUtdUBuuajRTVeB0sU9sA1QhborQ1lVFx04PlGClGf0xLJ2zjyYlKrjkz0jC/wZcrmG0p55m8L5fFZ5PbjYeHtxZk1HpzkwlGRgnI8Dt/0TVIY/cBrjkx5UXpAS07eVEKubHK67l1JRnAyKjYNRSoPXRbjRWTFyXHOLEiFsgvKmJ4zTqAMFZgPFOHzZAXpYDNUbCSwQJBrYJUgrfYgAhR9wXGInEahILMOysylVGWa0jbOGnfz2QNUoQ0bedFaVUvcSLXQAhEkoajQS2dYMs1UDELU3PrZord3wVCAw6aNKWlEzhXBHRFKMwk8p75q9jEtHRCpXEQwUR5UQo7s3UBBKczFHbiyL4ZqoYpZu6MZH9U4ZQOQxP+BRqQBUrhQhev9eaHRuUdL3VFwPnVNogtgVATHD490tA6NMFv4WtycKHtyz2mnwSeqhve4mLmm4+b/uqDYpnH2DkXWniz+NPjO/qkMTT9zdtpNoO4tYiAzOPLhQ4iOzPZ86H5RuZ98th2reXy3rlXz8Iflpr8S1n2Q+pS29yu9b7c/K88VHc9bpq1m+CdgKhN/iW4vv/z9IHNi1MX277UsYMvCe06G1zQWuu/PzQR9Ch+ZKaG8+YWotLHOqcZ12qKFxoGmjOfTk70HG/J9B1vyaBV+unzoETF7xcLHpHW+u/xyZ537VRjIlSDygKCKZpsGGjupfqwTAOSrXlXUjMYJjLkc6tcIECpOupe8J8RGyPo/+y/EGJBK6a5/+b/EU8+v+Y4AADgN/LdfxH+Qd9IAAAAAElFTkSuQmCC",
								"width": 32,
								"height": 32,
								"type": "image/png",
								"language": "fra"
							},
							{
								"icon": "iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsSAAALEgHS3X78AAAEDklEQVRYhc1YTUgUcRR/q7uGUzsuYSClNRcbymS3wII6KNF0Cly7dHSNioIiD3Ppg9IOETHQB50S2vUqhBt1qBZ0pWuQG3VYJJ1SI8h0d4qRsnbjrW+Xv+N87VbYg2H/M/P/v/d732/W499+KA9rTFo64fECLSqBoitCBwDEAGCbxZYxAOjjZDVpxYMXpYIhqiq1BYEYtQGB1I57dEWIOPErG4iuCAKBuM08TgFAFyerHrxwDQCPmPdROmNJ3jIAoFZ9JhZAEB2crGaKDzhZjQNAnM5E6TGetQTjyiK6IsSIoZkbwiwIljhZxXOD9KgdrWklw9EiuiKEAaCbbrMUnKhxCAAynKyqDixuM+cRiOl+UyCEvI+EBRkQ6IJxurfMBJZwv66UDBHRFWHczIKrXEN+nSItgsyrGAOiRLwoPedF6YoVEIM7kGdSV4SQLRCK7KhhT4rqQcwExGMAkACgnxelUxZYUPs7ZFEg5VbxMlqk1wBgNyerIU5WO8ysAQA36XcRAIbMUKAbOFntJTe/L4Ix1hYjkE5mHbYQXiItnXhB67taOmGaOQwgleKuxN8UiMGXKRfZUAmxigXY82zW8EzOT7oRwotS0bwRXpRuOFmFUtdUBuuajRTVeB0sU9sA1QhborQ1lVFx04PlGClGf0xLJ2zjyYlKrjkz0jC/wZcrmG0p55m8L5fFZ5PbjYeHtxZk1HpzkwlGRgnI8Dt/0TVIY/cBrjkx5UXpAS07eVEKubHK67l1JRnAyKjYNRSoPXRbjRWTFyXHOLEiFsgvKmJ4zTqAMFZgPFOHzZAXpYDNUbCSwQJBrYJUgrfYgAhR9wXGInEahILMOysylVGWa0jbOGnfz2QNUoQ0bedFaVUvcSLXQAhEkoajQS2dYMs1UDELU3PrZord3wVCAw6aNKWlEzhXBHRFKMwk8p75q9jEtHRCpXEQwUR5UQo7s3UBBKczFHbiyL4ZqoYpZu6MZH9U4ZQOQxP+BRqQBUrhQhev9eaHRuUdL3VFwPnVNogtgVATHD490tA6NMFv4WtycKHtyz2mnwSeqhve4mLmm4+b/uqDYpnH2DkXWniz+NPjO/qkMTT9zdtpNoO4tYiAzOPLhQ4iOzPZ86H5RuZ98th2reXy3rlXz8Iflpr8S1n2Q+pS29yu9b7c/K88VHc9bpq1m+CdgKhN/iW4vv/z9IHNi1MX277UsYMvCe06G1zQWuu/PzQR9Ch+ZKaG8+YWotLHOqcZ12qKFxoGmjOfTk70HG/J9B1vyaBV+unzoETF7xcLHpHW+u/xyZ537VRjIlSDygKCKZpsGGjupfqwTAOSrXlXUjMYJjLkc6tcIECpOupe8J8RGyPo/+y/EGJBK6a5/+b/EU8+v+Y4AADgN/LdfxH+Qd9IAAAAAElFTkSuQmCC",
								"width": 32,
								"height": 32,
								"type": "image/png",
								"language": "eng"
							}
						]
					}
				}
			]
		},
```


# Metrics

OpenWiFi 2.0

### Metrics

Several metrics are reported during intervals to the OpenWiFi Gateway. In general metrics contain traffic counters, neighbor tables, discovered clients.&#x20;

Each OpenWiFi device is capable of sending statistics on SSID, LLDP, and associated Clients learned by the device.&#x20;

Additionally, OpenWiFi devices expose all 802.11 management data within wifi-frames and to assist network troubleshooting and client fingerprinting solutions OpenWiFi provides dhcp-snooping for all possible client exchanges over DHCP and DHCPv6.&#x20;

```
	"metrics": {
		"statistics": {
			"interval": 60,
			"types": [ "ssids", "lldp", "clients" ]
		},
		"health": {
			"interval": 300
		},
		"wifi-frames": {
			"filters": [ "probe",
				"auth",
				"assoc",
				"disassoc",
				"deauth",
				"local-deauth",
				"inactive-deauth",
				"key-mismatch",
				"beacon-report",
				"radar-detected"]
		},
		"dhcp-snooping": {
			"filters": [ "ack", 
								"discover", 
								"offer", 
								"request", 
								"solicit", 
								"reply", 
								"renew" ]
		}   
```

The metrics data is sent to OpenWiFi Gateway at the intervals set where configurable.&#x20;

Metrics must be associated with the interfaces they are to report on. For example, to send DHCP data from LAN to OpenWiFi Gateway, the following configuration would apply.

```
		{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh", "lldp", "dhcp-snooping" ],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "static",
				"subnet": "192.168.1.1/24",
				"dhcp": {
					"lease-first": 10,
					"lease-count": 100,
					"lease-time": "6h"
				}
			}
		}
	],
```


# P4

OpenWiFi 2.0

Content coming soon...&#x20;


# Services

OpenWiFi 2.0

OpenWiFi devices have global services that operate either independently system wide or as an association to a physical or logical interface.&#x20;

Within the "services" configuration block, define the operating mode for each service, then associate a service with an interface.

### SSH

Secure shell may optionally be enabled on OpenWiFi devices, associated to specific interface(s), and optionally support operator defined keys or password authentication.

```
	"services": {
		"ssh": {
			"port": 22,
			"authorized-keys": {
				"items": [
				"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC0ghdSd2D2y08TFowZLMZn3x1/Djw3BkNsIeHt/Z+RaXwvfV1NQAnNdaOngMT/3uf5jZtYxhpl+dbZtRhoUPRvKflKBeFHYBqjZVzD3r4ns2Ofm2UpHlbdOpMuy9oeTSCeF0IKZZ6szpkvSirQogeP2fe9KRkzQpiza6YxxaJlWw== user@example",
	      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ4FDjyCsg+1Mh2C5G7ibR3z0Kw1dU57kfXebLRwS6CL bob@work",
	      "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBP/JpJ/KHtKKImzISBDwLO0/EwytIr4pGZQXcP6GCSHchLMyfjf147KNlF9gC+3FibzqKH02EiQspVhRgfuK6y0= alice@home"
				]
			}
		}
	}
```

#### Associate Service to Interface

```
		{
			"name": "LAN",
			"role": "downstream",
			"services": [ "ssh" ],
			"ethernet": [
				{
					"select-ports": [
						"LAN*"
					]
				}
			],
```

###

### NTP

Network time protocol for OpenWiFi devices may be configured to listen for time synchronization from  NTP sources and may also be configured to supply NTP source.

```
	"services": {
		"ntp": {
			"servers": [
			"0.openwrt.pool.ntp.org",
			"1.openwrt.pool.ntp.org"
			]
		}
	}
```

#### Associate to an Interface&#x20;

```
		{
			"name": "WAN",
			"role": "downstream",
			"services": [ "ntp" ],
			"ethernet": [
				{
					"select-ports": [
						"WAN*"
					]
				}
			],
			"ipv4": {
				"addressing": "dynamic"
			}
    },
```

### LLDP

Link Layer Discovery Protocol describes interfaces and capabilities between directly attached neighbors over Layer 2.&#x20;

```
		"lldp": {
			"describe": "OpenWiFi",
			"location": "Stadium Level 2"
		},
```

Associate "lldp" as a services attribute to any interface.

### MDNS

To assist in device or service discovery over smaller networks,  multicast DNS (mDNS) protocol if often used. In an mDNS environment there is no local name server for resources to leverage.  mDNS zero-configuration service effectively behaves as unicast Domain Name Service (DNS).

```
		"mdns": {
			"enable": true
		},
```

Associate "mdns" as a services attribute to any interface.

### Syslog&#x20;

Remote syslog systems may be configured to receive device logs in a central location. This content is standard device log and not related to telemetry for metrics and service information received by the OpenWiFi Gateway.  Valid port range is from 100 - 65535 with operation over UDP or TCP.&#x20;

```
		"log": {
			"host": "Syslog Server IP",
			"port": 514,
			"proto": "udp"
		},
```

Associate "log" as a services attribute to appropriate interface.&#x20;

### IGMP

When enabled the OpenWiFi device will process IGMP Proxy.&#x20;

```
		"igmp": {
			"enable": true
		},
```

Associate "igmp" as a services attribute to any interface participating in IGMP Proxy.


# OpenWiFi Release 2.2

Telecom Infra Project OpenWiFi

## What is OpenWiFi?

TIP OpenWiFi is an open source community project that believes in democratizing premium Wi-Fi experiences for multiple market use cases. The TIP approach to OpenWiFi creates an open source disaggregated technology stack without any vendor lock in. OpenWiFi offers premium managed Wi-Fi features, local break-out design, cloud native open source controller, and an open source AP firmware operating system tested nightly.

![Open Technology Stack - Many Platforms - Many Service Options](/files/-M_5tb3Ga4ewI08f-Ipj)

TIP OpenWiFi is the industry's first CI/CD open source Wi-Fi eco-system. Built nightly with a strong community of Wi-Fi leaders, new features are unit tested in automated RF chambers and checked from cloud to ground for Wi-Fi performance and conformance.

OpenWiFi 2.0 introduces management and telemetry based on uCentral offering expanded selection of managed devices including smaller APs and PoE access switches.

### High Level Features

#### Each OpenWiFi AP offers:

* Multiple topologies including :
  * Bridging, Virtual LAN, VxLAN, NAT Gateway, Local Breakout, Overlay (PPPoE, L2oGRE, L2TP), Mesh, WDS&#x20;
* Multiple authentications including WPA, WPA2, WPA3, Enterprise Radius models, M-PSK
* Passpoint R1 and R2 Mobile Offload
* Encrypted Zero Touch Provisioning and Cloud Discovery
* Autonomous RRM and Channel Control
* Captive Portal & ExpressWiFi

#### Each OpenWiFi PoE Switch offers:

* IEEE802.1Q Virtual LAN
* VxLAN
* DHCP Snooping & Relay
* Multicast
* PoE
* IEEE802.1x Access Control

#### Cloud SDK in OpenWiFi offers:

* Zero Touch Provisioning&#x20;
* Firmware Management
* Integration Northbound Interface (NBI) RESTful
* Data model driven API&#x20;
* Enterprise Message Bus data access&#x20;

**OpenWiFi AP Detail List:**

* Wi-Fi 4 (n) Wi-Fi 5 (ac) Wi-Fi 6 (ax)&#x20;
* Dual Bank Bootloader
* Multi-SSID per Radio
* SSID Authentications: WPA/WPA2/WPA3 - Mixed, Personal, Enterprise
* 802.1Q VLAN per SSID&#x20;
* 802.1d Bridge Mode per SSID
* RADIUS Accounting, Interim-Accounting, NAS-IP, CUI
* Network Address Translation Gateway Mode Operation
* Network Time Protocol Client
* Management VLAN&#x20;
* Wi-Fi 6 (ax) Specific
  * BSS Coloring
  * UL/DL OFDMA sub-carrier allocation
  * Channel Switch Announcement
* Wi-Fi General Features
  * WMM® - Wi-Fi Multi Media
    * UAPSD Procedures (Unscheduled Power Save)&#x20;
    * Upstream/Downstream Queues & L3 DSCP
    * Over The Air QoS EDCH Procedures
* WMM-Admission Control (AC)&#x20;
* WMM-Power Save (PS)
* Wi-Fi Optimized Connectivity
  * (ai) Fast Initial Link Support
* Wi-Fi Agile Multiband
  * (k) Client Radio Resource Management - Directed Steering
  * (v) Network Assisted Roaming
  * (r) Fast BSS Transition
* Protected Management Frames (PMF)&#x20;
  * (w) Management Frame Encryption
* Channel Switch Announcement (CSA)
* Dynamic Frequency Selection & Transmit Power Control (DFS/TPC)
* Beacon Rate&#x20;
* Min Client Noise Immunity
* Basic Rate Control
* De-Auth RSSI Control
* Burst Beacon Support
* Per SSID Client Rate Limiting
* Promiscuous Mode Support&#x20;
* **Additional TIP AP NOS Features**
  * ISP WAN Profiles ( PPPoE, L2TP, L2oGRE )
  * Embedded Captive Portal (Local Splash non-auth)
  * Link Layer Discovery Protocol (LLDP)
  * Dynamic Airtime Fairness
  * Service Flow QoS&#x20;
  * Wireline & Wireless Tracing (PCAP Cloud Remote Troubleshooting)
  * Health Check Reports
  * Local Provisioning over SSID (when Cloud or WAN down)
  * Multimedia Heuristics (Detection of Unified Communication Sessions)
  * SSID Rate Limiting
  * GPS Reporting
  * Autonomous RRM Client Steering&#x20;
  * Client / AP / Network Metric Telemetry&#x20;

**Cloud SDK additional features**

* **Provisioning**&#x20;
  * Device Identity (Model, MAC, Serial Number)
  * Device Software Upgrade
  * Multiple SSID Configuration
  * Bandwidth Rate Control per SSID
  * Multi-Radio 2.4/5/6GHz control
  * AP Network Mode Control (Bridge/NAT mode)
  * Security (WPA-Personal/WPA & WPA2/3 Personal Mixed/WPA & WPA2/3 Enterprise Mixed/WPA2/3 Personal/WPA2/3 Enterprise/WEP)
  * VLAN per SSID
  * VxLAN port configuration
  * NTP Enable/Disable
  * RTLS (Location Services) Enable/Disable&#x20;
* **RF Control**
  * IEEE802.11r Fast BSS Transition per Radio Control
  * IEEE802.11k RRM Radio Information per Radio Control
  * IEEE802.11v Network Assisted Roaming per Radio Control
  * RRM Location AP Channel (uChannel) Provisioning
  * RRM Location Client Steering (uSteer) Threshold Provisioning&#x20;
* **Remote Troubleshooting and Service Assurance**
  * Syslog&#x20;
  * Health Check Reports
    * Remote DHCP, RADIUS, UE Network Analysis&#x20;
  * Remote TTY Shell&#x20;
  * Remote Packet Capture Analysis&#x20;

### **How to contribute**

If you or your company are interested in contributing to TIP Open Wi-Fi, please join the Wi-Fi Product Group by visiting [Telecom Infra Project](https://telecominfraproject.com/apply-for-membership/) to become a member.


# Ordering OpenWiFi APs

TIP Wi-Fi Member Access Point Ordering Information

TIP Wi-Fi members may contact the ODM manufacturers in the TIP Wi-Fi eco-system using the information posted within Community Confluence page.

{% embed url="<https://telecominfraproject.atlassian.net/wiki/spaces/WIFI/pages/112689187/AP+Hardware>" %}


# Getting Started

TIP OpenWiFi 2.0

OpenWiFi 2.0 Minimum Viable Product at the end of July, 2021 enables a cloud native and cloud agnostic Software Development Kit (SDK) with management and deployment support for a wide range of Access Point and PoE network switch platforms.

## Initial release 2.0 SDK includes:

* Zero Touch Cloud Discovery
* Firmware Management
* User Interface&#x20;
  * Device List
  * Device Reboot
  * Device LED Blink
  * Device Remote Packet Capture
  * Device Configuration
  * Device Factory Reset
  * Device Remote TTY shell
  * Remote Wi-Fi Scan
  * Associations
    * UE (Wi-Fi Clients)
    * Mesh and WDS Clients
    * MCS, NSS, RSSI, Channel, SSID, Tx/Rx
  * Device Health Check&#x20;
  * Interface Statistics
  * Device Command History

Upcoming sprint for August includes Dynamic Provisioning service support for template based device configuration.

OpenWiFi 2.0 SDK is deployable as both a Docker Compose or a Helm on Kubernetes model. See [Release 2.0 SDK](/openwifi/2.2.0/getting-started/sdk) section for installation instructions.

## New in this Release&#x20;

* Firmware
  * Basic Features for OpenWiFi Switching
  * Passpoint&#x20;
    * NAPTR Functionality
    * Proxy Static Routing
    * HSP Auth / Acc Service Discovery
    * Last Resort Proxy&#x20;
    * RADIUS OpenRoaming Compliance&#x20;
  * External 3rd Party Captive Portal Redirect
  * Burst Rate Ad-Hoc Telemetry
  * Static Routing
  * CS1 Merge - Wi-Fi 6
  * IEEE802.1d STP Control
  * Timestamp on Health Check messages
  * L2 DHCP Relay
  * Station Association Idle and Session time
* SDK

  * OpenWiFi Provisioning Service
  * OpenWiFi Inventory Service
  * Multi Tenant Support&#x20;
  * Service Group - Venues
  * Logical Regions - Entities


# Cloud Discovery

TIP OpenWiFi 2.0

All TIP OpenWiFi devices use the same cloud discovery mechanism on initial boot.

OpenWiFi devices ship from factory with a unique device certificate signed by the Telecom Infra Project Certificate Authority.

When a device boots for the first time, or is factory reset, a 'first-boot' process occurs within the device.\
First-boot initiates a connection over HTTPs to the Certificate Authority requesting the unique device record information. All connections to the Certificate Authority occur over mTLS encrypted session.\
Devices use their unique certificate identity to authenticate and retrieve the location of the assigned cloud.

![Device First Boot / Factory Cloud Discovery](/files/-Mf9lMjQQH2R0ePlhqZ8)

Once the cloud location has been learned from first-boot, the device no longer depends on this cloud discovery and will return to the assigned cloud learned from first-boot.

Devices may periodically initiate connection to the Certificate Authority to validate their unique certificate status. This is a normal process involved in mutual TLS security models.

When an operator or end customer seeks to change the cloud associated with their device(s), the value of the cloud stored in the Certificate Authority device record is updated. A factory reset of the device will cause first-boot to re-occur which will then discover the new cloud.

TIP OpenWiFi ODM partners are able to manage device records directly using the Certificate Authority portal. All other users should send an email to <licensekeys@telecominfraproject.com> to request update of cloud discovery.


# Discovery without Cloud

TIP OpenWiFi 2.0

There could be reasons cloud discovery does not complete.\
These include:

* Lack of Internet Connectivity
  * Device may require additional WAN settings
  * Network may not be connected to Internet
* No Configuration of Cloud in Certificate Authority&#x20;
  * Manufacturer may have left this value blank in the device record stored in Certificate Authority

![Manual Cloud Entry](/files/-Mf9oHgHT0ZhFMtLjylq)

When the cloud can not be automatically discovered, OpenWiFi devices will turn on a local admin web UI made available via SSID "Maverick".

The Maverick UI will support configuring WAN interface parameters, including DHCP, Static, PPPoE, and LTE/5G settings. Please see [Local Device Settings](/openwifi/2.2.0/getting-started/access-points/local-device-settings) for details on using Maverick.\
[  <br>](/openwifi/2.2.0/getting-started/access-points/local-device-settings)Additionally the Maverick UI supports direct entry of the cloud for cases when the cloud value has not been supplied during manufacture.

For non-Wi-Fi devices such as PoE access switches, the same cloud location information may be configured using local management interface.

![Admin / User Entered WAN or Cloud](/files/-Mf9pHz_oDyBMfDrgAtF)


# Release 2.0 SDK

TIP OpenWiFi 2.0

Release 2.0 SDK offers a number of ways to consume OpenWiFi. Available as a single Docker for just the uCentralGW or as a set of micro services offering increasing value to consume helps multiple eco-system partners use as much or as little as desired to integrate with or build a commercial product on the TIP OpenWiFi SDK.

Features of the 2.0 SDK at July MVP include:

* RBAC based security framework
* OpenAPI compliant Northbound&#x20;
* Kafka Message Bus
* PGSql HA Cluster
* Firmware Manager&#x20;
* Central Logging Dashboard&#x20;
* User Interface&#x20;
* Docker Compose & Helm DevOps Deployment Automation

![OpenWiFi 2.0 SDK](/files/-MfinINjPKmxuNNPOndF)




---

[Next Page](/openwifi/llms-full.txt/1)

