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

    Diagnostic -> DNS Lookup 127.0.0.1 always 0?

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 4 Posters 479 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.
    • perikoP
      periko
      last edited by

      Hi guys.

      Just wondering why in the section Diagnostic-> DNS Lookup any query I run, the loopback interface (127.0.0.1) always show 0 and the other dns's give us numbers even if we run the same query?

      It means that pfsense won't use that interface here and just use the dns we have in the general settings?

      Thanks for your support team.

      Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
      www.bajaopensolutions.com
      https://www.facebook.com/BajaOpenSolutions
      Quieres aprender PfSense, visita mi canal de youtube:
      https://www.youtube.com/c/PedroMorenoBOS

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        It doesn't always show 0. For example, one I just tested shows 43msec to localhost for the first time I asked it for an address. If I make the same request again, then it shows 0.

        It's 0 the second time because the answer was already in its local cache -- it's that fast.

        A 0 doesn't prevent it from being used. That's just a speed measurement.

        If you state the actual problem you're chasing, it's more likely to result in a solution.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • Raffi_R
          Raffi_
          last edited by

          Jimp is right, but I have seen in my case some queries which I know for sure are not cached, yet I still get 0ms. I think it could be a bug, but it's not really that big of a deal.

          For example, when I just tested this, query to "hemmingway.com" came up with 59ms query time. That makes sense. A second query showed 0ms. That also makes sense due to it being cached from the first query. However, any other query after that will show me 0ms no matter what. With fairly high certainty, I can assume "somerandomsite.com" has not be queried before and is not cached yet it showed me 0ms from 127.0.0.1. I have never understood this and kind of just ignore it at this point. I get the same even if I open a incognito window to ensure that value of 0ms is not cached.

          Raffi

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

            There could be some oddness in the how the gui displays that? Best to do from cmd line on pfsense... Just flush your cache to be sure and then lookup something..

            example..

            [2.4.4-RELEASE][admin@sg4860.local.lan]/root: dig www.cnn.com
            
            ; <<>> DiG 9.12.2-P1 <<>> www.cnn.com
            ;; global options: +cmd
            ;; Got answer:
            ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35371
            ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
            
            ;; OPT PSEUDOSECTION:
            ; EDNS: version: 0, flags:; udp: 4096
            ;; QUESTION SECTION:
            ;www.cnn.com.                   IN      A
            
            ;; ANSWER SECTION:
            www.cnn.com.            3600    IN      CNAME   turner-tls.map.fastly.net.
            turner-tls.map.fastly.net. 3600 IN      A       151.101.185.67
            
            ;; Query time: 190 msec
            ;; SERVER: 127.0.0.1#53(127.0.0.1)
            ;; WHEN: Mon Feb 10 11:18:26 CST 2020
            ;; MSG SIZE  rcvd: 95
            

            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

            Raffi_R 1 Reply Last reply Reply Quote 1
            • perikoP
              periko @Raffi_
              last edited by

              @Raffi_ u got my point.

              Maybe a bug, I see the same behavior.

              This is a test lab, I know that some queries are not in the cache and I get 0 ms in my loopback, is a fresh installation.

              Is not a big deal, just took my attention.

              I'm working on a manual and just want to get clear here.

              U are right Jimp, the dns is working no problem here.

              I can leave with this detail as long the queries flow.

              Thanks all for your knowledge.

              Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
              www.bajaopensolutions.com
              https://www.facebook.com/BajaOpenSolutions
              Quieres aprender PfSense, visita mi canal de youtube:
              https://www.youtube.com/c/PedroMorenoBOS

              1 Reply Last reply Reply Quote 0
              • Raffi_R
                Raffi_ @johnpoz
                last edited by

                @johnpoz said in Diagnostic -> DNS Lookup 127.0.0.1 always 0?:

                There could be some oddness in the how the gui displays that? Best to do from cmd line on pfsense... Just flush your cache to be sure and then lookup something..

                example..

                [2.4.4-RELEASE][admin@sg4860.local.lan]/root: dig www.cnn.com
                
                ; <<>> DiG 9.12.2-P1 <<>> www.cnn.com
                ;; global options: +cmd
                ;; Got answer:
                ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35371
                ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
                
                ;; OPT PSEUDOSECTION:
                ; EDNS: version: 0, flags:; udp: 4096
                ;; QUESTION SECTION:
                ;www.cnn.com.                   IN      A
                
                ;; ANSWER SECTION:
                www.cnn.com.            3600    IN      CNAME   turner-tls.map.fastly.net.
                turner-tls.map.fastly.net. 3600 IN      A       151.101.185.67
                
                ;; Query time: 190 msec
                ;; SERVER: 127.0.0.1#53(127.0.0.1)
                ;; WHEN: Mon Feb 10 11:18:26 CST 2020
                ;; MSG SIZE  rcvd: 95
                

                @johnpoz thanks for the tip. Yes, it works just fine from CLI even without clearing the cache. New queries give different times as expected on the first attempt.

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