authcha learn

Learn / Network engineer

Quotas, network policies and disconnects

Module 4 of 5 · 30 minutes

By the end you can

  • Set a monthly quota on a device class and explain when it is enforced
  • Build a network policy with bandwidth, daily and monthly quotas and a slow-down
  • Say how a user's policy is chosen
  • Set up a disconnect (Change of Authorization) for a device

Two layers of limits

Authcha limits what people and devices use in two places, and it helps to keep them apart.

LayerApplies toSet on
Device classMAB endpoints (a MAC is not a user)The class, or one allowlist entry
Network policy802.1X and captive-portal usersA user, a directory group, a user type, or the default

Both depend on accounting: the switch or gateway must send usage records back to Authcha, as in the aaa accounting line of the switch example earlier.

Data quotas on devices

On a device class, or on one allowlist entry, set a monthly quota in bytes (in and out together).

  • Authcha adds up accounting data every 5 minutes. Endpoints over their cap are marked exceeded and are refused with "Monthly quota exceeded" at their next authentication.
  • If the switch has a CoA secret, Authcha also disconnects the active session straight away.
  • Usage resets at the start of each calendar month.
  • Whatever notation the switch uses for the MAC, usage and disconnects treat them as the same endpoint.
  • Device Classes → Data Quotas shows current usage and has a button to run the check now.

Network policies for users

A network policy is what an accepted 802.1X or captive-portal user gets beyond admission. Manage them under Network Access → Network Policies. A policy can set a filter id, session and idle timeouts, an accounting interim interval, upload and download bandwidth, a daily and a monthly data quota, a warning percentage, a slow-down after a volume, and a short list of extra reply attributes.

Which policy a user gets

First match wins:

  1. the policy assigned to the user
  2. the policy of the user's directory group (the lowest priority number wins when several match)
  3. the policy assigned to the user's user type
  4. the default policy

With no match the user gets no extra attributes. A policy still in use cannot be deleted, so removing one never widens anyone's access.

Quotas, slow-downs and warnings

  • A policy can have a daily quota, a monthly quota, or both. When the user signs in, a used-up quota means the login is refused. Otherwise the smaller remainder goes to the gateway.
  • A session already open when the user reaches the quota is ended by the console within a minute, and the next login is refused. Set an interim interval so totals stay current.
  • Slow down instead of stop: after a set number of gigabytes in the day or month, new sessions get lower throttled upload and download rates, and an open session is bounced once to pick them up. The next day or month starts at the plan's normal rates.
  • Warnings: Warn at (% of the quota) records an entry when a user passes that share. Warnings, slow-downs and stops are listed on Network Policies → Usage warnings and limits. Nobody is told automatically, so feed that list into your monitoring if you want a message.

A fixed address for one user

Under Network Policies → Fixed address and routes for one user, a user gets Framed-IP-Address, Framed-IP-Netmask and Framed-Route entries in every Access-Accept. It is meant for OpenVPN through pfSense, so a person gets the same tunnel address at each login. One address belongs to one user. Only an administrator sets it, because these attributes decide where someone lands on the network.

Disconnects (Change of Authorization)

Authcha can send RFC 5176 Disconnect-Requests. It does so:

  • manually, from Sessions → Network Sessions, with the disconnect button on an active row
  • automatically, when an endpoint goes over quota
  • automatically, when a posture-managed device becomes non-compliant

To allow it for a device:

  1. Open the device under Devices.
  2. Fill in RFC 5176 CoA-Disconnect with a CoA secret that is different from the RADIUS shared secret. The port defaults to 3799.
  3. Configure the device to accept dynamic authorization from Authcha's address with that secret. On Cisco: aaa server radius dynamic-author.
  4. Allow UDP 3799 from Authcha to the device.

Every request and the device's answer are recorded in Sessions → Disconnect Log (Advanced view), with a result: acknowledged, refused, timed out, error, skipped because no CoA secret is set, or skipped because there is no active session.

LabHands-on

On the demo as demo-viewer (password Authcha-View-2026), then on your own install.

  1. Open Network Policies and find policies that slow down after a threshold and policies with a quota.
  2. Open Device Classes and find a class with a monthly quota. Open Data Quotas and see current usage.
  3. Open Sessions and find an active session. Note who or what it is, where it is and how much data it has used.
  4. Open Users, pick a user and find which policy they resolve to: their own, their group's, their type's, or the default.
  5. On your install, give a test user a policy with a 1 GB monthly quota and a slow-down at 500 MB. Run the check and read Usage warnings and limits.
  6. Register a CoA secret on a test device and disconnect an active session from Network Sessions. Find the result in Disconnect Log.

Check yourselfQuiz

1A user has their own policy, belongs to a group with another policy, and their user type has a third. Which applies?
2What must the switch send for quotas to work?
3A user reaches their quota while connected. What happens?
4What should the CoA secret be?
5What does a slow-down do?

Cheat sheetKeep this

  • Devices: class or entry monthly quota, checked every 5 minutes. Users: network policy.
  • Policy choice: user, directory group, user type, default.
  • Quota stop = login refused + live session ended within a minute. Slow-down = lower rates instead.
  • Warnings are listed but not sent: wire them into monitoring.
  • CoA: secret different from the RADIUS secret, port 3799, allow UDP 3799 from Authcha.
  • Results: Sessions → Disconnect Log.
  • Read more: Network access.