Diameter NASREQ Authentication and Accounting
Overview
Diameter NASREQ (Network Access Server Requirements) is specified in IETF RFC 7155Opens in a new tab. It provides AAA services using the Diameter protocol, similar to RADIUS but with the advantages of Diameter's connection-oriented transport and extensive capabilities.
NASREQ is true AAA - it handles authentication, authorisation, and accounting for network access. It is distinct from:
- Policy control (Gx, Npcf) - Traffic treatment decisions
- Charging (Rf, Ro) - Billing and revenue collection
References:
- IETF RFC 7155Opens in a new tab - Diameter Network Access Server Application
- IETF RFC 6733Opens in a new tab - Diameter Base Protocol
- AAA Overview - Understanding AAA vs Policy vs Charging
- Diameter Concepts - Generic Diameter transport configuration
NASREQ in Mobile Networks
NASREQ was originally designed for fixed network access (dial-up, DSL, cable) but can be used in mobile networks for AAA purposes. In 3GPP mobile networks, NASREQ is optional:
3GPP uses:
- HSS/UDM - Primary authentication and subscription data
- Diameter Gx - Policy control (separate concern from AAA)
- Diameter Rf/Ro - Charging (separate concern from AAA)
NASREQ use cases in mobile:
- Interoperability with fixed network AAA infrastructure
- Unified AAA for converged fixed-mobile networks
- Accounting integration with existing Diameter AAA servers
- Replacing RADIUS with Diameter for improved reliability
Note
SMC supports NASREQ for AAA, but many deployments use RADIUS (simpler) or rely on 3GPP-native authentication (HSS/UDM) instead.
Basic Configuration
Enable NASREQ and configure Diameter peers:
See Diameter Concepts for detailed transport configuration.
Authentication with AA-Request/AA-Answer
NASREQ uses AA-Request (AAR) and AA-Answer (AAA) messages for authentication and authorisation.
AA-Request (AAR)
Sent when a user session is being established. Contains:
Standard AVPs:
Session-Id- Unique session identifierAuth-Application-Id- Set to 1 (NASREQ)Origin-Host- SMC node FQDNOrigin-Realm- SMC realmDestination-Realm- AAA server realmAuth-Request-Type- Request type (Authorize-Only, Authorize-Authenticate)User-Name- Subscriber identifier (typically IMSI)NAS-Identifier- Network Access Server identifierNAS-IP-Address- SMC IP addressNAS-Port-Type- Access technology
Mobile-specific AVPs:
3GPP-IMSI- International Mobile Subscriber Identity3GPP-IMEI- International Mobile Equipment Identity3GPP-RAT-Type- Radio Access Technology (2G/3G/4G/5G)3GPP-User-Location-Information- Cell/tracking area locationCalled-Station-Id- APN or DNN nameFramed-IP-Address- Requested IPv4 addressFramed-IPv6-Prefix- Requested IPv6 prefix
AA-Answer (AAA)
Returned by the AAA server in response to AA-Request. Contains:
Standard AVPs:
Session-Id- Same as in AARAuth-Application-Id- Set to 1 (NASREQ)Origin-Host- AAA server FQDNOrigin-Realm- AAA server realmResult-Code- Success or failureDIAMETER_SUCCESS(2001) - Authentication successfulDIAMETER_AUTHENTICATION_REJECTED(4001) - Authentication failedDIAMETER_AUTHORIZATION_REJECTED(5003) - Authorisation failed
Authorisation AVPs (on success):
Framed-IP-Address- Assigned IPv4 addressFramed-IP-Netmask- IPv4 netmaskFramed-IPv6-Prefix- Assigned IPv6 prefixSession-Timeout- Maximum session durationIdle-Timeout- Idle timeoutClass- Operator-specific session dataFilter-Id- Policy filter identifier
Authentication Flow
- User requests session - UE sends Create Session Request (GTP) or Session Establishment Request (PFCP)
- SMC sends AA-Request - Contains authentication information (IMSI, IMEI, location)
- AAA server validates - Checks subscriber database, applies authorisation policies
- Server responds with AA-Answer:
- Success (Result-Code 2001) - Session is established with authorisation attributes
- Failure (Result-Code 4001/5003) - Session is rejected
- SMC processes response - Establishes or rejects session based on Result-Code
Configuration
Authentication configuration is implicit when NASREQ is enabled. Unlike RADIUS, there is no separate authenticate.enabled flag - AA-Request/AA-Answer is always used for sessions requiring AAA.
Accounting with ACR/ACA
NASREQ uses Accounting-Request (ACR) and Accounting-Answer (ACA) messages for accounting.
Accounting Phases
Accounting-Start (ACR)
Sent when a user session is established. Contains:
Standard AVPs:
Session-Id- Unique session identifierOrigin-Host- SMC node FQDNOrigin-Realm- SMC realmDestination-Realm- AAA server realmAccounting-Record-Type- Set toSTART_RECORD(2)Accounting-Record-Number- Sequence number (starts at 1)Acct-Application-Id- Set to 1 (NASREQ)User-Name- Subscriber identifierNAS-Identifier- Network Access Server identifierNAS-IP-Address- SMC IP addressNAS-Port-Type- Access technologyEvent-Timestamp- Session start time
Mobile-specific AVPs:
3GPP-IMSI- International Mobile Subscriber Identity3GPP-IMEI- International Mobile Equipment Identity3GPP-RAT-Type- Radio Access Technology3GPP-User-Location-Information- Cell/tracking area location3GPP-SGSN-Address- Serving gateway addressCalled-Station-Id- APN or DNN nameFramed-IP-Address- User's IPv4 addressFramed-IPv6-Prefix- User's IPv6 prefix
SMC always sends Accounting-Start when aaa.nasreq.enabled: true. There is no separate per-phase enable flag.
Accounting-Interim (ACR)
Sent periodically during an active session. Contains cumulative usage information:
Additional AVPs beyond Start:
Accounting-Record-Type- Set toINTERIM_RECORD(3)Accounting-Record-Number- Incremented sequence numberAcct-Session-Time- Session duration in secondsAcct-Input-Octets- Downlink data volume (32-bit)Acct-Output-Octets- Uplink data volume (32-bit)Acct-Input-Gigawords- Downlink data volume high-order bitsAcct-Output-Gigawords- Uplink data volume high-order bitsAcct-Input-Packets- Downlink packet countAcct-Output-Packets- Uplink packet count
Interim interval controlled by aaa.acctInterimInterval. Set to null to suppress interim records entirely:
Accounting-Stop (ACR)
Sent when a user session terminates. Contains final usage information:
Additional AVPs beyond Interim:
Accounting-Record-Type- Set toSTOP_RECORD(4)Acct-Terminate-Cause- Reason for terminationUSER_REQUEST(1) - Normal user terminationLOST_CARRIER(2) - Connection lostIDLE_TIMEOUT(4) - Session idle timeoutSESSION_TIMEOUT(5) - Maximum duration reachedADMIN_DISCONNECT(6) - Administrative terminationSERVICE_UNAVAILABLE(8) - Service failure
SMC always sends Accounting-Stop when aaa.nasreq.enabled: true. There is no separate per-phase enable flag.
Accounting Configuration
NASREQ sends all accounting phases (Start, Interim, Stop) automatically when enabled. Control the interim interval:
Diameter Transport Configuration
NASREQ uses the generic Diameter transport configuration. See Diameter Concepts for:
- TCP vs SCTP transport
- Socket options (
nodelay,recbuf,sndbuf) - Connection management and peer selection
- Rate limiting
- Resilience and failover
Common Settings
Share Diameter transport with other interfaces:
Standalone Settings
Use dedicated Diameter peers for NASREQ:
Example Configurations
Authentication + AAA Accounting
Full NASREQ AAA with authentication and accounting (all phases are sent automatically):
No Interim Records
Accounting without periodic interim updates:
SCTP with High Throughput
NASREQ over SCTP with optimised socket buffers:
NASREQ vs RADIUS
Both NASREQ and RADIUS are "true AAA" protocols. Key differences:
Choose RADIUS when:
- Simple deployments
- Legacy AAA integration required
- UDP acceptable for reliability
- Lower operational complexity preferred
Choose Diameter NASREQ when:
- Modern 3GPP-aligned architecture
- TCP/SCTP reliability required
- Large data volumes (> 4 GB sessions)
- Complex roaming scenarios
- Unified Diameter infrastructure (with Gx, Rf, Ro)
See RADIUS Authentication for RADIUS-based AAA configuration.
AAA vs Charging
Like RADIUS, Diameter NASREQ is true AAA, distinct from charging:
Diameter NASREQ for AAA (This Document)
Purpose: Identity verification and operational session tracking
Application-Id: 1 (NASREQ)
Messages: AA-Request/AA-Answer (authentication), ACR/ACA (accounting)
Use cases:
- Authenticate subscribers before allowing network access
- Track session establishment for security monitoring
- Audit network usage for operations (not billing)
- Integrate with existing Diameter AAA infrastructure
Diameter Rf for Charging (See Rf Configuration)
Purpose: Billing data collection (CDR generation)
Application-Id: 3 (Accounting)
Messages: ACR/ACA with 3GPP-specific AVPs and charging triggers
Use cases:
- Generate CDRs for offline billing
- Collect usage data per rating group
- Integrate with Offline Charging System (OFCS)
- Revenue assurance and billing reconciliation
Diameter Ro for Charging (See Ro Configuration)
Purpose: Real-time credit control and quota management
Application-Id: 4 (Credit Control)
Messages: CCR/CCA with quota management
Use cases:
- Enforce prepaid quotas
- Real-time credit control with OCS
- Quota management per rating group
- Hybrid online/offline charging
Practical Distinction
Authentication question: "Is this user allowed to connect?"
- NASREQ: AA-Request/AA-Answer
- Result: Access-Accept or Access-Reject
Accounting question: "What happened during the session?" (operations)
- NASREQ: ACR with START/INTERIM/STOP
- Result: Session records for AAA server
Charging question: "How much should we bill?" (revenue)
- Rf: ACR with charging triggers and rating groups
- Ro: CCR with quota requests and grants
- Result: CDRs or real-time quota management for billing
Troubleshooting
No NASREQ Connections
Symptom: Metric diameter_connections{svc="ergw_nasreq"} shows 0.
Possible causes:
- NASREQ not enabled (
nasreq.enabled: false) - Network connectivity issues to Diameter peers
- Incorrect realm configuration
- Firewall blocking TCP/SCTP port 3868
Solution:
Verify NASREQ is enabled:
yamlCheck Diameter connections:
promqlReview connection configuration (see Diameter Concepts)
Check SMC logs:
bash
Authentication Failures
Symptom: Sessions rejected with authentication errors.
Possible causes:
- AAA server returning Result-Code 4001 (Authentication Rejected)
- AAA server returning Result-Code 5003 (Authorisation Rejected)
- AA-Request missing required AVPs
- Realm mismatch between SMC and AAA server
Solution:
Check AAA server logs for rejection reasons
Verify
destinationRealmmatches AAA server realm:yamlReview SMC logs for Diameter errors:
bashVerify subscriber exists in AAA server database
Accounting Messages Not Received
Symptom: AAA server not receiving ACR messages.
Possible causes:
- Accounting phases not enabled
- Diameter connection down
- Rate limiting active
- AAA server not processing NASREQ accounting
Solution:
Verify NASREQ is enabled:
yamlCheck Diameter connections:
promqlReview rate limits (see Diameter Concepts)
Verify AAA server supports NASREQ accounting (Application-Id 1)
InterimInterval Configuration
aaa.acctInterimInterval controls the interval in seconds for all accounting mechanisms, including NASREQ. Set to null to suppress interim records:
Monitoring
Diameter Connections
Monitor NASREQ Diameter connections:
Expected value equals the number of configured peers.
Outstanding Requests
Monitor pending requests per peer:
High values may indicate:
- AAA server slow to respond
- Rate limiting active
- Network latency
Request Latency
Monitor AA-Request and ACR latency:
High latency may indicate:
- AAA server overloaded
- Network congestion
- Suboptimal socket configuration
Related Documentation
- AAA Overview - Understanding the three concerns
- Diameter Concepts - Generic Diameter transport configuration
- RADIUS Authentication - RADIUS-based AAA
- Rf Offline Charging - Diameter offline charging
- Ro Online Charging - Diameter online charging
- Gx Policy Control - Diameter policy control