coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
516 stars 258 forks source link

Static IP range is shown as 0.0.0.0 -- why? #223

Open white-rabbit07 opened 8 years ago

white-rabbit07 commented 8 years ago

Hi. I use coova-chilli 1.3.0 on Ubuntu 12.04.5. I want to use static IPs for some clients and set this in etc/chilli/config:

HS_MACAUTH=on              # To turn on MAC Authentication
HS_MACAUTHMODE=local    
HS_MACALLOW="82:B7:5A:3A:FD:03"

HS_STATIP=172.20.7.0
HS_STATIP_MASK=255.255.255.224 
HS_DYNIP=172.20.0.0
HS_DYNIP_MASK=255.255.248.0

When I use "chilli_query listippool" I get this:

Dynamic Pool
------------------------------------------------------------
Unit   0 :  -1/  1 :      172.20.0.2 :
Unit   1 :   0/  2 :      172.20.0.3 :
[...]
and later:
 Static Pool
------------------------------------------------------------
Unit 2045 :  -1/2046 :         0.0.0.0 : static
Unit 2046 : 2045/2047 :         0.0.0.0 : static

Why does 0.0.0.0 and not my static IP range appear there? Thanks for help!

nzamps commented 8 years ago

When a static ip is in-use it is shown like:

-- Static Pool ------------------------------------------------------------ Unit 70 : -inuse- : 192.168.1.56 : static mac=00-0C-01-01-5F-7B ip=192.168.1.56 age=3

white-rabbit07 commented 8 years ago

No, I can't confirm that. My static IPs are not listet there :( Maybe the problem is: I use 172.20.0.0 with netmask 255.255.248.0 for my dynamic pool and 172.20.7.0 with netmask 255.255.255.224 for static adresses.

So: The static pool is PART of the dynamic pool. Of course this is strange -- but when I change it to 172.20.8.0 with netmask 255.255.255.224 (so that both pools are apart from each other) I get this error/warning from chilli: coova-chilli[938]: ippool.c: 483: Static out of range

So: What's the correct setting for dyn. / static IPs?