Forwarding of the AAA RADIUS requests
The RADIUS Proxy (RPR) configuration consists of a list of RADIUS Proxy servers and associated relay servers where the incoming requests are forwarded. Each RADIUS Proxy server specifies a RADIUS listener where incoming RADIUS requests are received. Each relay server specifies a RADIUS server where RADIUS Proxy forwards the incoming RADIUS requests.
RADIUS Proxy supports both Authentication and Accounting RADIUS servers. All the Authentication and Accounting RADIUS servers must be configured in one of the following groups:
- auth - the list of RADIUS Authentication servers.
- acct - the list of RADIUS Accounting servers.
Each RADIUS Authentication proxy server must be configured as auth.{SERVER_NAME}.* and each RADIUS Accounting proxy server must be configured as acct.{SERVER_NAME}.*. The proxy servers may have the following configuration options:
Note
All the configuration options listed below are prefixed with auth., but they are also applicable to the RADIUS Accounting servers configured with the acct. prefix.
-
auth.{SERVER_NAME}.listen - the RADIUS server listener address.
-
auth.{SERVER_NAME}.ports - the list of ports at which RADIUS servers listen for incoming messages. It is recommended to use port
1812for the RADIUS Authentication server and port1813for the RADIUS Accounting server. -
auth.{SERVER_NAME}.sources - the list of sources from which the given RADIUS server is allowed to accept incoming RADIUS messages. Each source has mandatory and optional fields:
- A mandatory source address or a range of addresses in
address/maskformat, defining from where RADIUS Proxy is allowed to accept incoming messages. - A mandatory RADIUS secret, which must match the secret used by the RADIUS client sending the requests to the RADIUS Proxy server.
- An optional nas_id value that specifies the Network Access Server (NAS) identifier. For more information, see the RADIUS server metrics.
RADIUS server silently drops incoming messages with the source address and secret not matching any entry in the list.
Caution
Most RADIUS metrics have labels that specify the NAS name and source IP of the incoming request. Setting wide IP ranges in auth.{SERVER_NAME}.sources, acct.{SERVER_NAME}.sources, or coa.sources may lead to high resource consumption and performance degradation.
- A mandatory source address or a range of addresses in
-
auth.{SERVER_NAME}.allow_attrs - the list of RADIUS attributes to preserve in the forwarded request. If the list is empty, RADIUS Proxy preserves all attributes. Otherwise, only the RADIUS attributes from the list are preserved.
-
auth.{SERVER_NAME}.relays - the list of RADIUS relays where RADIUS Proxy forwards the incoming RADIUS requests. Each relay has mandatory and optional parameters:
- auth.{SERVER_NAME}.relays.{RELAY}.address - a mandatory address, which the RADIUS Proxy uses to forward incoming messages. This can be an IP address or an FQDN. If the FQDN name is provided in the relay, and it resolves to multiple IP addresses, RPR distributes requests to all of them in a random order.
Caution
If the FQDN name can not be resolved, RPR prints an error about it during start-up and exits.
- auth.{SERVER_NAME}.relays.{RELAY}.secret - A mandatory RADIUS secret, which must match the RADIUS secret of the side where the incoming message is forwarded.
- auth.{SERVER_NAME}.relays.{RELAY}.realm - An optional parameter that controls the routing for the given relay. RADIUS Proxy uses realms to determine where to forward the given RADIUS request. A realm is a part of the User-NameOpens in a new tab RADIUS attribute provided in the Network Access IdentifierOpens in a new tab format. If a realm is not specified in the RADIUS relay configuration, such a relay is a
defaultrelay. RPR uses the default relay to forward all requests if no relay with a suitable realm is found.
Note
Each RADIUS server that is configured in RADIUS Proxy must have only one default relay.
- auth.{SERVER_NAME}.relays.{RELAY}.timeout - the number of milliseconds RADIUS Proxy waits for the response. If not specified in the configuration, the default value of
5000is used. - auth.{SERVER_NAME}.relays.{RELAY}.retries - the number of tries to re-send a RADIUS request failed by timeout to the given RADIUS relay. If not specified, the default value of
3is used. If the number of retries for a primary RADIUS server is exhausted, the failover RADIUS servers are used. Only after that, the client returns a response or an error. For more information, see the RADIUS servers for failover scenarios document. - auth.{SERVER_NAME}.relays.{RELAY}.failover_server_pool - the name of a pool of secondary RADIUS servers used for failover scenarios. For more information, see the RADIUS servers for failover scenarios document.
In the next section, you can see a configuration example that may help you better understand these configuration options.
Configuration example for AAA RADIUS requests forwarding
This section provides a RADIUS Proxy configuration example that accepts the incoming RADIUS messages from one side and forwards them to another.
Look at the RADIUS Proxy configuration example:
In the example above, you can see the definition of two RADIUS Proxy servers:
proxy_auth_1proxy_acct_1
The names of RADIUS servers are built by combining the proxy_ prefix with auth or acct and the server identifier. Instead of 1, you can choose any suitable identifier for the RADIUS server. The server identifier only impacts metrics.
The first proxy defines the RADIUS Authentication server, while the second defines the RADIUS Accounting server. Both proxy servers listen on the 0.0.0.0 address but use different ports: the RADIUS Authentication server listens on port 1812, and the RADIUS Accounting server listens on port 1813.
According to the auth.1.sources and acct.1.sources configuration options:
- The RADIUS Authentication server accepts the incoming RADIUS requests only from
172.16.2.1,172.16.2.2, and172.16.2.3addresses. Each request must include one of the configured secrets, with the correct secret determined by the source address of the incoming request.- For all the requests coming from the
172.16.2.1address, the secret must besecret-pgw-1. - For all the requests coming from the
172.16.2.2address, the secret must besecret-pgw-2. - For all the requests coming from the
172.16.2.3address, the secret must besecret-pgw-3.
- For all the requests coming from the
- The RADIUS Accounting server accepts incoming RADIUS requests only from the
172.16.2.1address. All requests from this source must have the secretsecret-pgw-1.
After RADIUS Proxy receives the incoming RADIUS request and it is allowed according to the auth.1.sources or acct.1.sources configuration, the message is forwarded to one of the specified relays.
All the incoming RADIUS Authentication requests are forwarded to one of these relays:
radius-server-1-host:1812radius-server-2-host:1812
All the incoming RADIUS Accounting requests are forwarded to the radius-server-1-host:1813 relay.
Note
All the hostnames in the example above must be valid and resolvable to the IP address(es).
The server where RADIUS Proxy forwards an incoming RADIUS request depends on the content of the request and the value specified in the auth.1.relays[].realm or acct.1.relays[].realm. The incoming request is forwarded to the relay whose realm is matched with the realm specified in the User-NameOpens in a new tab attribute from the incoming request.
If the incoming RADIUS Authentication request contains the pgw-nas realm in the User-Name attribute, RADIUS Proxy forwards this request to the radius-server-2-host:1812 RADIUS server, since this relay is configured to handle the pgw-nas realm.
If there is no relay with a realm matched with the realm from the value of the User-Name attribute, the request is forwarded to the default relay. The default relay is a relay without any realm specified in its configuration. In the example above, the default relay is radius-server-1-host:1812. The secret used for the outgoing RADIUS message is taken from the relay’s configuration.
The RADIUS Accounting server does not specify any relays with a realm in the example above. As a result, all the incoming RADIUS requests are forwarded to the default relay - radius-server-1-host:1813.
The lists of allowed RADIUS attributes specified under auth.1.allow_attrs and acct.1.allow_attrs are empty, so no filters are applied to the incoming RADIUS requests.
This diagram shows the possible flow of RADIUS requests based on the configuration example described above: