Community discussions

MikroTik App
 
jarosoup
Long time Member
Long time Member
Topic Author
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Hotspot: Preventing "lost dhcp lease" logout

Fri Jun 16, 2006 6:06 am

Hello all. I've seen this problem on and off for a long time now. I don't think it's a bug, but it'd be nice to handle this more gracefully or understand what conditions cause this.

When using the Hotspot, clients sometimes get logged out due to losing their dhcp lease. I think this is mainly due to signal issues or disconnecting from the network. But, I've noticed that this also happens to users who are active, and log right back in within seconds of getting logged out and have a usable wireless signal. Here's the typical log entry when this happens:
12:51:49 hotspot,info,debug T-00:11:19:B2:43:2A (192.168.187.228): logged out: 
    lost dhcp lease 
Setting the lease time doesn't seem to help this. Nor does the idle timeout, keepalive, or session timeout. I've also tried setting some of these users with a static lease. Nothing seems to change this.

Is there a way to stop or reduce a lost lease logout? Or, what are the conditions that cause the hotspot user to logout relating to dhcp...or how does the dhcp server know about the client's lease? I've been wondering about this for awhile now :? Any way around this? Thanks.
 
Reefbum
Frequent Visitor
Frequent Visitor
Posts: 64
Joined: Sun Apr 23, 2006 12:00 am

Sat Jun 17, 2006 6:35 pm

I have been watching this post for a few days hoping someone would be able to give an answer.

I see the same thing on all of my MT setups.
 
jarosoup
Long time Member
Long time Member
Topic Author
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Mon Jun 19, 2006 9:39 pm

I hate to bump this, but I'd really like to see if anyone at Mikrotik or users here have any input on this ? Please? Glad I'm not the only one that finds this to be a problem...
 
jarosoup
Long time Member
Long time Member
Topic Author
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Fri Jul 07, 2006 9:33 pm

I wanted to update this thread as I've recently upgraded (from 2.9.26) to 2.9.27 on a few of our hotspot routers.

From the changelog:
What's new in 2.9.27:
.
.
*) fixed hotspot to handle lost leases in a more graceful way;
.
.
Well, this indeed seem to have fixed this issue...thanks Mikrotik, you guys rock 8) I haven't noticed any side effects or anything else with this version, and finally people aren't getting logged out so often.

Now, any chance you guys can patch 2.8.28 so we don't have to redo any of these hotspots? :twisted:
 
jarosoup
Long time Member
Long time Member
Topic Author
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Sat Jul 08, 2006 12:08 am

Okay, notcing a new log entry on one of these networks that we upgraded today:
15:42:16 hotspot,info,debug joeblow (192.168.2.164): logged out: host removed: overrided by static entry
Just curious as to what conditions trigger this? I've only seen a few today like this, vs maybe a 100 logouts or more a day due to lost leases, so it's still much improved.
 
nicopretorius
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Mon Nov 15, 2004 9:49 am

Re: Hotspot: Preventing "lost dhcp lease" logout

Sat Oct 12, 2013 12:21 am

Did you ever manage to get to the bottom of this problem? I have the same issue on 5.25. In my case I noticed the problem is specifically occurring in the case where multiple ip pools are used. The problem only occurs on DHCP addresses issued to pools 2,3,4 etc. Clients with DHCP addresses from the primary pool don't get this issue.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot: Preventing "lost dhcp lease" logout

Sat Oct 12, 2013 9:10 am

Did you ever manage to get to the bottom of this problem? I have the same issue on 5.25. In my case I noticed the problem is specifically occurring in the case where multiple ip pools are used. The problem only occurs on DHCP addresses issued to pools 2,3,4 etc. Clients with DHCP addresses from the primary pool don't get this issue.
Here is a more current thread.
http://forum.mikrotik.com/viewtopic.php?f=13&t=76830

Why are you using multiple ip pools? How do you have them set up? Maybe you should post "/ip dhcp-server" and "/ip pool".

Do you have any static dhcp assignments in "/ip dhcp-server lease"?
 
nicopretorius
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Mon Nov 15, 2004 9:49 am

Re: Hotspot: Preventing "lost dhcp lease" logout

Sat Oct 12, 2013 4:19 pm

>>Why are you using multiple ip pools?
Due to the size of the hotspot. It is at an international airport with a Cisco WLAN network with Cisco controllers and during busy times we have more than 2500 active leases. Unfortunately the Mikrotik hotspot setup do not allow you to a specify a supernet and therefore we use multiple pools. One can change the addressing manually after a hotspot setup has been run and use a supernet. However, this makes no difference to the problem.
I believe the problem in our case has to do with the DHCP relay via the Cisco WSM controllers. In order for the Mikrotik DHCP server "to work" in this Cisco environment we have to use a DHCP relay since the Cisco architecture do not allow you to pass traffic directly to the client - it has to go via the controller. The error message and logout happens exactly at the DHCP lease "half life". The client seems to have a problem to confirm an active lease at the DHCP half life and the DHCP lease is then expired and the client logged out.


>>How do you have them set up? Maybe you should post "/ip dhcp-server" and "/ip pool".
Normal DHCP setup with hotspot, but with relaying. Since there are multiple controllers, the relay has to be set to a broadcast address.

/ip dhcp-server> print
Flags: X - disabled, I - invalid
# NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP
0 Hotspot_DHCP WiFi_VLAN 255.255.255.255 Hotspot_Pool1 2h

/ip pool> print
# NAME RANGES
0 Hotspot_Pool1 10.1.24.10-10.1.24.254
1 Hotspot_Pool2 10.1.25.10-10.1.25.254
2 Hotspot_Pool3 10.1.26.10-10.1.26.254
3 Hotspot_Pool4 10.1.27.10-10.1.27.254
4 Hotspot_Pool6 10.1.28.10-10.1.28.254

Etc.....

We have thousands of hotspots and it is only with this "type of setup" (Cisco WLAN controllers) where we get this problem. So it is definitely something with the specific config with the Cisco WLAN controllers. I suspect we have no option but to move the DHCP server to the Cisco environment to solve this.

Do you have any static dhcp assignments in "/ip dhcp-server lease"?
Only for the Cisco controllers, but these are not part of the scope addresses. Their addresses are: 10.1.24.2/21 and 10.1.24.3/21 and the IP address for the WiFi_VLAN interface on the Mikrotik is 10.1.24.1
 
banqatah
just joined
Posts: 1
Joined: Tue May 19, 2015 10:04 am

Re: Hotspot: Preventing "lost dhcp lease" logout

Tue May 19, 2015 10:23 am

I have same problem , please help me
 
nicopretorius
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Mon Nov 15, 2004 9:49 am

Re: Hotspot: Preventing "lost dhcp lease" logout

Tue May 19, 2015 12:48 pm

Our problem was caused by the "next_pool" function. Any IP address in the next pool experienced the problem. The hotspot setup do not allow you to specify anything but a /24 mask, but you can change it manually to a bigger mask.
 
codeck
just joined
Posts: 19
Joined: Sat Oct 29, 2011 4:16 pm

Re: Hotspot: Preventing "lost dhcp lease" logout

Mon Apr 23, 2018 5:09 am

Try to Set address pool to none on ip/hotspot/servers

Who is online

Users browsing this forum: MrRey and 84 guests