Minimum RSSI

From MattWiki
Jump to: navigation, search
noteThis Page was written with UniFi Controller version 5.0.7 in mind, and may not work correctly with other versions.

Minimum RSSI works by kicking wireless clients that fall below the configured RSSI threshold. RSSI is a vendor-specific value. With UniFi, RSSI & SNR are synonymous. As long as a user remains above the RSSI threshold (SNR), they won't be kicked. To learn how to configure minimum RSSI for UniFi, click here. So if the Minimum RSSI value is 20dB, clients whose SNR drops to 19dB, 18dB, etc. will be kicked, allowing them to find a better access point.

Once below the minimum RSSI setting, clients are "kicked" similar in design to the reconnect button

Behind the scenes, the controller/AP will send a de-authentication packet to this client to kick it right away, similar to the button "Reconnect" found in the controller. It is then up to the client implementation to find a better AP (unlike ZH where among APs themselve decide which one to take over a client). If a client is stubborn enough to stay on the same AP, the controller/AP will NOT force its moving and will trust its decision for a duration before sending another de-authentication packet. In short, this is a soft approach.


Set minimum RSSI for clients

Overview

Minimum RSSI is an important part of managing an enterprise network. Often a single low-signal client can affect the performance of the entire wireless network. Currently, UniFi allows users to set a minimum RSSI for individual APs and radio bands.

Steps

Starting in v3.1.3, minimum RSSI configuration is done through config.properties file under each [UniFi base]/data/sites/the_site directory. In V3, the_site is the name of the site. However, in V4, the controller no longer uses the folder name as the the site name in the directories structure. It uses a random string instead. The reason for this change is to allow us expanding controller down the road by avoiding site names colliding with each other. The easiest way to find out this string is to open the controller in a browser, and browse to the corresponding site. Then in the browser URL, you will find something similar to the below,

For every site, you will find a unique random string that assigns to the site. In above case, the random string ceb1m27d is the folder name that shall be used under [UniFi base]/data/sites/. Therefore, in my case, I will create a folder named ceb1m27d underneath, and then place config.properties inside this ceb1m27d folder (with corresponding minrssi configs), and then trigger a provision to APs. The AP shall take in config after that.

The reason behind this decision is that (1) it is an advanced feature. (2) it requires a fine degree granularity of configuration down to each AP and each band, hence quite cumbersome if done in UI. A basic overview of the steps:

  1. In controller, create (or modify) config.properties file under each [UniFi base]/data/sites/the_site directory (this is v3 location, see above for notes about v4)
  2. For each needed AP and band (n/g or n/a), add a mapping line in following format:
  3. config.minrssi.[AP MAC addr].[ng|na]=[Minimum RSSI value]

Pictogram voting info.svg Note: There is NO ':' nor '-' in between MAC address bytes. [ng|na] means 'ng' OR 'na', 'ng' is 2.4 GHz band and 'na' is 5 GHz band.

Trigger a re-provision (NOT restart) to the AP. for example, enable/disable or disable/re-enable guest portal, changing TX power of an AP, etc. If you don't want to re-provision entire network, you can only re-provision selected APs to make it effective on those APs.

config.minrssi.002712345678.ng=20
config.minrssi.dc9f22345678.ng=20
config.minrssi.002732345678.na=20
config.minrssi.002742345678.ng=20

Examples

1. SSH to UniFi controller and change directory to UAP site:

##SSH into UAP##
ssh ubnt@<unifi_controller_ip_address>
password: ubnt (default)

##Default path to UniFi default site##
Linux: /usr/lib/unifi/data/sites/default
Mac: /Applications/Unifi.app/Contents/Resources/data/sites/default
PC: C:\Users\username\Ubiquiti UniFi\data\sites\default

2. When setting min RSSI for first time, you'll likely need to create the file config.properties since it doesn't exist yet. In this example, we'll use a file editor likevi. Then add entries for each UAP under the given site (one entry per radio band). Then save the file and quit the editor.

##Create config.properties file or simply open using vi editor##
sudo vi config.properties
*
*
*

##add entries for dual-band UAP##
config.minrssi.dc9fdb700488.ng=20
config.minrssi.dc9fdb700488.na=20
*
*
*

##Save and quit the editor##

:wq

3. SSH into UAP to check that minimum RSSI is set using ps command.

##SSH into UAP##
ssh ubnt@<uap_ip_address>
password: ubnt (default)

##Check processes##
ps
830 ubnt      1568 S    /bin/stamgr -i 1 -b ng 20 -b na 20 -n 0

Notes

  1. "the_site" is the site ID in which an AP resides. This is the ID you set when adding a new site. The default id for the first site is 'default'.
  2. AP MAC address is Ethernet MAC address (or if you type "ifconfig" on AP, the one that is under br0, NOT athX MAC address)
  3. The kick station occurs at AP side.
  4. To verify if the Minimum RSSI is working, SSH into the AP, and type 'ps' command. If Minimum RSSI is working, you will see something similar to the below output,
    • 5134 admin 1568 S /bin/stamgr -i 1 -b ng -r 20 -n 0, where -b is the band, and -r is the RSSI value being set.
    • Clients are kicked based on these parameters (band & RSSI)

References