Good to know, thanks!
@xcracker
If using Freeradius, check the file ippool.conf in /etc/freeradius/sql/mysql (or equivalent for your distro). You'll find an "on-clear" query which states something like this:
## This series of queries frees the IP numbers allocated to a
## NAS when an accounting ON record arrives
on-clear = "UPDATE ${ippool_table} \
SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '', \
expiry_time = NULL \
WHERE nasipaddress = '%{Nas-IP-Address}'"
As you can see it will free all IP's coming from your NAS IP. Three options come to my mind:
1- Changing the SQL query to take into account the IP address of the radius server. And that would imply modifying the other accounting queries and the DB to store that info.
2- Put a second IP in a different network in your NAS and in your second radius server, so when NAS contacts Radius the %{NAS-IP-Address} would be different (from the one NAS uses to reach the main Radius server) and the Accounting start won't remove the IP's from your pool. You'll need to edit the allocate-clear query so it won't keep in mind the %{NAS-IP-Address} whe freeing IP's. The reason is that if a user logs in through the 2nd radius and at the time he logs out the 1st radius is up, the %{NAS-IP-Address} wouldn't match and the query wouldn't be able to free up the IP.
3- Have 2 separete pools for each Radius servers. And be quite fast in recovering the first Radius if it goes down!
I would definitely try number 2. Get ready for some serious testing and debugging, tough...