Skip to main content
← Back to Blog
RADIUS11 min readApril 28, 2026

RADIUS Accounting for ISPs: Track Data Usage & Automate Billing

RADIUS does not just authenticate subscribers — its accounting feature tracks every byte transferred. This guide covers setting up RADIUS accounting for usage-based billing, Fair Usage Policy (FUP) enforcement, data cap alerts, and integration with ISPbills for automated metered billing.

Understanding RADIUS Accounting

RADIUS accounting works alongside authentication to log session data. Every time a subscriber connects, the NAS (your MikroTik router) sends accounting packets to the RADIUS server: Accounting-Start when the session begins, Interim-Updates at regular intervals, and Accounting-Stop when the session ends.

Each accounting record includes: username, session duration, bytes uploaded, bytes downloaded, NAS IP, assigned IP address, and termination cause. This data is essential for usage-based billing, FUP enforcement, and network analytics.

Configuring Accounting on MikroTik

Enable RADIUS accounting for PPPoE and Hotspot services:

routeros
# Enable PPP RADIUS accounting
/ppp aaa
set use-radius=yes accounting=yes interim-update=5m

# Enable Hotspot RADIUS accounting
/ip hotspot profile
set default radius-accounting=yes radius-interim-update=5m

# Verify RADIUS configuration
/radius print detail

The interim-update=5m setting is crucial — it sends usage data every 5 minutes. Without it, you only get usage totals when the session ends, which could be days later for always-on PPPoE connections.

Reading Accounting Data

RADIUS accounting data is stored in the radacct table in your FreeRADIUS database. Here are useful queries:

bash
# Top 20 data consumers today
mysql -e "SELECT username,
  ROUND(SUM(acctinputoctets)/1073741824, 2) AS upload_gb,
  ROUND(SUM(acctoutputoctets)/1073741824, 2) AS download_gb,
  ROUND(SUM(acctinputoctets + acctoutputoctets)/1073741824, 2) AS total_gb
FROM radacct
WHERE acctstarttime >= CURDATE()
GROUP BY username
ORDER BY total_gb DESC
LIMIT 20;" radius

# Monthly usage per subscriber
mysql -e "SELECT username,
  ROUND(SUM(acctinputoctets + acctoutputoctets)/1073741824, 2) AS total_gb
FROM radacct
WHERE acctstarttime >= DATE_FORMAT(NOW(), '%Y-%m-01')
GROUP BY username
ORDER BY total_gb DESC;" radius

Implementing Fair Usage Policy (FUP)

FUP throttles subscribers who exceed a data cap to a lower speed tier. This ensures fair bandwidth distribution across all subscribers. The typical workflow:

  • Define FUP thresholds — e.g., 300 GB/month for 10 Mbps plan, after which speed drops to 2 Mbps
  • Monitor usage — track cumulative usage from RADIUS accounting data
  • Trigger throttle— when threshold is reached, change the subscriber's RADIUS rate-limit attribute
  • Apply via CoA — send Change of Authorization to MikroTik to apply the reduced speed immediately
  • Reset monthly — restore original speed at the beginning of each billing cycle

Data Cap Alerts and Notifications

Proactive communication keeps subscribers happy. Send alerts at usage milestones:

ThresholdActionChannel
75% of data capWarning notificationSMS + App notification
90% of data capUrgent warningSMS + Email
100% of data capFUP speed reduction appliedSMS + Email + Speed change
Top-up purchasedSpeed restoredSMS confirmation

How ISPbills Automates Usage Billing

ISPbills reads RADIUS accounting data and automates the entire usage billing workflow:

  • Real-time usage tracking — per-subscriber usage graphs updated every 5 minutes from interim accounting
  • FUP automation — define FUP rules per package and ISPbills handles throttling and restoration automatically
  • Data cap alerts — configurable SMS/email notifications at 75%, 90%, and 100% thresholds
  • Usage-based billing — charge subscribers per GB of usage with automatic invoice generation
  • Top-up system — subscribers can purchase additional data packages through the customer portal
  • Usage reports — monthly usage reports per subscriber, per package, and network-wide

Ready to Automate Your ISP?

ISPbills handles billing, network provisioning, and customer management — free for up to 99 subscribers.

Start Free Trial →

Tags

RADIUSAccountingData UsageFUPBillingISP OperationsMikroTik

Ready to Transform Your ISP Business?

Join hundreds of ISPs across Bangladesh and South Asia who trust ISPbills to manage their operations. Start your free trial today — no credit card required.