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) |
IPv6 (Dual-Stack)
| Attribute | # | RFC | Type | Description |
|---|---|---|---|---|
Framed-IPv6-Prefix | 97 | RFC 3162 | IPv6 Prefix | On-link WAN prefix for the CE (typically a /64), advertised via RA/SLAAC |
Delegated-IPv6-Prefix | 123 | RFC 4818 | IPv6 Prefix | Prefix delegated to the CE's LANs (e.g. a /56), handed out via DHCPv6 IA_PD |
Both are encoded as reserved(1) | prefix-length(1) | prefix octets (left-aligned,
zero-padded). They are the sole source of a subscriber's IPv6 — there is no
local IPv6 pool. Returning neither yields an IPv4-only session (fail-closed).
See IPv6 / Dual-Stack for the full model.
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
(vendor ID 60001). The dictionary must be loaded by your RADIUS server so it
can parse and return these attributes (Athena-RAD ships it; see
Dictionary Installation).
The complete attribute set:
| # | Attribute | Type | Description |
|---|---|---|---|
| 1 | Athena-Rate-Down | String | Download rate (see rate string format) |
| 2 | Athena-Rate-Up | String | Upload rate (see rate string format) |
| 3 | Athena-Cake-Profile | String | CAKE shaping profile name |
| 4 | Athena-VLAN-Stack | String | VLAN stack descriptor |
| 5 | Athena-Overhead-Profile | String | Overhead profile name (e.g., "pppoe_ethernet") |
| 6 | Athena-Session-Priority | Integer | Session priority |
| 7 | Athena-CGNAT-Bypass | Integer | Bypass CGNAT (1 = yes, 0 = no) |
| 8 | Athena-IPv6-PD-Prefix | String | IPv6 prefix for delegation |
| 9 | Athena-QoS-Burst-Down | String | Download burst allowance |
| 10 | Athena-QoS-Burst-Up | String | Upload burst allowance |
Rate string format
Athena-Rate-Down and Athena-Rate-Up carry the per-subscriber speed plan. The
BNG parses them and applies per-subscriber CAKE shaping. Accepted forms
(case-insensitive):
- A unit-suffixed value:
gbit/gbps/g,mbit/mbps/m,kbit/kbps/k, orbit/bps— e.g."250mbit","1gbit","500kbit". Fractional values such as"1.5gbit"are accepted. - A plain integer, interpreted as bits per second — e.g.
"250000000".
A subscriber whose Access-Accept (or DHCP authorization) returns no
Athena-Rate-Down/Athena-Rate-Up is left UNMETERED — no CAKE shaping is
applied. (Earlier releases defaulted the DHCP/IPoE path to 25/10 Mbps; that is no
longer the case.) Return both attributes to apply a speed plan.
These attributes are honored for both DHCP/IPoE (MAC authentication, via
abng-dhcpd's RADIUS client) and PPPoE (via accel-ppp). For PPPoE, accel-ppp
writes the reply attributes to a radattr file (the pppd-compat radattr-prefix)
and the ip-up hook forwards the rate to abngd.
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"
PPPoE Authentication (Dual-Stack)
Access-Accept
User-Name = "user1"
Framed-IP-Address = 203.0.113.10
Framed-IP-Netmask = 255.255.255.255
Framed-IPv6-Prefix = 2001:df4:2040:1234::/64
Delegated-IPv6-Prefix = 2001:df4:2040:1200::/56
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
- IPv6 / Dual-Stack —
Framed-IPv6-PrefixandDelegated-IPv6-Prefix - Configuration — RADIUS configuration