Better to install Pi-Hole on router or switch/ RAM usage on Pi Zero

Hello, on a network with two routers and a switch, it is better to connect pi hole on the switch or on the router or it's the same?

Thank you

It should not matter. As long as the Pi-Hole is on the same IP range and subnet as the rest of your network, and has a static IP address, it will work.

My router is on 192.x.x.x range, and pi hole ad 10.x.x.x it's not a problem ? If i use pi hole as dhcp and add the router ip

Why does your Pi-hole have a different subnet than the rest of your network?

It's just the router, that have this IP and i don't know if i need to change the router IP, or because it's a router, i can keep this ip on my router

The router and Pi-Hole need to be on the same address range. If your router range is 192.x.x.x, then the Pi-Hole needs to be 192.x.x.x or the router and Pi-Hole cannot communicate and the other devices connected to the router can't communicate with the Pi.

Example - your router IP is 192.168.0.1. Then your Pi-Hole should have a static IP between 192.168.0.x, where x is an unused IP address in the range 2 to 254.

Ah but I thought the router was able to communicate with several sub networks, it's not his goal?

I deactivated the DHCP server of my router and activated the pi-hole using the same range, and I put the IP address of my router, but I did a leak test DNS and I saw that he was still using the DNS of my router.

I did some tests and I noticed that it was with the IPV6, for example in my NetworkManager if on the IPV6 tab I put "Automatic, DHCP only" there it blocks me all right, and when I was using my ISP router and I had just modified the IPV4 in NetworkManager by putting pi hole in DNS (192.168.1.X) without touching the IPV6 there blocking me anyway without DNS leakage, and without touching the IPV6,

On the other hand on my phone I also had ads even using pi-hole and my router in DHCP server, what can I do, I have to disable the IPV6 on the router?

The router usually acts as a gateway and NAT so that your local devices can connect to the greater internet. Your local network seems to be on 192.168.1.X, so Pi-hole should have an address in that range.
When you change DHCP servers, you should restart devices so they get the new DHCP information.
Some routers, even when you turn off DHCP, still keep DHCPv6 running, which can be a nuisance. This is a router problem, which is out of scope for Pi-hole to try and fix itself.

So i need to disable ipv6 ? I don't know if it's a good idea,

I have some problem with my pi zero as a dhcp server, maybe switch to another pi ?

Why do think it's not a good idea? If you don't need or use IPV6, disabling it will not cause problems.

I don't think will solve your problem. It's not a Pi hardware issue, it's a network configuration issue.

A post was split to a new topic: Cannot get Pi-Hole to work

I don't know why, sometimes the DHCP server is very slow to give me an ip, the pi doesn't respond, i have 400M used on the pi zero don't know why

DHCP servers do very little work. Once every lease period (usually a day), they hand out an IP address to a handful of clients.

I assume this is RAM used? On a Pi Zero with 512MB of RAM this could cause system slowness.

How many domains are on your blocklist, and what method of domain blocking do you use? To test domain blocking method, run dig flurry.com If this returns 0.0.0.0 it's NULL blocking, if the IP of your Pi-Hole it's IP blocking.

I have disabled DHCP on my ISP router and enabled on pi-hole, i don't know why i got blank pages and need to wait with pi-hole as a dhcp server

Yeah it's IP blocking :
;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)

If you have a large number of domains on your blocklists, this can eat up a lot of your RAM. Also, the blocking mode can significantly affect the RAM usage.

What is the full output of these commands:

dig flurry.com

echo ">stats" | nc localhost 4711

; <<>> DiG 9.10.3-P4-Raspbian <<>> flurry.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4741
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;flurry.com. IN A

;; ANSWER SECTION:
flurry.com. 2 IN A 0.0.0.0

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Sep 15 03:09:02 CEST 2018
;; MSG SIZE rcvd: 55

domains_being_blocked 2636003

dns_queries_today 10091
ads_blocked_today 3093
ads_percentage_today 30.651075
unique_domains 1012
queries_forwarded 3909
queries_cached 3089
clients_ever_seen 7
unique_clients 7
dns_queries_all_types 10135
reply_NODATA 554
reply_NXDOMAIN 30
reply_CNAME 764
reply_IP 2299
status enabled

So i need to upgrade to an pi 3 i think

I use a RPI Zero non W in my network for Unbound+Pi-Hole and barely use any ram I think at most 33% is where I top out.

Our home network is not that large maybe twenty devices all dhcp leased the router handles DHCP and I give out DNS through dnsmasq to my pihole.

I block about 500k so not too much just all of Wally's checked lists.

So I wonder what is reallly causing that high memory usage?

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