For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

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:

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:

yaml

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 identifier
  • Auth-Application-Id - Set to 1 (NASREQ)
  • Origin-Host - SMC node FQDN
  • Origin-Realm - SMC realm
  • Destination-Realm - AAA server realm
  • Auth-Request-Type - Request type (Authorize-Only, Authorize-Authenticate)
  • User-Name - Subscriber identifier (typically IMSI)
  • NAS-Identifier - Network Access Server identifier
  • NAS-IP-Address - SMC IP address
  • NAS-Port-Type - Access technology

Mobile-specific AVPs:

  • 3GPP-IMSI - International Mobile Subscriber Identity
  • 3GPP-IMEI - International Mobile Equipment Identity
  • 3GPP-RAT-Type - Radio Access Technology (2G/3G/4G/5G)
  • 3GPP-User-Location-Information - Cell/tracking area location
  • Called-Station-Id - APN or DNN name
  • Framed-IP-Address - Requested IPv4 address
  • Framed-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 AAR
  • Auth-Application-Id - Set to 1 (NASREQ)
  • Origin-Host - AAA server FQDN
  • Origin-Realm - AAA server realm
  • Result-Code - Success or failure
    • DIAMETER_SUCCESS (2001) - Authentication successful
    • DIAMETER_AUTHENTICATION_REJECTED (4001) - Authentication failed
    • DIAMETER_AUTHORIZATION_REJECTED (5003) - Authorisation failed

Authorisation AVPs (on success):

  • Framed-IP-Address - Assigned IPv4 address
  • Framed-IP-Netmask - IPv4 netmask
  • Framed-IPv6-Prefix - Assigned IPv6 prefix
  • Session-Timeout - Maximum session duration
  • Idle-Timeout - Idle timeout
  • Class - Operator-specific session data
  • Filter-Id - Policy filter identifier

Authentication Flow

  1. User requests session - UE sends Create Session Request (GTP) or Session Establishment Request (PFCP)
  2. SMC sends AA-Request - Contains authentication information (IMSI, IMEI, location)
  3. AAA server validates - Checks subscriber database, applies authorisation policies
  4. Server responds with AA-Answer:
    • Success (Result-Code 2001) - Session is established with authorisation attributes
    • Failure (Result-Code 4001/5003) - Session is rejected
  5. 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 identifier
  • Origin-Host - SMC node FQDN
  • Origin-Realm - SMC realm
  • Destination-Realm - AAA server realm
  • Accounting-Record-Type - Set to START_RECORD (2)
  • Accounting-Record-Number - Sequence number (starts at 1)
  • Acct-Application-Id - Set to 1 (NASREQ)
  • User-Name - Subscriber identifier
  • NAS-Identifier - Network Access Server identifier
  • NAS-IP-Address - SMC IP address
  • NAS-Port-Type - Access technology
  • Event-Timestamp - Session start time

Mobile-specific AVPs:

  • 3GPP-IMSI - International Mobile Subscriber Identity
  • 3GPP-IMEI - International Mobile Equipment Identity
  • 3GPP-RAT-Type - Radio Access Technology
  • 3GPP-User-Location-Information - Cell/tracking area location
  • 3GPP-SGSN-Address - Serving gateway address
  • Called-Station-Id - APN or DNN name
  • Framed-IP-Address - User's IPv4 address
  • Framed-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 to INTERIM_RECORD (3)
  • Accounting-Record-Number - Incremented sequence number
  • Acct-Session-Time - Session duration in seconds
  • Acct-Input-Octets - Downlink data volume (32-bit)
  • Acct-Output-Octets - Uplink data volume (32-bit)
  • Acct-Input-Gigawords - Downlink data volume high-order bits
  • Acct-Output-Gigawords - Uplink data volume high-order bits
  • Acct-Input-Packets - Downlink packet count
  • Acct-Output-Packets - Uplink packet count

Interim interval controlled by aaa.acctInterimInterval. Set to null to suppress interim records entirely:

yaml

Accounting-Stop (ACR)

Sent when a user session terminates. Contains final usage information:

Additional AVPs beyond Interim:

  • Accounting-Record-Type - Set to STOP_RECORD (4)
  • Acct-Terminate-Cause - Reason for termination
    • USER_REQUEST (1) - Normal user termination
    • LOST_CARRIER (2) - Connection lost
    • IDLE_TIMEOUT (4) - Session idle timeout
    • SESSION_TIMEOUT (5) - Maximum duration reached
    • ADMIN_DISCONNECT (6) - Administrative termination
    • SERVICE_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:

yaml

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:

yaml

Standalone Settings

Use dedicated Diameter peers for NASREQ:

yaml

Example Configurations

Authentication + AAA Accounting

Full NASREQ AAA with authentication and accounting (all phases are sent automatically):

yaml

No Interim Records

Accounting without periodic interim updates:

yaml

SCTP with High Throughput

NASREQ over SCTP with optimised socket buffers:

yaml

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:

  1. Verify NASREQ is enabled:

    yaml
  2. Check Diameter connections:

    promql
  3. Review connection configuration (see Diameter Concepts)

  4. 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:

  1. Check AAA server logs for rejection reasons

  2. Verify destinationRealm matches AAA server realm:

    yaml
  3. Review SMC logs for Diameter errors:

    bash
  4. Verify 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:

  1. Verify NASREQ is enabled:

    yaml
  2. Check Diameter connections:

    promql
  3. Review rate limits (see Diameter Concepts)

  4. 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:

yaml

Monitoring

Diameter Connections

Monitor NASREQ Diameter connections:

promql

Expected value equals the number of configured peers.

Outstanding Requests

Monitor pending requests per peer:

promql

High values may indicate:

  • AAA server slow to respond
  • Rate limiting active
  • Network latency

Request Latency

Monitor AA-Request and ACR latency:

promql

High latency may indicate:

  • AAA server overloaded
  • Network congestion
  • Suboptimal socket configuration