RADIUS Server Load Balancing

RADIUS server load balancing

RADIUS server load balancing is a transaction distribution mechanism that

  • distributes batches of AAA transactions across multiple RADIUS servers in a server group

  • assigns each batch to the server with the lowest number of outstanding transactions in its queue, and

  • ensures active utilization of all servers rather than using standby configuration.

Load balancing operation

By default, if two RADIUS servers are configured in a server group, only one is used. The other server acts as standby, if the primary server is declared as dead, the secondary server receives all the load.

If you need both servers to perform transactions actively, you need to enable Load Balancing.


Note


By default, load balancing is not enabled on the RADIUS server group.


If you enable load balancing in a RADIUS server group with two or more RADIUS servers, the Server A and Server B receives a AAA transaction. The transaction queues are checked in Server A and Server B. The server with less number of outstanding transactions are assigned the next batch of AAA transaction.

The process of assigning a batch of transactions is as follows:

  1. The first transaction is received for a new batch.

  2. All server transaction queues are checked.

  3. The server with the lowest number of outstanding transactions is identified.

  4. The identified server is assigned the next batch of transactions.

The batch size is a user-configured parameter. Changes in the batch size may impact CPU load and network throughput. As batch size increases, CPU load decreases, and network throughput increases. However, if a large batch size is used, all available server resources may not be fully utilized. As batch size decreases, CPU load increases and network throughput decreases.


Note


There is no set number for large or small batch sizes. A batch with more than 50 transactions is considered large and a batch with fewer than 25 transactions is considered small.



Note


If a server group contains ten or more servers, we recommend that you set a high batch size to reduce CPU load.


You can configure load balancing either per-named RADIUS server group or for the global RADIUS server group. The load balancing server group must be referred to as "radius" in the authentication, authorization, and accounting (AAA) method lists. All public servers that are part of the RADIUS server group are then load balanced.

You can configure authentication and accounting to use the same RADIUS server or different servers. In some cases, the same server can be used for preauthentication, authentication, or accounting transactions for a session. The preferred server, which is an internal setting and is set as the default, informs AAA to use the same server for the start and stop record for a session regardless of the server cost. When using the preferred server setting, ensure that the server that is used for the initial transaction (for example, authentication), the preferred server, is part of any other server group that is used for a subsequent transaction (for example, accounting).

The preferred server is not used if one of the following criteria is true:

  • The load-balance method least-outstanding ignore-preferred-server command is used.

  • The preferred server is dead.

  • The preferred server is in quarantine.

  • The want server flag has been set, overriding the preferred server setting.

The want server flag, an internal setting, is used when the same server must be used for all stages of a multistage transaction regardless of the server cost. If the want server is not available, the transaction fails.

You can use the load-balance method least-outstanding ignore-preferred-server command if you have either of the following configurations:

  • Dedicated authentication server and a separate dedicated accounting server

  • Network where you can track all call record statistics and call record details, including start and stop records and records that are stored on separate servers

  • The least outstanding load-balancing method in RADIUS is only recommended while doing 802.1X without accounting.

If you have a configuration where authentication servers are a superset of accounting servers, the preferred server is not used.


Note


If a third-party RADIUS load balancer is used and RADIUS packets are routed based on the NAS source port, it is recommended to move to any other rule based on the following Attribute-Value Pairs (AVPs):

  • If the load balancer uses NAS source port in the Access-Request to load balance, rules may not work as expected as the source port in NAS might change during transaction.

  • If the load balancer compares AVPs between Access-Challenge and Access-Request to route packets, you will need to use the AVP value of t-State.

  • If the load balancer compares AVPs in Access-Request from NAS, you will need to use one or a combination of the following AVPs:

    • t-State value

    • Calling-Station-ID and NAS IP or Identifier


Prerequisites for RADIUS server load balancing

This reference lists the prerequisites you must meet before configuring RADIUS Server Load Balancing.

  • Configure Authentication, Authorization, and Accounting (AAA) on the RADIUS server.

  • Configure AAA RADIUS server groups.

  • Configure RADIUS for functions such as authentication, accounting, or static route download.

RADIUS server load balancing restrictions

Use this reference to understand RADIUS Server Load Balancing restrictions and limitations before implementing this feature.

  • Incoming RADIUS requests, such as Packet of Disconnect (POD) requests are not supported.

  • Load balancing is not supported on proxy RADIUS servers and private server groups.

  • Central Web Authentication (CWA) does not support load balancing. CWA and CoA are linked to accounting. With load balancing enabled, the system may send accounting data to a different server than the one processing the CoA request.

  • RADIUS Load Balancing does not support client stickiness during the same session. Do not use it for authentication mechanisms like CWA or CoA. It may impact server clusters when client session ownership changes across servers.

  • The Least-outstanding load-balancing method is not recommended for RADIUS in CWA or NAC scenarios that require CoA and multiple RADIUS transactions. When implementing 802.1X with accounting, this method may lead to inconsistencies, as the system does not send all accounting packets to the same server, potentially impacting the ISE.

Enable load balancing for a named RADIUS server group (CLI)

Enable load balancing to distribute authentication and accounting requests across multiple RADIUS servers in a named server group for improved performance and reliability.
Load balancing for RADIUS server groups helps distribute the authentication load across multiple servers, reducing the risk of server overload and improving response times. This configuration is particularly useful in high-traffic environments where multiple RADIUS servers are available.

Procedure


Step 1

Enter global configuration mode.

Example:

Device# configure terminal

Step 2

Enter server group configuration mode.

Example:

Device(config)# aaa group server radius group-name

Example:

Device(config)# aaa group server radius rad-sg

Step 3

Configure the IP address of the RADIUS server for the group server.

Example:

Device(config-sg-radius)# server ip-address auth-port port-number acct-port port-number

Example:

Device(config-sg-radius)# server 192.0.2.238 auth-port 2095 acct-port 2096

Step 4

Enable the least-outstanding load balancing for a named server group.

Example:

Device(config-sg-radius)# load-balance method least-outstanding batch-size number

Example:

Device(config-sg-radius)# load-balance method least-outstanding batch-size 30

Step 5

Exit server group configuration mode and enter privileged EXEC mode.

Example:

Device(config-sg)# end

Load balancing is now enabled for the named RADIUS server group, allowing authentication and accounting requests to be distributed across multiple RADIUS servers based on the least-outstanding method.