RADIUS Attributes Reference
Complete reference of RADIUS attributes used by AthenaBNG.
Standard Attributes
Authentication
| Attribute | Type | Description |
|---|---|---|
User-Name | String | Subscriber username (PPPoE) or MAC address (DHCP) |
User-Password | String | Subscriber password (PAP) |
Calling-Station-Id | String | Caller ID (MAC address for DHCP) |
NAS-Identifier | String | BNG identifier (e.g., "AthenaBNG") |
NAS-Port-Id | String | Circuit ID (VLAN interface name) |
NAS-Port | Integer | NAS port number |
NAS-IP-Address | IP Address | BNG management IP |
Authorization
| Attribute | Type | Description |
|---|---|---|
Framed-IP-Address | IP Address | Assigned IP address |
Framed-IP-Netmask | IP Address | Subnet mask (usually 255.255.255.255 for /32) |
Framed-Route | String | Static route (e.g., "0.0.0.0/0 0.0.0.0") |
Session-Timeout | Integer | Session timeout in seconds |
Idle-Timeout | Integer | Idle timeout in seconds |
Service-Type | Integer | Service type (2 = Framed-User) |
Accounting
| Attribute | Type | Description |
|---|---|---|
Acct-Session-Id | String | Session ID (format: abng-<epoch>-<id>) |
Acct-Status-Type | Integer | Start (1), Stop (2), Interim-Update (3) |
Acct-Input-Octets | Integer | Bytes received |
Acct-Output-Octets | Integer | Bytes sent |
Acct-Input-Packets | Integer | Packets received |
Acct-Output-Packets | Integer | Packets sent |
Acct-Session-Time | Integer | Session duration in seconds |
Acct-Terminate-Cause | Integer | Termination reason |
Event-Timestamp | Integer | Event timestamp (Unix epoch) |
Athena VSA (Vendor-Specific Attributes)
Athena VSAs are defined in /opt/athena-bng/contrib/radius/dictionary.athena.
QoS Attributes
| Attribute | Type | Description |
|---|---|---|
Athena-Rate-Down | String | Download rate (e.g., "100mbit", "1gbit") |
Athena-Rate-Up | String | Upload rate (e.g., "40mbit", "500mbit") |
Athena-Overhead-Profile | String | Overhead profile name (e.g., "pppoe_ethernet") |
CGNAT Attributes
| Attribute | Type | Description |
|---|---|---|
Athena-CGNAT-Bypass | Integer | Bypass CGNAT (1 = yes, 0 = no) |
VRF Attributes
| Attribute | Type | Description |
|---|---|---|
Athena-VRF | String | VRF name (e.g., "cgnat", "guest") |
Session Attributes
| Attribute | Type | Description |
|---|---|---|
Athena-Session-Timeout | Integer | Session timeout in seconds |
Athena-Idle-Timeout | Integer | Idle timeout in seconds |
Example Responses
PPPoE Authentication
Access-Accept
User-Name = "user1"
Framed-IP-Address = 203.0.113.10
Framed-IP-Netmask = 255.255.255.255
Framed-Route = "0.0.0.0/0 0.0.0.0"
Session-Timeout = 3600
Athena-Rate-Down = "100mbit"
Athena-Rate-Up = "40mbit"
DHCP/IPoE Authentication
Access-Accept
User-Name = "aa:bb:cc:dd:ee:ff"
Calling-Station-Id = "aa:bb:cc:dd:ee:ff"
Framed-IP-Address = 203.0.113.20
Framed-IP-Netmask = 255.255.255.255
Session-Timeout = 3600
Athena-Rate-Down = "50mbit"
Athena-Rate-Up = "20mbit"
Accounting Start
Accounting-Request
Acct-Status-Type = Start
Acct-Session-Id = "abng-1709312400-1"
User-Name = "user1"
Framed-IP-Address = 203.0.113.10
NAS-Port-Id = "eth1.111.500.100"
NAS-Identifier = "AthenaBNG"
Event-Timestamp = 1709312400
Accounting Stop
Accounting-Request
Acct-Status-Type = Stop
Acct-Session-Id = "abng-1709312400-1"
User-Name = "user1"
Acct-Session-Time = 3600
Acct-Input-Octets = 1234567890
Acct-Output-Octets = 987654321
Acct-Terminate-Cause = User-Request
Attribute Codes
Acct-Terminate-Cause
| Code | Meaning |
|---|---|
| 1 | User-Request |
| 2 | Lost-Carrier |
| 3 | Lost-Service |
| 4 | Idle-Timeout |
| 5 | Session-Timeout |
| 6 | Admin-Reset |
| 7 | Admin-Reboot |
| 8 | Port-Error |
| 9 | NAS-Error |
| 10 | NAS-Request |
| 11 | NAS-Reboot |
| 12 | Port-Unneeded |
| 13 | Port-Preempted |
| 14 | Port-Suspended |
| 15 | Service-Unavailable |
| 16 | Callback |
| 17 | User-Error |
| 18 | Host-Request |
Dictionary Installation
Install Athena VSA dictionary on RADIUS server:
sudo cp /opt/athena-bng/contrib/radius/dictionary.athena /etc/freeradius/3.0/
echo '$INCLUDE dictionary.athena' | sudo tee -a /etc/freeradius/3.0/dictionary
sudo systemctl restart freeradius
Testing
Test with radtest
radtest user1 password123 10.255.0.10 1812 my-secret
Test with radclient
echo "User-Name = user1, User-Password = password123" | \
radclient -x 10.255.0.10:1812 auth my-secret
Next Steps
- RADIUS AAA — RADIUS integration overview
- Configuration — RADIUS configuration