Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DNS Performance

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Mael
      last edited by

      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 network

      Hopefully 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.

      rules.png
      rules.png_thumb

      1 Reply Last reply Reply Quote 0
      • H Offline
        Harvy66
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • johnpozJ Offline
          johnpoz LAYER 8 Global Moderator
          last edited by

          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 ;)

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • M Offline
            Mael
            last edited by

            @johnpoz:

            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.

            1 Reply Last reply Reply Quote 0
            • johnpozJ Offline
              johnpoz LAYER 8 Global Moderator
              last edited by

              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..

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.