The maximum number of consecutively sent packets to which a RADIUS server does not respond can be set using the radius-server dead-count count command. The interval between the first ignored packet and the packet ignored for the specified times can be set using the radius-server dead-interval interval-value command.
Master/backup server selection policy when a packet is sent for the first time:
The master server (which has an internal index of 0) that is Up is selected. If the master server is Down, the server that most recently received packets is selected. If there is no such server, the one that first went Up is searched for based on the server configuration sequence in the server group. If no server is found, the one first configured in the server group is selected.
Master/backup server selection policy in retransmission timeout conditions:
If the sum of weights of the RADIUS servers is greater than 0, a random seed is generated with a value smaller than the sum of weights of the RADIUS servers. A server is then selected among the collection of RADIUS servers to send packets based on the value of the random seed and the weights of the RADIUS servers. To be specific, the first RADIUS server that meets the following requirement is selected:
Sum of weights of all the RADIUS servers before this server ≤ Value of the random seed < (Weight of this server + Sum of weights of all the RADIUS servers before this server)
For example, there are four servers with the weights 1, 2, 3, and 4, respectively. The sum of weights is 10. The value of the random seed generated ranges from 0 to 9. If the value of the generated random seed is 0, the server with weight 1 is selected. If the value of the seed is 1 or 2, the server with weight 2 is selected. If the value of the seed is 3, 4, or 5, the server with weight 3 is selected. If the value of the seed is 6, 7, 8, or 9, the server with weight 4 is selected.