Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello everyone,
I am a relative novice with linux, and so would appreciate any help from people on thie following issue .
I am trying to find out who are the DNS servers for a set of IP addresses. Usually when I do ">dig $ip" I can see the DIG options, question section, answer section blah blah...
In the Authority section, I think the root servers for the domain being probed are listed. The thing is is for nearly all the IPs I am looking up the Authority section always comes out to be the same, which bothers me..am I doing something wrong..
e.g. I look up dig 63.241.205.173 and I get,
; <<>> DiG 9.3.1 <<>> 63.241.205.173
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 58078
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;63.241.205.173. IN A
;; AUTHORITY SECTION:
. 10342 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2007040500 1800 900 604800 86400
This is a security feature that may be configured in the zone. Notice that ANSWER: 0 - that means that it is not returning and answer to you. If you try another lookup it should return an answer to you. The ANSWER section is what you should be looking for. For example:
;; ANSWER SECTION:
yahoo.com. 1800 IN SOA ns1.yahoo.com. hostmaster.yahoo-inc.com. 2007040509 3600 300 1814400 600
;; AUTHORITY SECTION:
yahoo.com. 85843 IN NS ns1.yahoo.com.
yahoo.com. 85843 IN NS ns2.yahoo.com.
yahoo.com. 85843 IN NS ns3.yahoo.com.
yahoo.com. 85843 IN NS ns4.yahoo.com.
yahoo.com. 85843 IN NS ns5.yahoo.com.
yahoo.com. 85843 IN NS ns8.yahoo.com.
yahoo.com. 85843 IN NS ns9.yahoo.com.
;; ADDITIONAL SECTION:
ns1.yahoo.com. 25792 IN A 66.218.71.63
ns2.yahoo.com. 4881 IN A 68.142.255.16
ns3.yahoo.com. 73344 IN A 217.12.4.104
ns4.yahoo.com. 63515 IN A 68.142.196.63
ns5.yahoo.com. 3284 IN A 216.109.116.17
ns8.yahoo.com. 85754 IN A 202.165.104.22
ns9.yahoo.com. 85843 IN A 202.160.176.146
You actually can't tell anything about the authoritative DNS for an IP address. The two things have nothing to do with one another. Authoritative DNS is the server that provides definitive info about a domain name, not an IP.
You can use dig with the -x to do a reverse lookup of an address, and find out which ISP or company "controls" the IP in question, but that doesn't tell you anything about the authoritative DNS.
As an example, say you do a reverse lookup on 6.7.8.9. You find out that 6.7.8.9 is owned by abc corp, and there is no special PTR address set for 6.7.8.9, it simply returns something like user.01.abccorp.net.
What you didn't find out however is that 6.7.8.9 may be a website for the green company. Their DNS is authoritative for www.green.com, and the third A record for www.green.com is 6.7.8.9. You have no way of knowing for sure what is tied to a given IP address.
I think the problem might be that you're using the wrong term for what you're looking for. What are you trying to find about the DNS for a given IP address for in any case?
Thanks everyone for all the replies... yup the -x option does it
To make things more clear I am basically trying to understand who "controls/resolves" a particular group of URLs. For example consider that I want to know which entity/organization handles the DNS resolution for a set of URLs, say www.yahoo.com, www.akamai.com etc.. I am tying to find common organizations which handle the DNS resolution to finally get how the list of IPs is related to the DNS organizations. I know that using whois would give the registrar info for an IP/url but I want to see if these list of sites use a common DNS resolution entity.
Several comments in this post are confusing me. I want to clear things up a little bit, if I may.
All DNS does is resolve a name to a numerical address. Why? Because humans remember names better than numbers and machines don't calculate by names but only ones and zeros which can be manipulated to infinite numbers, hence, IP.
It is easier for us to remember mehungry.com, youhungry.com, letscook.com; compared to 216.209.10.8, 198.231.65.71, 66.75.234.90. Why do you think it's so difficult for people to remember phone numbers?
DNS is a hierarchy of machines that translate names to numbers and return the result, that's it. The SOA (Start of Authority) is the server that holds the true addresses that give a name to a number. Changes are usually made on the SOA only and propagated to all the slave servers including the root servers.
The root servers are 13 different servers (which are really many, many hundreds of servers). These hold a copy of each public zone. It usually takes several hours and up to a couple of days for changes to be reflected.
The dig command can find the SOA, the NS and the A (address) records of all the public IP's.
For some reason DNS is among one of the most misunderstood technologies and among one of the most bizare to assimilate.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.