coova / coova-chilli

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

cluster mode #473

Open yananet opened 5 years ago

yananet commented 5 years ago

Hello

I want to enable cluster for multiple APs. Following is the only information I could find. https://coova.github.io/mail-archive/chilli/2010-September/001493.html

I successfully compiled with --enable-cluster option, and created 2 raspberry pi APs. Looks to me that HS_PEERID in /etc/chilli/config doesn't work, I manually added peerid "0" and peerkey "something" in /etc/chilli/local.conf, seems it started correctly. I could see some control frames flooded into dhcpif interface. but I found following errors for each AP.

Mar 19 05:14:26 rasp1 chilli[6199]: dhcp_chillipkt(5117): CHILLI: peer 0 decrypting 42 bytes
Mar 19 05:14:26 rasp1 chilli[6199]: dhcp_chillipkt(5129): CHILLI: peer 0 decrypted 40 bytes
Mar 19 05:14:26 rasp1 chilli[6199]: 10 CHILLI: peer 0 error in decrypt final
Mar 19 05:14:27 rasp1 chilli[6199]: dhcp_sendCHILLI(170): CHILLI: peer 0 sending 16 bytes
Mar 19 05:14:28 rasp1 chilli[6199]: dropping non-IPv4
Mar 19 05:14:37 rasp1 chilli[6199]: dhcp_chillipkt(5117): CHILLI: peer 0 decrypting 42 bytes
Mar 19 05:14:37 rasp1 chilli[6199]: dhcp_chillipkt(5129): CHILLI: peer 0 decrypted 40 bytes
Mar 19 05:14:37 rasp1 chilli[6199]: 10 CHILLI: peer 0 error in decrypt final
Mar 19 05:14:38 rasp1 chilli[6199]: dhcp_sendCHILLI(170): CHILLI: peer 0 sending 16 bytes
Mar 19 05:14:45 rasp1 chilli[6199]: dropping non-IPv4
Mar 19 05:14:48 rasp1 chilli[6199]: dhcp_chillipkt(5117): CHILLI: peer 0 decrypting 42 bytes
Mar 19 05:14:48 rasp1 chilli[6199]: dhcp_chillipkt(5129): CHILLI: peer 0 decrypted 40 bytes
Mar 19 05:14:48 rasp1 chilli[6199]: 10 CHILLI: peer 0 error in decrypt final

I cannot see the peer with the command.

pi@rasp1:~ $ sudo chilli_query peers
Peer 0 (*)  00-22-CF-ED-BE-A6 / 192.168.182.1    Active   9 sec
Peer 1      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 2      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 3      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 4      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 5      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 6      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 7      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
pi@rasp1:~ $ 
pi@rasp2:~ $ sudo chilli_query peers
Peer 0      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 1 (*)  00-22-CF-E4-48-FD / 192.168.182.1    Standby  8 sec
Peer 2      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 3      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 4      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 5      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 6      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
Peer 7      00-00-00-00-00-00 / 0.0.0.0          Offline  0 sec
pi@rasp2:~ $ 

How can I make this work?

Smifis commented 5 years ago

Not tried clustering personally, but i'm 100% sure you have an ip addressing issue, Both controllers will need their own ip address as shown in the example you posted

yananet commented 5 years ago

@Smifis Thanks! but unfortunately, I already tried un-duplicated IP addresses and/or MAC addresses for both controllers, but the result was same.

I am assuming this is probably encryption/decryption issue, it would be very helpful if I can disable the encryption, seems to me this is enabled by force.

every time, errors shown as following

sending 16 bytes -> peer decrypting 42 bytes -> peer decrypted 40 bytes -> error in decrypt final