Clients connecting to the local wifi are not getting IP
I have a Raspberry pi 4 with pi-hole installed and working in a static ip in my network 172.26.0.25, It doesn't have any firewall installed as far as I know, I didn't install any, and I checked ufw and is not installed, All clients are with dns pointing to pi-hole and working propertly when the router is the DHCP server
I have a router/gateway with ip 172.26.0.1
Everything is working ok
Now I want to setup the pihole as DHCP server, so I activate the DHCP server in the raspberry range from 172.26.0.2 to 172.26.0.254, and I setup some static leases, after that I deactivated the router DHCP server but the pi does not hand ip.
I have another raspberry with static IP in 172.26.15 and pihole installed as well as a backup, with DHCP deactivated, so I believe shouldn't be any problem.
I checked the pihole.log and I see several lines regarding DHCP like
Jun 7 08:12:18 dnsmasq-dhcp[3122]: RTR-SOLICIT(eth0) f0:d7:aa:de:af:ad
Jun 7 08:20:35 dnsmasq-dhcp[3122]: RTR-SOLICIT(eth0) f0:d7:aa:de:af:ad
I guess those are the clients requesting DHCP, however there are no lines of the pi providing the ip, so I guess the Pihole is getting the requests, but is not handind the IP.
If your Pi-hole would be receiving your client's DHCP broadcasts for an IP address, you would see a sequence similar to the following in your logs. (click for details)
So this doesn't look like a Pi-hole problem:
Absence of that sequence would mean that none of your clients' broadcasts ever reach Pi-hole.
This could be the case if your WiFi equipment acts as a L3 switch, constituting a new network segment, limiting broadcasts to that very segment.
Depending on your equipment, you could try to put it into another mode (where it would do L2 switching only), or to enable DHCP relaying, or to let it serve IP addresses via DHCP from a range that does not overlap with Pi-hole's DHCP range, or to disable VLANs, or to correctly configure VLAN routing, or...
Any of these options would best be explored further through your WiFi's manual and/or support forums, which are much more likely to have better information on this.
For attracting users in this forum who might be able to offer advice from similar experiences, it may be of advantage to share your WiFi equipment's make, model and firmware version.
Thank you for your help.
My router is a ZTE F680,
Hardware Version V4.0
Software Version ZTEGF6804P1T18
The router is giving me some trouble, because is quite fast, but I am experiencing some problems like absenceof NAT loopback or traversal Nat, thats why I am thinking about getting a neutral router and setting up this like a bridge.
Anyway, there is no indication in the router about L3 or L2 nor couldn't find anything related to this in the internet.
This is a FTTH router.
I tried your suggestion of it serve IP addresses via DHCP from a range that does not overlap with Pi-hole's DHCP range, but as expected only the router assigns IPS, and if I disconecct the DHCP server in the routerm well, this is the same I did at the very beginning and I don't get any IP.
There is no option to disable VLAN in the router as well.
I realized that there is a firewall in the router, I tried to disable it, but the problem persists.
Well I have investigated a little bit further and It appears thaa tht router is blocking the dhcp traffic, so I don't think that can be solved.
A single router constituting a single network segment (i.e. no VLANs) shouldn't give you any problems, unless it's not properly shutting off DHCP (or in case you are running more than router in your network).
Just a guess:
Some routers offer a guest WiFi network that is separated from the rest of your home network. The idea is to allow friends to surf and check mails without giving them any chance to compromise your local network.
Commonly, routers won't relay DHCP requests from that separate guest subnet by default, and many won't allow you to configure routes in order to overcome this.
Hello,
There is a single router and there is no guest Wifi on this router, it's quite a simple router I guess, It has a wifi on 2.4Ghz and another one on 5Ghz, and two DHCP servers one for v4 and another for v6 and both are disabled
I shut down the DHCP in the router and after that I run
nmap --script broadcast-dhcp-discover on the pi and the response is
Starting Nmap 7.70 ( https://nmap.org ) at 2020-06-07 17:20 CEST
Nmap scan report for dsfsdfs.duckdns.org (172.26.0.1)
Host is up (0.00068s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
23/tcp open telnet
53/tcp open domain
80/tcp open http
139/tcp open netbios-ssn
443/tcp open https
8080/tcp filtered http-proxy
52869/tcp open unknown
MAC Address: 34:DA:B7:BA:DC:AF (Unknown)
So It appears like there is no DHCP server up.
After that I activate the DHCP in pi-hole and run the command again I get
Starting Nmap 7.70 ( https://nmap.org ) at 2020-06-07 17:34 CEST
Pre-scan script results:
| broadcast-dhcp-discover:
| Response 1 of 1:
| IP Offered: 172.26.0.215
| DHCP Message Type: DHCPOFFER
| Server Identifier: 172.26.0.25
| IP Address Lease Time: 2m00s
| Renewal Time Value: 1m00s
| Rebinding Time Value: 1m45s
| Subnet Mask: 255.255.255.0
| Broadcast Address: 172.26.0.255
| Domain Name Server: 172.26.0.25
| Domain Name: lan
|_ Router: 172.26.0.1
Nmap scan report for dsdsds.duckdns.org (172.26.0.1)
Host is up (0.0033s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
23/tcp open telnet
53/tcp open domain
80/tcp open http
139/tcp open netbios-ssn
443/tcp open https
8080/tcp filtered http-proxy
52869/tcp open unknown
MAC Address: 34:DA:B7:BA:DC:AF (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 8.87 seconds
But even so my mobil phone is not getting and Ip from Pi-hole.
The router doesn't have any option for DHCP relay, just something called Network-LAN-DHCP Port with something like this
DEFAULT is not to control DHCP mode.LAN is only get address from onu.WAN is only get address from internet.
Port
Dhcp Mode
LAN1
LAN2
LAN3
LAN4
SSID1
SSID2
SSID3
And you have three options for each line 1.-Default 2,.Wan 3.-Lan
I checked several times, there is no firewall in the raspberry pi where pi-hole is installed and I disable the firewall in the router, I don“t know if the firewall installed in my windows machines or in the Nas can prevent the communication between my cell phone and the pi-hole which prevents the cell phone getting IP, but I don't think so.
So I still believe that there is something in the router preventing the DHCP packets going through.
(You can format your output for readability by using the </> preformatted text menu option. I've just done so for your earlier posts.)
This shows that Pi-hole (at .25) is able to offer a lease if requested, proving that Pi-hole is operational as DHCP server.
However, if that nmap test was run locally from the Pi-hole machine (and you seem to indicate it was), it wouldn't preclude a firewall on that machine interfering with requests originating from other machines on your network. That's why I recommended to verify your firewall settings on your Pi-hole machine.
Since you are saying that no firewall at all is runing on your Pi-hole machine, you'd have to look closer into your router's DHCP options.
I am at a loss as to what the DHCP options you've posted would relate to, and also, they seem to be for a different model than the one you quoted (F660 vs. your actual F680).
The proper place to disable DHCP seems to be this screen on your ZTE F680.
As said before, it it would be advisable to also consult additional sources like your router's manual and/or support forums, which are much more likely to have better information on this.
As per your nmap test, Pi-hole looks to be working as expected, providing DHCP leases as requested.
The DHCP options I posted are the ones I do not know what are for, and I posted in case it could help of be related to the problem, sorry for the confussion, the page where the DHCP server is the one you posted and is the one I was acting on to disable the DHCP.
I am consulting also some other forums and it appears that I am no the only one having the same problem with the router and pihole DHCP server, but I still do nost understand why if the router has the option to disable the DHCP server ( the option in the screen you mentioned), Is impossible to activate another one on the the same lan.
Thanks one again for or the help