coova / coova-chilli

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

Static IP based PC not getting landing page #271

Open sarfarazengglb opened 8 years ago

sarfarazengglb commented 8 years ago

I have issue in getting landing page for Laptops having static ip.A client having issued ip by dhcp is working fine but any client which is having static ip are not getting Landing page.

irongomme commented 8 years ago

Your client MUST use dhcp because coova manage itself the relation table between mac and ip address generated by coova dhcp

sarfarazengglb commented 8 years ago

Is there any work around .Can you advice part of code which handle it so that is can play with to make it working

Cool34000 commented 8 years ago

Hi,

Chilli handle by default a DHCP range AND a static IP range. But be aware that both ranges need to be within the global range...

Here's my config :

IP, network and netmask of Coova

HS_UAMLISTEN=10.0.0.1 HS_NETWORK=10.0.0.0 HS_NETMASK=255.255.0.0

This is the 4 values you need to add to your config

HS_DYNIP=10.0.0.0 HS_DYNIP_MASK=255.255.254.0 HS_STATIP=10.0.2.0 HS_STATIP_MASK=255.255.255.0

Of course, "DYNIP" is for DYNAMIC and "STAT" is for STATIC... See following examples to understand how it works:

Example 1: Your Coova box has IP address 192.168.1.1/24

So your network address (global range) is 192.168.1.0/255.255.255.0 You can cut this range in 2 parts:

Example 2: Your Coova box has IP address 192.168.1.1/23

So your network address (global range) is 192.168.1.0/255.255.254.0 You can cut this range in 2 parts:

Example 3 (my config): Your Coova box has IP address 10.0.0.1/16

So your network address (global range) is 10.0.0.0/255.255.0.0 You can cut this range in 2 parts (and not fully use it):

Avoid to use very large ranges as it may crash Coova's service! By the way, you can check the status of your IP distribution by typing chilli_query listippool

sarfarazengglb commented 8 years ago

Hey thanks.I will try and update you guys