cannot assign ip address - no more free addresses from pool

Hi All,

I have setup a radius server using freeradius. I have setup a test client username and password on the radius server and the Mikrotik router connects fine to the radius server. See Below:

Radius echo

rad_recv: Access-Request packet from host 192.168.2.10:1068, id=43, length=200
NAS-Port-Type = Wireless-802.11
Calling-Station-Id = “00:13:02:D6:6C:DF”
Called-Station-Id = “hotspot1”
NAS-Port-Id = “wlan-AP1”
User-Name = “rudytest”
NAS-Port = 2148532246
Acct-Session-Id = “80100016”
Framed-IP-Address = 10.5.50.249
Mikrotik-Host-IP = 10.5.50.249
CHAP-Challenge = “b\277m.\256~\257\202\322\241+\250~\3516\371”
CHAP-Password = “\003\260\335\235\356\350\237\272;\003ef\256\204\230\334\346”
Service-Type = 1
WISPr-Logoff-URL = “http://10.5.50.1/logout
NAS-Identifier = “Lobo916N1”
NAS-IP-Address = 192.168.2.10
rlm_chap: Setting ‘Auth-Type := CHAP’
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql (sql): Released sql socket id: 4
rlm_chap: login attempt by “rudytest” with CHAP password
rlm_chap: Using clear text password test for user rudytest authentication.
rlm_chap: chap user rudytest authenticated succesfully
rlm_sql (sql): Processing sql_postauth
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): Released sql socket id: 3
Sending Access-Accept of id 43 to 192.168.2.10 port 1068

The user is prompted to login via the mikrotik hotspot page which sends the details to the radius server which authenticates OK but then we gat the error “cannot assign ip address - no more free addresses from pool”

Please mikrotik log below:
12:32:44 dhcp,info,debug dhcp1 assigned 10.5.50.249 to 00:13:02:D6:6C:DF
12:32:58 hotspot,info,debug rudytest (10.5.50.249): trying to log in by http-
chap
12:33:00 hotspot,info,debug rudytest (10.5.50.249): login failed: no address
from ip pool


Please can someone tell me where I am going wrong here. I cannot seem to workout if its the radius our mikrotik

Thanks Mark

I am getting this same exact error, how was this issue resolved ?

I don’t know how they solved it, but I can help you troubleshoot it.

Check “/ip hotspot” and see what dhcp pool is assigned to the hotspot.

Then go to “/ip pool” and see what ip range the dhcp pool has. Should be in the subnet of the hotspot interface (looks like it should be in the 192.168.2.x/24 range). Check in “/ip address” to insure it is the same subnet.

Then check “/ip dhcp-server lease” and see how many have been leased.

hp-pool-33 which has 10.59.50.2-10.59.50.254 available
mesh1 int has ip of 10.59.50.1/24
dhcp leases shows 1 address bound to my laptop.

Are you also using radius? User Manager or FreeRADIUS? What version RouterOS are you using?

Enable radius logging also:

/system logging
add topics=radius action=memory

Then try the login again and check the log. See if it is returning a Mikrotik-Group or Framed-Pool value with Access-Accept.

ok i will try that…

radius,debug new request 3f:10d code=Access-Request service=hotspot called-id=hotspot1
radius,debug sending 3f:10d to 10.0.24.2:1812
radius,debug,packet sending Access-Request with id 58 to 10.0.24.2:1812
radius,debug,packet Signature = 0xe…d90958d9c
radius,debug,packet NAS-Port-Type = 19
radius,debug,packet Calling-Station-Id = “00:17:..:..:..:86”
radius,debug,packet Called-Station-Id = “hotspot1”
radius,debug,packet NAS-Port-Id = “mesh1”
radius,debug,packet User-Name = “shoptest”
radius,debug,packet NAS-Port = 2155872309
radius,debug,packet Acct-Session-Id = “80800035”
radius,debug,packet Framed-IP-Address = 10.59.50.252
radius,debug,packet MT-Host-IP = 10.59.50.252
radius,debug,packet CHAP-Challenge = 0x6699…c7
radius,debug,packet CHAP-Password = 0x00ef…67
radius,debug,packet 75
radius,debug,packet Service-Type = 1
radius,debug,packet WISPr-Logoff-URL = “http://10.59.50.1/logout
radius,debug,packet NAS-Identifier = “rvpark1”
radius,debug,packet NAS-IP-Address = 172.16.25.25
radius,debug,packet received Access-Accept with id 58 from 10.0.24.2:1812
radius,debug,packet Signature = 0x…
radius,debug,packet Acct-Interim-Interval = 600
radius,debug received reply for 3f:10d
hotspot, info, debug shoptest (10.59.50.252): login failed: no address from ip pool

Check under “/ip hotspot user profile” and see if there is an “address-pool” value assigned to any profile (especially “default”).

omg..lol… only after i finally get the HWMPplus mesh network working correctly do I have a problem testing the hotspot… that user profile was it, I had deleted and recreated the hotspot many times, not sure why that was not configured by default on a new hotspot setup.

Thank you again.

You are welcome. The correct setting for the default profile should be “address-pool=none”. In the CLI, it won’t show, and shows “none” in Winbox. According to your radius request above, your client already had a valid ip from the hotspot (10.59.50.252) before the hotspot sent the radius request.

ADD: And if you set that to a specific ip pool, you would have the same trouble if you install a second hotspot on that router. It will use a different ip pool.