Using DHCP-Server with Radius we can make it so only authenticated MAC addresses can get a DHCP lease. All non-authenticated MAC addresses cannot get a IP.
Is there a way to make it so authenticated users grab a lease from “pool1”, and non-authenticated users grab from “pool2”?
This way we can have a sign-up screen or some other notification for non-authenticated users.
Non-authenticated users will not get any IP. There is no way to change that.
But instead of sending Access-Reject, Radius server can send Access-Accept
with Framed-Pool = “pool2”.
Set DHCP Server to use pool-2. Lease Timeout something short like 240.
Set Radius to send DEFAULT Access-Accept on failure. Send no other default responses.
On Radius success, have Radius send Framed-Pool=pool-1, Session-Timeout = 1200 (or something longer).
This will send to pool-1 on success, pool-2 on failure. The only issue now with this configuration is that the client likes to keep the same IP number. So if the client was on pool-2, then you authenticate them, they dont like to grab the new number from pool-1. Usually a restart or something like that will clear it up and make them grab from pool-1.
I am now experimenting with a single pool pool-1, but using Queues to block access. Set a default Queue that can pass (almost) no traffic 100bits/100bits. On success, have Radius send a Rate-Limit of 5M/5M that overrides the default queue. This looks promising.
Another problem with DHCP-Radius as opposed to Hotspot-Radius is that with DHCP-Radius we cannot get the user’s MAC address programatically into the signup pages. With hotspot, we have the MAC variable on the html pages. With DHCP-Radius, the radius server knows the mac, but the web page does not.
It would be nice if we could go to the IP address of the mikrotik and have it show the current MAC address to the user. Such as: