[opensuse] dnsmasq as dhcp server ?
I'm "helping" my son setting up a Raspi3B+ as a wifi access point. It looks like it's working, but devices (mobile, tab, laptop) that try to use it never send a DHCPACK. I see the DHCPDISCOVER and a DHCPOFFER. I guess I'm missing something in the dnsmasq config ? The access point is only meant to give acess to the Raspi, not the internet. (in the test setup, internet access is available). The idea is to use a tablet as interface to a website running on the Raspi. I wondered about using "Wifi Direct", but it would be kinda cool if other devices could connect too. # egrep -v '^#|^$' /etc/dnsmasq.conf domain-needed user=dnsmasq group=nogroup interface=wlan0 bind-interfaces no-hosts dhcp-range=192.168.7.240,192.168.7.249,12h log-dhcp Any hints? -- Per Jessen, Zürich (20.8°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 17.05.19 um 19:16 schrieb Per Jessen:
I'm "helping" my son setting up a Raspi3B+ as a wifi access point. It looks like it's working, but devices (mobile, tab, laptop) that try to use it never send a DHCPACK. I see the DHCPDISCOVER and a DHCPOFFER. I guess I'm missing something in the dnsmasq config ?
The access point is only meant to give acess to the Raspi, not the internet. (in the test setup, internet access is available). The idea is to use a tablet as interface to a website running on the Raspi. I wondered about using "Wifi Direct", but it would be kinda cool if other devices could connect too.
# egrep -v '^#|^$' /etc/dnsmasq.conf domain-needed user=dnsmasq group=nogroup interface=wlan0 bind-interfaces no-hosts dhcp-range=192.168.7.240,192.168.7.249,12h log-dhcp
Any hints?
About two years ago I had a setup of an access point/router for a guest net running on my Raspi1B (with dns): domain-needed bogus-priv strict-order no-resolv no-poll server=9.9.9.9 local=/site/ interface=eth0 interface=wlan0 expand-hosts domain=site dhcp-range=eth0,192.168.0.50,192.168.0.99,24h dhcp-range=wlan0,192.168.77.100,192.168.77.150,24h dhcp-option=option:domain-search,site cache-size=4096 dhcp-mac=set:client_is_a_pi,B8:27:EB:*:*:* dhcp-reply-delay=tag:client_is_a_pi,2 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hendrik Woltersdorf wrote:
Am 17.05.19 um 19:16 schrieb Per Jessen:
I'm "helping" my son setting up a Raspi3B+ as a wifi access point. It looks like it's working, but devices (mobile, tab, laptop) that try to use it never send a DHCPACK. I see the DHCPDISCOVER and a DHCPOFFER. I guess I'm missing something in the dnsmasq config ?
The access point is only meant to give acess to the Raspi, not the internet. (in the test setup, internet access is available). The idea is to use a tablet as interface to a website running on the Raspi. I wondered about using "Wifi Direct", but it would be kinda cool if other devices could connect too.
# egrep -v '^#|^$' /etc/dnsmasq.conf domain-needed user=dnsmasq group=nogroup interface=wlan0 bind-interfaces no-hosts dhcp-range=192.168.7.240,192.168.7.249,12h log-dhcp
Any hints?
About two years ago I had a setup of an access point/router for a guest net running on my Raspi1B (with dns):
domain-needed bogus-priv strict-order no-resolv no-poll server=9.9.9.9 local=/site/ interface=eth0 interface=wlan0 expand-hosts domain=site dhcp-range=eth0,192.168.0.50,192.168.0.99,24h dhcp-range=wlan0,192.168.77.100,192.168.77.150,24h dhcp-option=option:domain-search,site cache-size=4096 dhcp-mac=set:client_is_a_pi,B8:27:EB:*:*:* dhcp-reply-delay=tag:client_is_a_pi,2
Thanks, I'll be comparing configs. -- Per Jessen, Zürich (14.2°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine. I'm running dnsmasq with dhcp logging, it is clearly receiving a DHCPDISCOVER(wlan0) 00:b5:d0:01:70:37 (a Samsung tab) and responds with DHCPOFFER(wlan0) 192.168.197.224 00:b5:d0:01:70:37 Debugging on the tab is difficult so instead I tried with an openSUSE laptop and ran tcpdump on any interface. Here I see the DHCPDISCOVER request, but I don't see any reply ... So - dnsmasq sends a reply, tcpdump@raspi::wlan0 sees it go out, but tcpdump@toshi1::any does not see it arrive. hostapd output - as far as I can tell, the wifi connection works: https://files.jessen.ch/raspi1-hostapd-messages.txt I have already upgraded hostapd to the latest and greatest - # rpm -qi hostapd Name : hostapd Version : 2.8 Release : lp150.64.1 Architecture: aarch64 Install Date: Fri May 17 16:43:30 2019 Group : Hardware/Wifi Size : 2140404 License : GPL-2.0-only OR BSD-3-Clause Signature : RSA/SHA256, Wed Apr 24 12:10:12 2019, Key ID 5c7fa607ec77fd83 Source RPM : hostapd-2.8-lp150.64.1.src.rpm Build Date : Wed Apr 24 12:10:04 2019 Build Host : obs-arm-7 Relocations : (not relocatable) Vendor : obs://build.opensuse.org/home:mnhauke URL : https://w1.fi/ Summary : Daemon for running a WPA capable Access Point I reverted to 2.6 from Leap15.0 and retried, same result. # rpm -qi hostapd Name : hostapd Version : 2.6 Release : lp150.2.3.2 Architecture: aarch64 Install Date: Sun May 19 11:48:40 2019 Group : Hardware/Wifi Size : 1767470 License : GPL-2.0-only OR BSD-3-Clause Signature : RSA/SHA256, Tue Oct 23 09:38:00 2018, Key ID b88b2fd43dbdc284 Source RPM : hostapd-2.6-lp150.2.3.2.src.rpm Build Date : Tue Oct 23 09:37:09 2018 Build Host : obs-arm-4 Relocations : (not relocatable) Packager : http://bugs.opensuse.org Vendor : openSUSE URL : http://w1.fi/ Summary : Turns Your WLAN Card into a WPA capable Access Point -- Per Jessen, Zürich (14.8°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 19.05.19 um 11:54 schrieb Per Jessen:
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine. The only config option, that might be worth checking IMO, is "bind-interfaces". Did you try to omit it?
Hendrik -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hendrik Woltersdorf wrote:
Am 19.05.19 um 11:54 schrieb Per Jessen:
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine. The only config option, that might be worth checking IMO, is "bind-interfaces". Did you try to omit it?
Will try it right now. -- Per Jessen, Zürich (14.1°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
Hendrik Woltersdorf wrote:
Am 19.05.19 um 11:54 schrieb Per Jessen:
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine. The only config option, that might be worth checking IMO, is "bind-interfaces". Did you try to omit it?
Will try it right now.
No change. Thanks for suggesting things to try out. I have little hair left to pull. -- Per Jessen, Zürich (14.2°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Sonntag, 19. Mai 2019, 21:24:41 CEST schrieb Per Jessen:
Per Jessen wrote:
Hendrik Woltersdorf wrote:
Am 19.05.19 um 11:54 schrieb Per Jessen:
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine.
The only config option, that might be worth checking IMO, is "bind-interfaces". Did you try to omit it?
Will try it right now.
No change. Thanks for suggesting things to try out. I have little hair left to pull.
My setup is a bit different as I'm using a USB WLAN adapter (=>Wlan1) for my hotspot (the internal one is doing the connection to the internal network). Before posting my config, and just in case (because you probably did do that already): did you check the logs if they might show a reason for not continuing the process? My (working) configuration (sensitive items masked): ------8<----------------------------------- /etc/dnsmasq.conf: domain-needed bogus-priv filterwin2k interface=eth0 interface=wlan1 no-dhcp-interface=wlan0 domain=xxxx.yyyyy #Two ranges for two interfaes dhcp-range=192.168.150.50,192.168.150.100,12h dhcp-range=192.168.151.50,192.168.151.100,12h dhcp-option=42,0.0.0.0 log-dhcp conf-dir=/etc/dnsmasq.d/,*.conf ------8<----------------------------------- /etc/hostap.conf (iirc most entries actually are default) interface=wlan1 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=XXXX country_code=DE ieee80211d=1 hw_mode=g channel=1 beacon_int=100 dtim_period=2 max_num_sta=255 rts_threshold=2347 fragm_threshold=2346 macaddr_acl=0 accept_mac_file=/etc/hostapd.accept deny_mac_file=/etc/hostapd.deny auth_algs=1 ignore_broadcast_ssid=0 wmm_enabled=1 wmm_ac_bk_cwmin=4 wmm_ac_bk_cwmax=10 wmm_ac_bk_aifs=7 wmm_ac_bk_txop_limit=0 wmm_ac_bk_acm=0 wmm_ac_be_aifs=3 wmm_ac_be_cwmin=4 wmm_ac_be_cwmax=10 wmm_ac_be_txop_limit=0 wmm_ac_be_acm=0 wmm_ac_vi_aifs=2 wmm_ac_vi_cwmin=3 wmm_ac_vi_cwmax=4 wmm_ac_vi_txop_limit=94 wmm_ac_vi_acm=0 wmm_ac_vo_aifs=2 wmm_ac_vo_cwmin=2 wmm_ac_vo_cwmax=3 wmm_ac_vo_txop_limit=47 wmm_ac_vo_acm=0 ap_max_inactivity=300 ieee80211n=1 ieee80211ac=1 eapol_key_index_workaround=0 eap_server=0 own_ip_addr=127.0.0.1 wpa=2 wpa_passphrase=1234567890 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP CCMP rsn_pairwise=CCMP wpa_group_rekey=600 wpa_gmk_rekey=86400 wpa_ptk_rekey=600 rsn_preauth=1 rsn_preauth_interfaces=eth0 ------8<----------------------------------- /Andreas -- Time flies like an arrow. Fruit flies like a banana. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andreas Mahel wrote:
Am Sonntag, 19. Mai 2019, 21:24:41 CEST schrieb Per Jessen:
Per Jessen wrote:
Hendrik Woltersdorf wrote:
Am 19.05.19 um 11:54 schrieb Per Jessen:
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine.
The only config option, that might be worth checking IMO, is "bind-interfaces". Did you try to omit it?
Will try it right now.
No change. Thanks for suggesting things to try out. I have little hair left to pull.
My setup is a bit different as I'm using a USB WLAN adapter (=>Wlan1) for my hotspot (the internal one is doing the connection to the internal network).
I guess it might make a difference, for instance if there is some sort of issue between hostapd and the raspi's built-in wifi.
Before posting my config, and just in case (because you probably did do that already): did you check the logs if they might show a reason for not continuing the process?
I posted some of them - yes, from dnsmasq and hostapd logs, it looks good. A tcpdump on wlan shows the dhcpoffer going out, but it doesn't arrive (anywhere)
My (working) configuration (sensitive items masked):
I ran a diff and made the following changes to my config; channel=11 -> channel=1 remove driver=nl80211 added ieee80211ac=1 and ieee80211d=1 wpa_pairwise=TKIP CCMP and it works! DHCPREQUEST(wlan0) 192.168.197.224 00:b5:d0:01:70:37 DHCPACK(wlan0) 192.168.197.224 00:b5:d0:01:70:37 Galaxy-Tab-A-2016 I thought the important difference had to be letting driver= default to 'hostapd', but I changed back to double check, still worked. I think the important difference is wpa_pairwise=TKIP CCMP although this really only means rsn_pairwise=TKIP CCMP so I went with #wpa_pairwise=TKIP CCMP rsn_pairwise=TKIP CCMP I double checked again, going back to the default stops the connection working. Thanks for your help Andreas! - it would have taken me a looong time to find that. -- Per Jessen, Zürich (11.3°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 5/20/19 8:14 AM, Per Jessen wrote:
channel=11 -> channel=1 remove driver=nl80211 added ieee80211ac=1 and ieee80211d=1 wpa_pairwise=TKIP CCMP
and it works!
DHCPREQUEST(wlan0) 192.168.197.224 00:b5:d0:01:70:37 DHCPACK(wlan0) 192.168.197.224 00:b5:d0:01:70:37 Galaxy-Tab-A-2016
So, moral of the story is, this had nothing to do with dnsmasq or dhcp or even IP. It was connectivity issue. Your link was never established, so no packets were flowing. Next time when trying to debug something like this, set interface to some fixed IP and try to ping it from the other end. Like, 10.0.0.1/24 and 10.0.0.2/24 Once you have packets flowing, then worry about next layers, like DHCP. Cheers, Adam -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Adam Majer wrote:
On 5/20/19 8:14 AM, Per Jessen wrote:
channel=11 -> channel=1 remove driver=nl80211 added ieee80211ac=1 and ieee80211d=1 wpa_pairwise=TKIP CCMP
and it works!
DHCPREQUEST(wlan0) 192.168.197.224 00:b5:d0:01:70:37 DHCPACK(wlan0) 192.168.197.224 00:b5:d0:01:70:37 Galaxy-Tab-A-2016
So, moral of the story is, this had nothing to do with dnsmasq or dhcp or even IP. It was connectivity issue. Your link was never established, so no packets were flowing.
That was the odd thing - some packets _were_ flowing, at least the DHCPDISCOVER. It also looked a lot like a connection was established, see the hostapd output I posted yesterday. -- Per Jessen, Zürich (11.5°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/05/2019 21.24, Per Jessen wrote:
Per Jessen wrote:
Hendrik Woltersdorf wrote:
Am 19.05.19 um 11:54 schrieb Per Jessen:
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine. The only config option, that might be worth checking IMO, is "bind-interfaces". Did you try to omit it?
Will try it right now.
No change. Thanks for suggesting things to try out. I have little hair left to pull.
The problem is with getting a connection on openSUSE? Wild shot: network manager tries to connect to some opensuse address to see if the connection works. I think you said the connection does not provide Internet, so it might fail at that point :-? -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Carlos E. R. wrote:
On 19/05/2019 21.24, Per Jessen wrote:
Per Jessen wrote:
Hendrik Woltersdorf wrote:
Am 19.05.19 um 11:54 schrieb Per Jessen:
Per Jessen wrote:
Thanks, I'll be comparing configs.
I see no significant differences in the dnsmasq configs and as far as I can tell, when seen from the raspi side, in the beginning it is working fine. The only config option, that might be worth checking IMO, is "bind-interfaces". Did you try to omit it?
Will try it right now.
No change. Thanks for suggesting things to try out. I have little hair left to pull.
The problem is with getting a connection on openSUSE?
The Raspi is running openSUSE Leap15, the clients are Andreoid or openSUSE.
Wild shot: network manager tries to connect to some opensuse address to see if the connection works. I think you said the connection does not provide Internet, so it might fail at that point :-?
No network manager involved :-) -- Per Jessen, Zürich (11.4°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 20/05/2019 08.15, Per Jessen wrote:
Carlos E. R. wrote:
No change. Thanks for suggesting things to try out. I have little hair left to pull.
The problem is with getting a connection on openSUSE?
The Raspi is running openSUSE Leap15, the clients are Andreoid or openSUSE.
Wild shot: network manager tries to connect to some opensuse address to see if the connection works. I think you said the connection does not provide Internet, so it might fail at that point :-?
No network manager involved :-)
Android hates a WiFi connection with no Internet. My camera has a dongle that provides wifi, and an app in Android to use it. My phone connects, then immediately complains that there is no internet and drops it. I have to insist, and the wording is not clear what I have to use to get it to connect even if there is no internet. Works better with some android versions than others. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Am Freitag, 17. Mai 2019, 19:16:42 CEST schrieb Per Jessen:
I'm "helping" my son setting up a Raspi3B+ as a wifi access point. It looks like it's working, but devices (mobile, tab, laptop) that try to use it never send a DHCPACK. I see the DHCPDISCOVER and a DHCPOFFER. I guess I'm missing something in the dnsmasq config ?
The access point is only meant to give acess to the Raspi, not the internet. (in the test setup, internet access is available). The idea is to use a tablet as interface to a website running on the Raspi. I wondered about using "Wifi Direct", but it would be kinda cool if other devices could connect too.
# egrep -v '^#|^$' /etc/dnsmasq.conf domain-needed user=dnsmasq group=nogroup interface=wlan0 bind-interfaces no-hosts dhcp-range=192.168.7.240,192.168.7.249,12h log-dhcp
Any hints?
Not much time now to start my raspi, but I remember that one of the hickups I encountered was due to the fact that the ip range served by dnsmasq was not matching the ip address of the interface (using dnsmaq/hostap on raspi 3b+). -- Time flies like an arrow. Fruit flies like a banana. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Adam Majer
-
Andreas Mahel
-
Carlos E. R.
-
Hendrik Woltersdorf
-
Per Jessen