Community discussions

MikroTik App
 
owsugde
newbie
Topic Author
Posts: 40
Joined: Thu Oct 06, 2016 5:01 pm

Preventing losses of DHCP leases in order not to have hotspot log out users

Wed Mar 15, 2017 5:41 pm

I am having trouble with a specific detail of Mikrotik routers used as hotspot gateways. First some context: I'm running hotspot networks with a Mikrotik device as the main gateway. In a roaming environment with several access points bridged together, which is rather the norm, client devices sadly tend to lose DHCP leases quite often in a RouterOS environment. The logs tell me that DHCP has deassigned an address from a client and reassigned that same address (max lease times are long) to the station several seconds later. Not quite sure why this needs to happen in the first place. Maybe ROS just takes its time making sure that STP/ARP/addresses are in order aka not doubled somewhere. Also, I'm not sure whether this is device-specific, as not all devices seem to enact this behavior all the time.

Anyhow, if the lease is not renewed within 5 seconds, the hotspot process is informed that the device has left, which in turn logs out the device/user. If RADIUS is used, which is the case here, the RADIUS server in turn is also informed of the logout with reason given as "Lost-Service". This wouldn't be all that dramatic in and of itself, were I not to use a paid service as my RADIUS backend that is pay-per-login (in addition to flat fee). So, several users will keep stacking up logins over the month, inflating the number of logins that are actually used in contrast to what would be needed.
I have been able to work around the situation by disabling RADIUS accounting while enabling MAC cookie login. That way, the interaction with the server is minimized. The biggest drawback I've found is losing the ability to check amounts of data transferred per user in the paid backend, because keeping track of these data would be part of RADIUS interim updates. Even if this isn't so bad really, as there's also a local ROS IP accounting counterpart available, I'd like to have a fully functioning setup of course.

I guess my questions would be:
1a) Is there a way to make the DHCP server more tolerant of roaming stations, such that it doesn't release the leases just in case? If not:
1b) Is there a way to increase the DHCP "re-lease" timeout somehow? 5 seconds can seem awfully short in a roaming environment with heavily loaded access points. And if this isn't possible as well (I for one haven't found such an option in ROS), then:
2) Can somebody come up with a more elegant workaround?
 
OscJoy
just joined
Posts: 1
Joined: Tue May 02, 2017 5:37 pm

Re: Preventing losses of DHCP leases in order not to have hotspot log out users

Tue May 02, 2017 5:39 pm

I have exactly the same issue.
Any about this?
 
User avatar
bajodel
Long time Member
Long time Member
Posts: 552
Joined: Sun Nov 24, 2013 8:30 am
Location: Italy

Re: Preventing losses of DHCP leases in order not to have hotspot log out users

Mon May 08, 2017 10:27 pm

have you set autoritative=yes on mt dhcp server ? (default is delay 2 seconds)
 
owsugde
newbie
Topic Author
Posts: 40
Joined: Thu Oct 06, 2016 5:01 pm

Re: Preventing losses of DHCP leases in order not to have hotspot log out users

Thu May 11, 2017 3:08 pm

Nothing new really, still doing the ugly workaround. Haven't come upon a method to influence the DHCP's behavior yet.

Yes, the hotspot controller is set as DHCP authorative without delay.

Who is online

Users browsing this forum: No registered users and 27 guests