Load Balance DNS (new in 2.01) Fall Back pool not working
I have one DNS server in my LAN some times it crashes (windows….) and sometimes its in maintenance.
I wanted to make a virtual server for DNS with my LAN DNS as the primary pool and my ISPs DNS as fallback pool
I set up an IP alias on the LAN interface.
I set up a pool for my LAN DNS port 53 monitor ICMP
I set up a pool for my ISPs DNSs port 53 monitor ICMP (checked that my ISP DNSs replay to ping)
I set up a Virtual Server with the IP of the IP alias, port 53 and relay protocol DNS (new feature of stating with version 2.01)
On the virtual server I set the LAN DNS Pool as Pool and ISP DNS Pool as fall back pool.
The virtual server doesn't work, on the status page of load balance I see all servers of all pools with red (pink) background and virtual server status as: "Unknown - relayd not running?"
If I change and leave one pool only (not the fall back) it works - I see the server of the pool with green background, virtual server as active with green background and I get DNS replies from the virtual server, I tested this for the two pools, both pools work when alone in the virtual server.
Also in order to make changed I have to delete and recreate the virtual server otherwise the changes don't work.
Is it a bug or am I doing something wrong? Any idea?
Since last I tried it I had problems with relayd and the names of the pools here are the names (relayd status unknow on long names or underscores...):
LanDNS - the pool of the DNSes in the LAN
ISPDNS - pool of the ISP DNS
DNSLB - name of the virtual server.
I added the DNS LB code a while back there, but I can't remember if I tried it with a fallback pool. I was only interested in load balancing between many servers on the same tier and not doing failover in that way.
It may be that the different type of setup for relayd that is required for dns doesn't support the fallback pool syntax being used.
Why is it called DNS load balance what is the specific relation to DNS? does it just mean UDP? will it work also with other UDP load balancing (like SIP…)?
Why isn't UDP just integrated the same as TCP? any chance this problem can be fixed to support the fall back pool? or maybe a configuration change on my side?
Because relayd does not support udp in general, but does support DNS.
From the relayd.conf man page:
The protocol directive is available for a number of different application
layer protocols. There is no generic handler for UDP-based protocols
because it is a stateless datagram-based protocol which has to look into
the application layer protocol to find any possible state information.
(UDP) Domain Name System (DNS) protocol. The requested IDs in
the DNS header will be used to match the state. relayd(8)
replaces these IDs with random values to compensate for
predictable values generated by some hosts.
Handle the HyperText Transfer Protocol (HTTP, or "HTTPS" if
encapsulated in an SSL tunnel).
Generic handler for TCP-based protocols. This is the default.