DNS Performance
-
I recently upgraded my firewall/router from a ZyXEL ZyWALL USG 50 to a pfsense SG-8860-1U. I upgraded because the USG50 maxed out at about 160Mbps and my service is currently 250/10 with 1Gb speeds coming next year. With the SG-8860-1U I'm easily able to hit my 250Mbps limit with the CPU utilization at only 5%. The only challenge I'm facing is that my DNS performance isn't as good.
I'm running an internal active directory server that handles DNS and DHCP for my network. Because of this the DNS Forwarder and DNS Resolver are disabled. My DNS server is set to forward to Google's DNS servers. Where I see performance issues is when my DNS server needs to go out to get any uncached entries. As soon as the entry is cached, subsequent lookups are fast. I've ruled out problems with my DNS server by configuring a local workstation to use Google's DNS servers directly and I see the same performance issue. My ping times to Google's DNS servers average about 24ms. Before I try switching external DNS servers, I'd like to see if I have any obvious configuration issues that might be causing problems. Keep in mind I didn't see these problems until I switched to the SG-8860-1U
Here are some details on how my SG-8860-1U is currently configured:
1. Traffic shaper is disabled. I tried enabling CODELQ as per some of the posts here, but it didn't make a difference.
2. DNS Rebind Checks are disabled
3. Firewall Optimization Options set to Conservative
4. The only additional packages I have installed are the User Certificate Manager and the Zabbix Agent
5. Disable DNS Forwarder is checked
6. DNS Server Override is unchecked
7. I don't have any port forwarding or 1:1 NAT rules defined
8. The attached picture shows the current firewall rules for the LAN network. You'll notice I added an explicit rule for outbound DNS and put it at the top of the list to see if would make a difference and it didn't. In case you're wondering, my LAN2 interface is used for my security cameras and doesn't have any outbound internet access or access to my DNS server. Obviously my DNS issues are for machines on LAN networkHopefully I've supplied enough information, but please let me know if I've left out any crucial details. Any suggestions or help would be appreciated.
-
Have you ran a DNS benchmark to see if it's an inherent issue, and if it confirms, what are the cached and uncached times?
-
So when google has to resolve its slow?? How does that have anything to do with pfsense??
" I've ruled out problems with my DNS server by configuring a local workstation to use Google's DNS servers directly and I see the same performance issue."
So when you query say, www.domain.tld from google.. What do you get for a response time.. And do this multiple times so you know for sure that your getting back something google has cached. You never know the first time you query something maybe google had to forward it or resolve it, etc..
As you noticing this when you changed SG-8860-1U.. How exactly is slow response time from google have anything to do with pfsense? Oh that is a udp packet to google - I will slow that one down. Oh this is a different packet to somewhere else - that I will handle fine ;)
-
As you noticing this when you changed SG-8860-1U.. How exactly is slow response time from google have anything to do with pfsense? Oh that is a udp packet to google - I will slow that one down. Oh this is a different packet to somewhere else - that I will handle fine ;)
This is what I suspected as well, but with all the DNS settings in the firewall I wanted to make sure I wasn't overlooking anything. I've done a lot more testing since my post using DNS Benchmark and other tools. I've tested both going through the firewall and directly to the internet. My conclusion is what johnpoz suggested, this has nothing to do with the SG-8860-1U. I see the same DNS performance issue when I bypass the firewall. I believe this has something to do with my ISP (Wave Broadband). I was originally with Astound who was bought out by Wave back in 2015. When the switch-over to Wave happened, my external IP address never changed. When I switched out the ZyWALL USG 50 with the SG-8860-1U, my external IP address changed to an entirely new IP range. I suspect my route back to the DNS servers became longer, but I don't have any network statistics from before the switch to prove this. On the upside, DNS benchmark has suggested a couple of more reliable and faster Level-3 DNS severs. I will update my forwarder to these and see how things go.
-
How many ms are you you talking.. Are you saying your having clients/apps timeout trying to resolve something that you do no have locally cached. I really find that unlikely..
I think its all in your head.. Oh how come that took 12 ms, its should be 10 sort of thing..