# Adding pihole DNS to router changes router admin and DHCP pool

**URL:** <https://discourse.pi-hole.net/t/adding-pihole-dns-to-router-changes-router-admin-and-dhcp-pool/71571>\
**Category:** Help\
**Created:** [August 4, 2024, 3:38pm UTC](https://discourse.pi-hole.net/t/adding-pihole-dns-to-router-changes-router-admin-and-dhcp-pool/71571 "2024-08-04T15:38:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [August 4, 2024, 4:33pm UTC](https://discourse.pi-hole.net/t/adding-pihole-dns-to-router-changes-router-admin-and-dhcp-pool/71571/2 "2024-08-04T16:33:02Z")

</div>

The preferred method depends on if you can alter LAN DHCP DNS settings on the router.  
If you can, first check if a client can query Pi-hole and gets a reply when you run below on a Windows, MacOS or Linux client ( **10.0.0.5** below is my Pi-hole IP):

```auto
C:\>nslookup pi.hole 10.0.0.5
Server: pi.hole
Address: 10.0.0.5

Name: pi.hole.home.dehakkelaar.nl
Addresses: fe80::XXX:XXX:XXX:XXX
          10.0.0.5

```

Next check if it blocks a known ad domain (reply should be **0.0.0.0** ):

```auto
C:\>nslookup flurry.com 10.0.0.5
Server: pi.hole
Address: 10.0.0.5

Name: flurry.com
Addresses: ::
          0.0.0.0

```

Next check if a public domain resolves:

```auto
C:\>nslookup pi-hole.net 10.0.0.5
Server: pi.hole
Address: 10.0.0.5

Non-authoritative answer:
Name: pi-hole.net
Address: 3.18.136.52

```

Only when those queries reply positive, you can proceed by changing only the router LAN section DHCP DNS setting.  
No other router settings needs changing!  
Pi-hole should be the sole DNS server for your clients and no others like a fallback DNS:

> [@Why should Pi-hole be my only DNS server?](https://discourse.pi-hole.net/t/why-should-pi-hole-be-my-only-dns-server/3376):
>
> Reduced Ad Blocking Capability The main reason you should Pi-hole as your only DNS server is that you will see increased performance in the blocking of ads. If you have two DNS servers (Pi-hole and something else), your network clients may not always query Pi-hole for name resolution. If a query happens to be answered from a non-Pi-hole DNS server, your block lists will not apply (since that DNS server doesn't know about them). All Queries Need To Go Through Pi-hole First Since other DNS serv…

Next have the PC that you use for testing renews its DHCP lease.  
They usually do when you shortly disconnect them from network.  
And run below **nslookup** again but this time without the Pi-hole IP as an extra argument:

```auto
C:\>nslookup pi.hole
Server: pi.hole
Address: 10.0.0.5

Name: pi.hole.home.dehakkelaar.nl
Addresses: fe80::XXX:XXX:XXX:XXX
          10.0.0.5

```

If that all works, you'd have to let the rest of your clients renew their DHCP leases.  
You can do that all at once by power cycling your router, Wifi AP's and or network switches.  
As soon as the clients detect the restored network connection, they will request a new DHCP lease.

Above is only for the IPv4 part!  
IPv6 is another monster 😉

Docs:

> **[Overview of Pi-hole - Pi-hole documentation](https://docs.pi-hole.net/)**
>
> Brief overview of Pi-hole

---

_[View the full topic](https://discourse.pi-hole.net/t/adding-pihole-dns-to-router-changes-router-admin-and-dhcp-pool/71571)._
