r/TPLink_Omada • • 9d ago

Question DNS failover

Is it possible with omada to have DNS failover type behavior?

I had a major crash today that took out my pihole. When that went down my network ground to a halt without DNS. If this happens again I'd like it to failover to Google or cloudflare or something. When it's working correctly I'd like it to only use pihole.

If I just add it to the DNS list my understanding is that both entries will be provided to the clients. If a client chooses to use the secondary DNS then not much I can do about blocking.

I will eventually spin up a second pihole.

Edit. I have and omada software controller with an ER707M2 router.

4 Upvotes

19 comments sorted by

2

u/ticedoff8 9d ago

AD = Active Directory Domain Services (a Microsoft thing).

I have AD setup with 2 DC (Domain Controllers) that are configured as redundant DHCP servers for the clients (some that are Windows (members of the domain) and most that are not AD aware (Linux, IoT, cameras, refrigerator, stove - etc)) and dual DNS servers (the records are sync'ed together).

The 2 DC's DNS records keep the internal networks (LAN & VLAN) name services (ARecords, CNAMES - etc) and the DHCP options point all the clients to those 2 DC as the 2 DNS servers.

The TL ER7206 blocks all port 53 (DNS) traffic from LAN -> WAN (includes all the VLANs) and the 2 DC are set to use the ER7206 as their "forwarder". And the ER7206 has its DoT Server set to Quad9 (for encrypted DNS).

Effectively, if the ER7206 dies, there would be no Internet anyway, but the LAN/VLAN continues to be useful.

I have two ISP (Charter & Frontier) and the ER7206 uses them for A/A load balancing and redundancy. And I have a 2nd (new in the box) ER7206 in case the I need it.

I could do everything except the AD stuff with 2 PiHole or a mix of other open-source DNS / DHCP software.

1

u/acejavelin69 9d ago

I am not sure this is really an Omada specific thing and it would likely depend on which router you are talking about specifically and what is doing DHCP... Normally you would setup the router to do DNS proxy, so in DHCP it hand's out itself as the DNS server (192.168.1.1 or whatever), then you set the routers DNS to be your Pihole as primary and 8.8.8.8/1.1.1.1 (or whatever you want) as secondary. As long as your Pihole responds to the DNS query from the router, it will pass that back to the client that requested (and possibly cache it if you setup that way)... if it gets no response, then it goes to the next DNS server and does a query and passes that back to the client.

0

u/viniisiggs 9d ago

It is an omada question as my setup is an omada software controller and ER707M2 router.

1

u/acejavelin69 9d ago

Then you could do it as I said, or just hand out two DNS servers directly to clients, your pihole and some other one. Clients should use the first dns server first, and the other one only of the first one doesn't respond.

1

u/Agreeable_Extent4293 9d ago

On DHCP, the clients will always attempt to use the primary DNS first and will try the secondary if they receive no response from the first. The only time this might give you trouble is if the primary DNS has AD or something and the secondary doesn't.

1

u/viniisiggs 9d ago

What is AD?

1

u/Agreeable_Extent4293 9d ago

Active Directory and by extension a Domain Controller

2

u/SP3NGL3R 9d ago

I switched to Technitium because it handles it's own clustering and natural failover because DHCP now gets to send two IPs for DNS to all clients. You just need two PCs to run Technitium on first. Maybe your Omada controller server and the pihole server (if they're two different machines).

2

u/Reaper19941 ER7412-M2, SX3008F, SG3210XHP-M2, EAP773, and EAP673-Extender 8d ago

The controller does not have a DNS server on it. It controls the DNS server that is built into the router.

1

u/SP3NGL3R 8d ago edited 8d ago

What?

Wait ... re-reading my post I think I understand what you confused. The "Omada controller server" I'm talking about is not the controller itself but the server it's running on. Mine is a docker container running alongside 50 other apps on a 'server'. So I can run any DNS platform I like "on my Omada controller server" (aka, on the same box as Omada).

2

u/5yleop1m 9d ago

You can run multiple piholes on your network, and then put them as DNS servers in your DHCP config. Which is what I do, except with a different DNS server instead of pihole, but I used to do it with pihole when I setup my network to DNAT all DNS requests.

Omada doesn't have anything to do with this, its a typical feature of any DHCP server to include DNS servers. Most devices will accept 2 DNS servers, but I believe using DHCP options you can add more.

1

u/scriptmonkey420 8d ago

I have my DHCP setup for the Gateway as the Primary and Bind9 on a RasPi as the secondary.

If a client chooses to use the secondary DNS then not much I can do about blocking.

this is why you lock down devices with GPOs

0

u/kraduk1066 8d ago

I'm not sure what the ospf support is like in omada, but a really nice way to do this is with an anycast setup.

0

u/Chrispy_king 9d ago

Are you using Pi-hole for DHCP?

I am and it dishes out the Pi-hole as primary DNS but no secondary AFAIK so if / when Pi-Hole is down everything breaks. Wonder if there’s a way of changing the config for it to dish out maybe 8.8.8.8 or 1.1.1.1 as a secondary DNS to DHCP clients for them to use if the primary PI-Hole address doesn’t respond. But obviously that’s only useful whilst the leases don’t expire as without Pi-Hole there’d be no DHCP too.

1

u/viniisiggs 9d ago

No, omada handles the DHCP. Then the omada DHCP hands out the local address of the pihole for DNS.

4

u/5yleop1m 9d ago

You're over thinking it, just run another pihole and set your DHCP to use both IPs if you want to keep everything local.

without Pi-Hole there’d be no DHCP too

You can run multiple DHCP servers too, but that's a little more complicated. They need to know about each other so they don't fight, and they need to keep reservations in sync.

But a pihole is not an ideal DHCP server.

A simpler setup would be to let your router handle DHCP, and run two piholes on your network.

1

u/Reaper19941 ER7412-M2, SX3008F, SG3210XHP-M2, EAP773, and EAP673-Extender 8d ago

This ^

OP, stop over thinking it.

The DHCP handed out by the router can provide 2 DNS servers to each client. Devices on the network will then reach out to both and whoever answers first with a result is where the devices goes. Having 2 makes no difference and provides redundancy. Why do you think DNS providers have more then 1 DNS IP for you to enter.

0

u/Chrispy_king 8d ago

My crappy router won’t let me change the addresses of DNS it hands out via DHCP (or control leases in any way, like expiry etc) so a quick dirty option was to let Pi-Hole take over that role. It’s not an elaborate setup really, 3x EAP225’s, ISP router and a Pi 2b running Pi-Hole and CUPS. Ideally need “something else” doing DHCP that is neither my router nor Pi-Hole.

1

u/5yleop1m 8d ago

Really depends on your region, but you can fix that with a ~$50 USD or less router and opensource/custom firmware.