ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Nslookup showing hostname, but DIG is not

    IT Discussion
    nslookup dig
    3
    9
    975
    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.
    • IRJI
      IRJ
      last edited by

      If I run nslookup, it shows the hostname

      [user@PCName~]$ nslookup x.x.x.75
      ;; Got recursion not available from x.x.x.167, trying next server
      x.x.x.172.in-addr.arpa	name = hostname.mydomain.org.
      

      If I run dig, it does not

      [user@PCName~]$ dig -x x.x.x.75
      
      ; <<>> DiG 9.11.4-RedHat-9.11.4-1.fc28 <<>> -x x.x.x.75
      ;; global options: +cmd
      ;; Got answer:
      ;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 22718
      ;; flags: qr rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
      ;; WARNING: recursion requested but not available
      
      ;; OPT PSEUDOSECTION:
      ; EDNS: version: 0, flags:; udp: 4096
      ; COOKIE: ee9af342770eded1 (echoed)
      ;; QUESTION SECTION:
      ;x.x.x.172.in-addr.arpa.	IN	PTR
      
      ;; Query time: 0 msec
      ;; SERVER: x.x.x167#53(x.x.x.167)
      ;; WHEN: Fri Aug 03 09:15:34 EDT 2018
      ;; MSG SIZE  rcvd: 66
      
      

      What is going on? I know it is best practice to use dig vs nslookup and I want to create my script using dig, but it is not pulling A records.

      1 Reply Last reply Reply Quote 0
      • IRJI
        IRJ
        last edited by

        hmmm.... looking at this again it looks like x.x.x.167 is not behaving properly. nslookup is using x.x.x.172 to resolve. Is there a way to specify this in dig?

        dafyreD 1 Reply Last reply Reply Quote 0
        • dafyreD
          dafyre @IRJ
          last edited by

          @irj said in Nslookup showing hostname, but DIG is not:

          hmmm.... looking at this again it looks like x.x.x.167 is not behaving properly. nslookup is using x.x.x.172 to resolve. Is there a way to specify this in dig?

          dig ip @othernameserver ?

          dbeatoD IRJI 2 Replies Last reply Reply Quote 0
          • dbeatoD
            dbeato @dafyre
            last edited by

            @dafyre said in Nslookup showing hostname, but DIG is not:

            @irj said in Nslookup showing hostname, but DIG is not:

            hmmm.... looking at this again it looks like x.x.x.167 is not behaving properly. nslookup is using x.x.x.172 to resolve. Is there a way to specify this in dig?

            dig ip @othernameserver ?

            Yep!

            1 Reply Last reply Reply Quote 0
            • IRJI
              IRJ @dafyre
              last edited by

              @dafyre said in Nslookup showing hostname, but DIG is not:

              @irj said in Nslookup showing hostname, but DIG is not:

              hmmm.... looking at this again it looks like x.x.x.167 is not behaving properly. nslookup is using x.x.x.172 to resolve. Is there a way to specify this in dig?

              dig ip @othernameserver ?

              Still not showing A record.

              I am still getting

              ;; WARNING: recursion requested but not available
              1 Reply Last reply Reply Quote 0
              • IRJI
                IRJ
                last edited by

                I tried every DNS server with dig and none are working.

                dafyreD 1 Reply Last reply Reply Quote 0
                • dafyreD
                  dafyre @IRJ
                  last edited by

                  @irj said in Nslookup showing hostname, but DIG is not:

                  I tried every DNS server with dig and none are working.

                  What happens if you...

                  dig ptr ip ?

                  Reverse lookups only work if there's a PTR record for them.

                  1 Reply Last reply Reply Quote 0
                  • dafyreD
                    dafyre
                    last edited by

                    I had the command wrong...

                    dig -x ipaddress

                    1 Reply Last reply Reply Quote 0
                    • IRJI
                      IRJ
                      last edited by

                      Apparently internal PTR is not configured.

                      1 Reply Last reply Reply Quote 2
                      • 1 / 1
                      • First post
                        Last post