I have a question I’ve been meaning to ask for some time.
I have two RADIUS servers setup in the event of failure, a primary, and secondary. Why won’t RouterOS kick over to a secondary RADIUS server if the primary has excessive time outs?
How does RouterOS handle multiple entries for the same service? It doesn’t appear to use a round robin approach, and even with excessive timeouts to the primary server it won’t fall back and use the secondary.
To be clear, it does use the secondary from time to time, although I don’t see the logic behind it’s choice. I want the authentication to be as seamless to the user as possible. RouterOS’s approach is not seamless, and will continue to attempt to authenticate to a downed primary RADIUS server even though the secondary is online.
Can anyone clarify how RouterOS chooses which RADIUS server to use when multiple are listed?
You can list multiple radius for different services.. one for PPP one for Hotspot, and so on..
To make them work as failover, you should use a netwatch script to enable/disable them on ping…
Why do you need a script? I just tested the /radius failover function with v5.25, and it works fine. The radius servers will be contacted in the order in the “/radius” list IF they qualify for that user. Only if the server does not respond does it use the next server. If the first server accepts the connection (edit: returns a packet actually), the second server will not be used.
Add: If you are getting a lot of timeouts on the primary radius server, maybe you should work on that first. If it is a busy server or on a busy connection, you might want to try extending the timeout value.
/radius
print detail
set 0 timeout=2s
But it will now be 2 seconds before the primary radius server will timeout, and the second server contacted.
Both servers are working properly, I have no problem with the timeout.
The problem is that when the first server goes down. Replication database is every 24 hours.
If using two servers, sometimes the user authenticates to a second server, and that is the problem.
I enable Accounting Backup on the second server but then it does not work when the first server goes down.
Someone already described a similar problem on the forum.
Therefore, a good solution would be to use script to switch servers.
If using two servers, sometimes the user authenticates to a second server, and that is the problem.
That is the problem. Why are your clients authenticating on the second server if the first is working? That sounds like a network problem.
And when you switch servers with a script, the problem will reverse itself. It won’t go away.
With accounting backup on the second server, that may cause a problem. If you are using the second server, that means the first is down. It won’t get any accounting backups. You are wasting your time.
And what does that have to do with it? The router does not try to contact both RADIUS servers at the same time. It tries the first server that qualifies, and IF it does not respond by the timeout, THEN it tries to contact the second server. IF it cannot contact the second server, THEN you get a “RADIUS server not responding” message on the login page.
What I am attempting to tell you is you should have the first server set to backup accounting to the second server, so when the first fails, the second will have current data on your users.
What I am attempting to tell you is you should have the first server set to backup accounting to the second server, so when the first fails, the second will have current data on your users.
Yes, but when the first fails and I set second server to backup accounting, new users will not be able to connect.
I tried, but there is another problem. When I set:
second server with checked Accounting Backup
first server
second server
When first server down new user can authenticate but on the second server, I have two of the same users (double authorization)
First entry is from Accounting Backup, second entry is correct authorization via second server.