System Architecture
1. Overview
The Mac-Auth implementation redefines the traditional FreeRADIUS workflow. Instead of relying on EAP or CHAP/PAP, it introduces a custom logic-gate pipeline that directly evaluates MAC addresses and database-driven state.
At a high level, the architecture links:
-
NAS (BNG) – Huawei BRAS sending authentication requests
-
FreeRADIUS Engine – Executes Unlang policy logic
-
Database Layer – Stores dynamic user/session state
2. Standard Data Flow
2.2. 2. Authorization Engine (authorize)
Core decision pipeline:
-
Validate MAC format
-
Check user location
-
Apply time restrictions (
TIMESPAN) -
Identify session type:
-
Initial Connect
-
Continuation (Service / FUP)
-
-
Evaluate quota usage
-
Final decision:
-
Access-Accept
-
Access-Reject
-
3. Core Components
3.1. Database Layer
All logic depends on SQL integrations (e.g., sql_mac_auth1, sql_mac_auth2).
Designed for:
-
Atomic operations
-
Safe concurrent handling
-
Accurate quota tracking