airMAX - Traffic Shaping (Rate Limiting) for airMAX Radios

Overview


Readers will learn how to create and specify traffic rate limits on airMAX radios.

Beginning in airOS 5.5+, Ubiquiti introduces a simple, easy way to create powerful traffic shaping policies. Employing traffic rules is a good way to ensure that networks perform expectedly, even despite high traffic volumes. Within the network tab of airOS, traffic shaping can be enabled when advanced configuration mode is selected.

Parameters


There are a couple of terms to define when understanding traffic shaping on airMAX radios:

  • Interface refers to the physical/logical port created and through which traffic passes.
  • Ingress refers to “inbound traffic on a given port”—think “incoming” when you hear ingress
  • Egress refers to outbound traffic on a given port—think “exiting” when you hear egress.
  • Rate refers to the maximum bandwidth value (in kilobits per second) for traffic passing on a given port
  • Burst refers to the data volume (in kiloBytes) that is allowed before the egress maximum bandwidth applies. Burst is similar to a bucket which, once filled, starts rate limiting. As the bucket empties, or as time passes, traffic again may pass without limits, until the bucket fills again.

Recommendations


Traffic shaping is not only useful but recommended for keeping customers within fair bandwidth limits. This way, customers with viruses or programs which consume large amounts of network bandwidth won’t cripple the rest of the network.

We recommend using Traffic Shaping to control egress traffic, because it is more efficient in the egress direction. When a port accepts ingress traffic, it cannot control how quickly the traffic arrives – the sending device controls that traffic. However, when a port sends out egress traffic, it can control how quickly the traffic exits.

Lowering a radio’s modulation rate is NOT a recommended way to create traffic shaping rules since it can hinder the performance of the radio network. 

Example


A client with a 10 Megabit down, 5 Megabit up package could have traffic shaping rules created at the CPE itself. Assuming a simple, bridged Station radio, the rules would look something like this (includes download burst rule, which is explained later)

 

Ingress is simply disabled and egress is set accordingly. By leaving burst at 0, customers will pass traffic at the specified rates as long as they have traffic to send or receive. However, specifiying a burst parameter is a great way to hyper exaggerate the performance of a link. If the download burst size is 5MB, this means the customer can download up to 5MB as fast as the link permits, before the rate drops to 10Mbps.

 

The interval of time before limits are lifted is directly dependent on the ratio of burst to rate limit: Convert the burst size into bits, then divide the burst size by the rate limit. 40960 kilobits divided by 10240 kilobits/second equals 4 seconds. So after approximately 4 seconds without passing traffic, the burst bucket is empty and the client can pass traffic without rate limits.