DNS Settings with one server down

We have two subnets, with a Windows Domain Controller on each which also act as the DNS server for that subnet (buildings are about a mile apart).

One of the DNS servers is down due a power outage, but the phones on my network take about 40 seconds to complete calls. However, if I remove the other DNS server, calls resolve instantly, like they ought to. If the other server is running, there isn’t any problem.

In System Admin > DNS Settings, I have listed two of my local DNS servers:
192.168.1.2 (local to the PBX)
192.168.5.2 (remote server that serves the other subnet).

Why would there be a lag if the second DNS server cannot be found? Phones shouldn’t need the DNS server to make internal calls to other phones - they’re not identified with any name - just ip addresses via the DHCP server.

Asterisk somehow chokes when DNS resolution is flaky. I remember quite a few articles and posts about it.

Chan-SIP can just lock up without a DNS.
Chan-SIP can also lose its mine when its IP address changes without a reboot.

Phones will have problems when the primary DNS fails. Make sure you have your DNS primaries are set locally, but always include at least one “public” DNS for resolution.

Asterisk has a ‘10-second’ rule about DNS failures. Other devices may default to the Industry Standard ‘30-second’ rule for failing a DNS.

Well, in the DNS settings, I have specified 2 DNS servers. The first one IS online, but the second one is not, due to a power outage. All extensions are chan_sip.

Now, if the first DNS exists, it should resolve without trying to check the secondary DNS server, right? DHCP gives them in the right order.

What seems to be happening is that Freepbx wants to check BOTH DNS servers before resolving via one of them. I expect DNS to resolve with the first server, and if it can’t, then with the second, and in that order. Am I wrong to expect that? (apparently, so)

Not wrong, exactly. In order to load balance servers, the system should check one, then the other, and alternate like that to keep the servers load-balanced. If it gets a hit, it will use the other server first next time. Repeat until the other server comes back up.

Yes, you are. Unless you have something in place that specifically orders the DNS servers, the servers are all checked at once and the one that gives the response first wins. That is how it works.

Hi, Mr. Ray! So, if the second server is the one that is down, then the first server (in the list) is the one that will respond faster - in fact, it will respond normally. Why would the PBX wait for the second one when the first one is already responding?

What I had to do is to remove the second (unresponsive) DNS server from the settings in order to get calls to begin working normally.

Try deleting second DNS.Use only one until your server get online.

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