Pihole delivers wired DHCP gateway to Wireless network

Please follow the below template, it will help us to help you!

Expected Behaviour:

Hi i'm trying to configure Pihole as DNS and DHCP server for both my Wired and Wireless networks
RPI3 running PiHole is configured as follow :
Eth0 : Wired network 192.168.1.0/24 default gw .254 (my isp router)
Wlan0 : Wireless network 172.17.19.0/24 with RPI3 as default gw (.254)

I configured in PiHole gui the DHCP tab with my wired network
dhcp scope : 192.168.1.1 to 192.168.1.250
dhcp router : 192.168.1.254

DNS and dhcp is working properly on this Wired network

In order to also deliver dhcp on the Wireless Network i added dnsmasq-wlan0.conf file in directroy /etc/dnsmaq.d with these options :

interface=wlan0
bind-interfaces
domain-needed
domain=home.wifi
dhcp-authoritative
bogus-priv
dhcp-range=172.17.19.1,172.17.19.250,24h
dhcp-option=option:router,172.17.19.254

Actual Behaviour:

When i connect a machine to this Wireless network it receives an IP address in the scope 172.17.19.1-250 (thast's ok) but pihole/dnsmasq ignore the dhcp-option router and does not deliver
the gateway 172.17.19.254 to the macine (but tells 192.168.1.254 is the gateway :frowning: )

Int the pihole.log file i see that dhcp-option3 is ignored

Aug 16 19:07:52 dnsmasq-dhcp[6263]: DHCPDISCOVER(wlan0) 64:80:99:e4:22:44
Aug 16 19:07:52 dnsmasq-dhcp[6263]: DHCPOFFER(wlan0) 172.17.19.144 64:80:99:e4:22:44
Aug 16 19:07:52 dnsmasq-dhcp[6263]: Ignoring duplicate dhcp-option 3
Aug 16 19:07:52 dnsmasq-dhcp[6263]: DHCPREQUEST(wlan0) 172.17.19.144 64:80:99:e4:22:44
Aug 16 19:07:52 dnsmasq-dhcp[6263]: Ignoring domain dom1.xxx.net for DHCP host name L-5CG61276CC
Aug 16 19:07:52 dnsmasq-dhcp[6263]: DHCPACK(wlan0) 172.17.19.144 64:80:99:e4:22:44 L-5CG61276CC
Aug 16 19:07:52 dnsmasq-dhcp[6263]: Ignoring duplicate dhcp-option 3

So i would like to know how to configure PiHole/dnsmasq in order to deliver the right default gateway on bothe my wired and Wireless network

Thanks and regards

Do the wired and wireless networks really need two different separate subnets ?
Is it not possible to configure only one DHCP range on the Pi-hole web GUI for both wired and wireless ?
That way you wont have to fiddle with the dnsmasq config files.
And you wont need two default routes for the two networks.

Hello,
yes i want to manage 2 different subnets (wired an wireless)
and the solution was to add eth0/wlan in dhcp-option or dhcp-range lines ie
dhcp-range=wlan0,172.17.19.1,172.17.19.250,24h
dhcp-option=wlan0,option:router,172.17.19.254

Problem is solved :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.