GithubHelp home page GithubHelp logo

Comments (4)

MichaCo avatar MichaCo commented on May 18, 2024

you should get 2 NS records back from lookupClient in your example. Each one has 1 MName.

quickly tested it, just in case...
returns:

...
;; ANSWER SECTION:
hourstrackercloud.com.          3360    IN      NS      ns71.domaincontrol.com.
hourstrackercloud.com.          3360    IN      NS      ns72.domaincontrol.com.
...

from dnsclient.net.

davidpeden3 avatar davidpeden3 commented on May 18, 2024

So the type of query I did is QueryType.SOA and it only returns a single record (as expected for the query type). Having said that, I had not tried running a query of type QueryType.NS. That does return two records as expected (and as your updated comment above shows).

Is it reasonable to expect the API surface for a SoaRecord to contain the related NsRecords in the object graph? Personally, I think it's odd that it doesn't.

How does a QueryType.NS query work under the hood? I'm not familiar with your codebase but would appreciate it if you could point me in the right direction so I can better understand it.

Finally, is the best way to get the IP address of an NsRecord to do a subsequent QueryType.A for each NsRecord returned? I was surprised that it's also not available on the NsRecord itself.

from dnsclient.net.

MichaCo avatar MichaCo commented on May 18, 2024

The library doesn't do anything special. It returns whatever the DNS Server you are using returns.

There is always only one SOA record and it will return only the primary master NS server.
See https://en.wikipedia.org/wiki/SOA_record

To get all nameservers, you'll query for NS records.

There might be additional answers in the query result which resolve the FQNs of the nameservers.
Public DNS servers usually don't recursively resolve answers though and you'd have to do that yourself.

from dnsclient.net.

davidpeden3 avatar davidpeden3 commented on May 18, 2024

Got it. Thanks!

from dnsclient.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.