RFC 6733

Diameter Base Protocol
Standards Track Obsoletes: RFC 3588
October 2012
Abstract: Diameter is an AAA (Authentication, Authorization, and Accounting) protocol used throughout 3GPP networks. It provides the signaling framework for subscriber authentication (S6a), policy control (Gx), charging (Gy/Ro), and numerous other interfaces in EPC and 5G interworking.
Canonical source: https://www.rfc-editor.org/rfc/rfc6733  |  IETF Datatracker

1. Introduction

▶

Diameter is the evolution of RADIUS, designed to meet the AAA requirements of modern telecom networks. It provides reliable transport (TCP/SCTP), application-layer acknowledgments, peer discovery, capability negotiation, and extensible AVP-based messaging.

In 3GPP, Diameter is the primary signaling protocol for EPC and interworking with 5G core. Key interfaces include S6a (MME-HSS authentication), Gx (PCC rules), Gy/Ro (online charging), Rx (AF-PCRF IMS policy), and Sh (HSS-AS subscriber data).

2. Message Structure

▶
  0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Version    |                 Message Length                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| R P E T r r r r|                  Command Code               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Application-ID                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Hop-by-Hop ID                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         End-to-End ID                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    AVPs (variable length)                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
R = Request flag, P = Proxiable, E = Error, T = Re-transmitted

3. Base Protocol Commands

▶
Command Abbr Code Description
Capabilities-Exchange-Request/Answer CER/CEA 257 Peer capability negotiation at connection setup
Device-Watchdog-Request/Answer DWR/DWA 280 Connection liveness (heartbeat)
Disconnect-Peer-Request/Answer DPR/DPA 282 Graceful connection teardown
Re-Auth-Request/Answer RAR/RAA 258 Server-initiated re-authentication
Abort-Session-Request/Answer ASR/ASA 274 Server-initiated session abort
Session-Termination-Request/Answer STR/STA 275 Client-initiated session end
Accounting-Request/Answer ACR/ACA 271 Accounting record delivery

4. 3GPP Diameter Applications

▶
Interface Application App-ID Key Commands
S6a/S6d 3GPP S6a 16777251 ULR/ULA, AIR/AIA, CLR/CLA, DSR/DSA
Gx 3GPP Gx 16777238 CCR/CCA, RAR/RAA
Gy/Ro Credit-Control 4 CCR/CCA (INITIAL/UPDATE/TERMINATE)
Rx 3GPP Rx 16777236 AAR/AAA, STR/STA, RAR/RAA, ASR/ASA
Sh 3GPP Sh 16777217 UDR/UDA, PUR/PUA, SNR/SNA
SWx 3GPP SWx 16777265 MAR/MAA, SAR/SAA (non-3GPP access)
S13 3GPP S13 16777252 ECR/ECA (IMEI checking)

5. Routing and Agents

▶
  • Relay agent: Routes messages based on Destination-Realm/Host without understanding application AVPs
  • Proxy agent: Routes and may modify messages (policy enforcement)
  • Redirect agent: Returns routing information without forwarding
  • Translation agent: Translates between Diameter and other protocols (e.g., RADIUS)
  • DRA (Diameter Routing Agent): 3GPP-specific centralized routing (TS 29.216)

6. Security Considerations

▶
  • Diameter MUST be secured with TLS or IPsec for all 3GPP interfaces
  • SCTP association security via IPsec (TS 33.210) is the primary mechanism
  • Diameter does not include message-level encryption — relies on transport security
  • Peer authentication via TLS certificates or IPsec IKE authentication