Skip to main content

RADIUS Attributes Reference

Complete reference of RADIUS attributes used by AthenaBNG.

Standard Attributes

Authentication

AttributeTypeDescription
User-NameStringSubscriber username (PPPoE) or MAC address (DHCP)
User-PasswordStringSubscriber password (PAP)
Calling-Station-IdStringCaller ID (MAC address for DHCP)
NAS-IdentifierStringBNG identifier (e.g., "AthenaBNG")
NAS-Port-IdStringCircuit ID (VLAN interface name)
NAS-PortIntegerNAS port number
NAS-IP-AddressIP AddressBNG management IP

Authorization

AttributeTypeDescription
Framed-IP-AddressIP AddressAssigned IP address
Framed-IP-NetmaskIP AddressSubnet mask (usually 255.255.255.255 for /32)
Framed-RouteStringStatic route (e.g., "0.0.0.0/0 0.0.0.0")
Session-TimeoutIntegerSession timeout in seconds
Idle-TimeoutIntegerIdle timeout in seconds
Service-TypeIntegerService type (2 = Framed-User)

Accounting

AttributeTypeDescription
Acct-Session-IdStringSession ID (format: abng-<epoch>-<id>)
Acct-Status-TypeIntegerStart (1), Stop (2), Interim-Update (3)
Acct-Input-OctetsIntegerBytes received
Acct-Output-OctetsIntegerBytes sent
Acct-Input-PacketsIntegerPackets received
Acct-Output-PacketsIntegerPackets sent
Acct-Session-TimeIntegerSession duration in seconds
Acct-Terminate-CauseIntegerTermination reason
Event-TimestampIntegerEvent timestamp (Unix epoch)

Athena VSA (Vendor-Specific Attributes)

Athena VSAs are defined in /opt/athena-bng/contrib/radius/dictionary.athena.

QoS Attributes

AttributeTypeDescription
Athena-Rate-DownStringDownload rate (e.g., "100mbit", "1gbit")
Athena-Rate-UpStringUpload rate (e.g., "40mbit", "500mbit")
Athena-Overhead-ProfileStringOverhead profile name (e.g., "pppoe_ethernet")

CGNAT Attributes

AttributeTypeDescription
Athena-CGNAT-BypassIntegerBypass CGNAT (1 = yes, 0 = no)

VRF Attributes

AttributeTypeDescription
Athena-VRFStringVRF name (e.g., "cgnat", "guest")

Session Attributes

AttributeTypeDescription
Athena-Session-TimeoutIntegerSession timeout in seconds
Athena-Idle-TimeoutIntegerIdle 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

CodeMeaning
1User-Request
2Lost-Carrier
3Lost-Service
4Idle-Timeout
5Session-Timeout
6Admin-Reset
7Admin-Reboot
8Port-Error
9NAS-Error
10NAS-Request
11NAS-Reboot
12Port-Unneeded
13Port-Preempted
14Port-Suspended
15Service-Unavailable
16Callback
17User-Error
18Host-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