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.

You are reading Session Management Controller 3.14, an older release. The newest release is 3.17. Go to 3.17

Diameter Transport Configuration

Overview

Diameter is an AAA protocol specified in IETF RFC 6733Opens in a new tab. It is the evolution of RADIUS with improved reliability, security, and extensibility. This document covers generic Diameter transport configuration that applies to all Diameter interfaces in SMC.

SMC uses Diameter for multiple interfaces:

All of these interfaces share common Diameter transport infrastructure documented here.

References:

Transport Configuration

Common Diameter Settings

Diameter interfaces can share common transport settings or use separate per-interface configuration. Common settings are defined under aaa.oss:

yaml

Attributes:

  • interface - Network interface name (references networking.* configuration)
  • ipv4.addr - Source IPv4 address for Diameter connections
  • mtu - Maximum Transmission Unit in bytes
  • destinations - List of Diameter peer addresses and ports (load balanced)
  • destinationRealm - Realm for Diameter routing
  • originFqdn - Fully Qualified Domain Name identifying this node
  • originRealm - Realm identifying this node

Note

The interface and network parameters reference the networking.* configuration section. See Network Configuration for details.

Per-Interface Configuration

Each Diameter interface (Rf, Ro, Gx, NASREQ) can use the common settings or define its own. The standalone parameter controls this behaviour.

Using Common Settings

When standalone is false (or omitted), the interface uses settings from aaa.oss:

yaml

This is efficient when multiple interfaces connect to the same Diameter server (common in test environments).

Using Separate Settings

When standalone is true, the interface uses its own dedicated settings:

yaml

Use separate settings when different interfaces connect to different servers (common in production for separating charging from policy control).

Network Settings Association

Network settings (interface, ipv4.addr, mtu) are configured separately under the networking section:

yaml

Association rule:

  • When aaa.{interface}.standalone is false → uses networking.oss
  • When aaa.{interface}.standalone is true → uses networking.{interface}

See Network Configuration for details on network interface configuration.

Transport Protocol

Diameter supports TCP and SCTP (Stream Control Transmission Protocol) as transport protocols.

yaml

TCP is widely supported and suitable for most deployments. SCTP provides additional features:

  • Multiple streams within a single connection
  • Built-in multi-homing for resilience
  • Message-oriented delivery
  • Head-of-line blocking avoidance

Tip

SCTP is recommended for high-throughput deployments with strict latency requirements. However, ensure network equipment and firewalls support SCTP before enabling.

Default: tcp

Transport Socket Options

Configure transport layer behaviour with transportOpts:

yaml

Socket Options

reuseaddr

When true, allows the socket to bind to an address that is in TIME_WAIT state from a previous connection. This enables faster restarts but may cause issues if old packets arrive.

Default: false

yaml

Tip

Enable reuseaddr in development and test environments for faster restarts. Use with caution in production.

recbuf and sndbuf

Control the kernel socket buffer sizes. Larger buffers improve throughput but consume more memory.

Default: System defaults (typically 128 KB)

yaml

Note

Buffer sizes are specified in kilobytes. The actual buffer may be doubled by the kernel.

Tuning guidelines:

  • Low latency - Keep default or small buffers (128-512 KB)
  • High throughput - Increase buffers (2-8 MB)
  • High latency links - Increase buffers based on bandwidth-delay product
nodelay

When true, sends packets immediately rather than batching them. This disables Nagle's algorithm (TCP_NODELAY / SCTP_NODELAY socket options), which reduces message latency at the cost of slightly higher packet overhead.

Impact:

  • true - Lower latency, higher overhead (more small packets)
  • false - Higher latency, lower overhead (fewer larger packets)

Recommendation: Set to true for Diameter to reduce message latency.

yaml

Diameter messages are typically large enough (hundreds of bytes) that Nagle's algorithm provides minimal benefit, while adding latency.

unordered (SCTP only)

Allows SCTP to deliver messages out of order for better performance. Diameter applications must handle out-of-order messages correctly.

Default: false

yaml

Caution

When unordered is true, the application must not depend on message ordering within a stream. SMC's Diameter implementation handles out-of-order messages correctly, but external peers must also support this.

Connection Management

Peer Selection

SMC maintains connections to multiple Diameter peers and selects the best peer for each request based on:

  1. Connection status - Only up connections are considered
  2. Outstanding requests - Prefer peers with fewer outstanding requests
  3. Rate limit tokens - Prefer peers with available rate limit tokens

The peer with the lowest load is selected for each request.

Load balancing algorithm:

text

This provides simple round-robin behaviour under normal conditions, with automatic failover to healthy peers when issues arise.

Multiple Peers Configuration

Configure multiple peers for load balancing and redundancy:

yaml

Behaviour:

  • Connections to all peers are established at startup
  • Failed connections are retried automatically
  • Requests are distributed across healthy peers
  • No manual failover required

Connection Monitoring

Monitor Diameter connections using the diameter_connections metric. This metric shows the number of active connections per Diameter service.

Example Prometheus query:

promql

Labels:

  • svc - Diameter service name (ergw_rf, ergw_ro, ergw_gx, ergw_nasreq)

Expected values:

  • 0 - No connections (configuration issue or all peers down)
  • N - Number of configured peers (healthy state)
  • < N - Some peers down (partial connectivity)

