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 Diameter Proxy 1.2, an older release. The newest release is 1.3. Read this page in 1.3

Transports and routing configuration

Each DPR instance (main and for redundancy) should specify configuration of Diameter listeners that accepts incoming Diameter requests and relays where incoming requests are forwarded based on destination realms and destination hosts.

Routing configuration

Each DPR instance must have a unique origin_host configuration. All instances can share the same origin_realm but must have a unique origin_host.

For example:

yaml

To do the routing of Diameter messages, DPR should be able to select a peer where to forward each incoming message.

The diameter_proxy.realms configuration allows you to specify the mapping between destination realms and peers where requests are forwarded.

For example:

yaml

The very first step when any Diameter request arrives to DPR, DPR fetches the value of the Destination-Realm AVP from the given request. DPR tries to find a route within the diameter_proxy.realms list. If such a route is not found, 3002 or DIAMETER_UNABLE_TO_DELIVEVER is immediately returned to the requester. Otherwise, the request is forwarded to one of the specified relays.

In the example above, all requests with the Destination-Realm = destination-realm-a are forwarded to the one of the peers which has origin host - diameter-agent-host-a or diameter-agent-host-b. Any Diameter request with the Destination-Realm = destination-realm-b is forwarded to a peer with origin host diameter-agent-host-c or diameter-agent-host-d.

If a request in addition to the Destination-Realm contains Destination-Host AVP, the request is forwarded specially to the peer with which Origin-Host is matched with the given Destination-Host value. Otherwise, the request is forwarded only based on Destination-Realm to one of the specified relays.

If the sticky session setup is enabled through the diameter_proxy.sticky_session_setup configuration option, all the initial Diameter requests for the same Session-ID AVP are sent over the same peer with the given realm and destination host. The initial requests are:

  • NASREQ AAR
  • Gx CCR-I
  • Gy CCR-I
  • NASREQ Accounting-Start

Transports configuration

To receive and forward requests, you should specify listener and client transports for DPR using the diameter_proxy.transports configuration option.

For example:

yaml

This example shows both types of transports. The first one specifies the listener transport on port 3868. The second transport specifies the client transport towards diameter-agent-host-a:3868.

The URI format is specified by RFC 6733, section 4.3.1, "DiameterURI"Opens in a new tab.

Besides endpoints, each transport can specify transport options:

  • reuseaddr - allows for the reuse of addresses (for example in the TIME_WAIT state)
  • sndbuf - size of send buffer in bytes
  • recbuf - size of receive buffer in bytes
  • nodelay - sets TCP_NODELAY
  • transport_options.connect_timer - value for the RFC 6733 Tc timerOpens in a new tab, in milliseconds
  • transport_options.watchdog_timer - value for the RFC 3539 TwInit initial watchdog timer valueOpens in a new tab, in milliseconds
  • transport_options.pool_size - maximum number of connections to accept for listener transports, or the number of connections to use to connect to a remote agent for clients

Note

For better resource consumption, it is recommended to set transport_options.pool_size to 1 or a low value in general.

endpoints_watcher

DPR has a small additional container named endpoints_watcher. It does not play any role in the Diameter communication, but exists for a more graceful update of Diameter agents where DPR forwards requests. The main purpose of this container is to notify DPR about the upgrade of the Diameter agents it is connected to. As a result, DPR does not send any new Diameter requests towards a Diameter agent that is undergoing the upgrade procedure, but does not terminate the connection towards it.

You can enable the endpoints_watcher with the following configuration option:

yaml