Connection Failures

When a connection to a Diameter peer fails, SMC automatically attempts to reconnect. Messages are queued or redirected during the reconnection period.

Failure handling per interface:

Caution

During Rf connection failures, offline charging data is stored in SMC memory. Monitor memory consumption carefully during extended outages.

Automatic reconnection:

  • Retry interval starts at 1 second
  • Increases exponentially up to 60 seconds
  • Continues indefinitely until connection succeeds
  • No manual intervention required

Rate Limiting

Per-Peer Rate Limits

Rate limiting prevents overloading Diameter peers. Limits are configured on a per-peer basis using a token bucket algorithm.

yaml

rate

Maximum number of requests per second to the peer. The token bucket refills at a constant rate.

Token refill interval:

text

Example: With rate: 1000, one token is added every 1 ms.

When the rate limit is reached, requests are automatically:

  1. Sent to a different peer (if available)
  2. Queued (if no peers available)
  3. Dropped (if queue is full)

outstanding_requests

Maximum number of requests sent but not yet answered. When this limit is reached, new requests are queued or sent to a different peer.

Purpose: Prevents memory exhaustion from pending requests.

Tuning:

  • Low value (1000-2000) - Tight control, may limit throughput
  • Medium value (5000-10000) - Balanced performance
  • High value (20000+) - Maximum throughput, higher memory usage

Token Bucket Algorithm

Each peer has a token bucket with capacity equal to the rate. Tokens are added at a constant rate:

text

Each request consumes one token. When tokens are exhausted, requests wait for tokens to become available (if queued) or are sent to a different peer.

Algorithm:

  1. Check if tokens are available in bucket
  2. If yes, consume token and send request
  3. If no, try a different peer
  4. If no peers have tokens, queue or drop request

Request Retry Across Peers

When a request cannot be sent to a peer (due to rate limiting, connection failure, or timeout), SMC retries the request to a different peer.

Retry conditions:

  • Connection to the initial peer is down
  • Request times out (fixed timeout: 5000 milliseconds)
  • Rate limit reached for the initial peer

Retry behaviour:

  • Only one retry attempt per peer
  • Retransmitted messages keep the original Hop-by-Hop Identifier
  • Retransmit flag (T bit) is set in retransmitted messages
  • Peers already tried for this request are excluded from retry

Note

The fixed timeout of 5000 milliseconds is not configurable.

Monitoring Rate Limits

Rate limit behaviour is not directly exposed via Prometheus metrics. Monitor indirectly through:

Request latency (increases when rate limited):

promql

Connection load distribution (uneven may indicate rate limiting):

promql

If one peer consistently has more outstanding requests than others, it may indicate:

  • Rate limiting on other peers
  • Connection issues with other peers
  • Uneven peer capacity

Example Configurations

Basic TCP Configuration

Simple configuration with single peer:

yaml

SCTP with Separate Network

Ro interface using SCTP on a dedicated network interface:

yaml

High Availability with Rate Limiting

Multiple peers with rate limiting for high availability and performance:

yaml

Total capacity: 6000 requests/second with automatic failover.

Mixed Interface Configuration

Different interfaces connecting to different servers:

yaml

Troubleshooting

No Diameter Connections

Symptom: Metric diameter_connections shows 0 connections.

Possible causes:

  • Network connectivity issues
  • Firewall blocking TCP/SCTP port 3868
  • Incorrect peer addresses in destinations
  • Diameter realm mismatch
  • Certificate issues (if TLS enabled)

Solution:

  1. Verify network connectivity:

    bash
  2. Check port connectivity:

    bash
  3. Review SMC logs for Diameter connection errors:

    bash
  4. Verify destinationRealm matches the peer's realm configuration

  5. Check that originFqdn and originRealm are correctly configured and match peer expectations

High Latency

Symptom: Diameter request latency increases significantly.

Possible causes:

  • Rate limiting active (peers overloaded)
  • Small socket buffers
  • Nagle's algorithm enabled (nodelay: false)
  • Network congestion
  • Peer processing delays

Solution:

  1. Check peer load distribution (all peers should have similar load):

    promql
  2. Increase socket buffers:

    yaml
  3. Enable nodelay:

    yaml
  4. Increase rate limits if peers can handle more load:

    yaml
  5. Add more peers for better load distribution

Memory Growth During Rf Outage

Symptom: SMC memory usage increases significantly when Rf connection is down.

Cause: Offline charging data is queued in memory during Rf outages.

Solution:

  1. Restore Rf connectivity as soon as possible

  2. Monitor memory usage:

    promql
  3. If memory continues to grow towards the limit:

    • Increase memory limits temporarily
    • Prioritise Rf connection restoration
    • As last resort, restart SMC (loses queued charging data)

Important

Restarting SMC during an Rf outage results in loss of offline charging records that were queued in memory.

Uneven Load Distribution

Symptom: One peer receives significantly more requests than others.

Possible causes:

  • Other peers experiencing connection issues
  • Different rate limits configured per peer
  • One peer responding faster than others

Solution:

  1. Check connection status for all peers:

    promql
  2. Verify rate limits are consistent:

    yaml
  3. Check peer response times (slow peers will accumulate more outstanding requests and receive less load)

  4. If intentional (peers have different capacity), configure appropriate rate limits per peer