LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-30-2013, 01:54 PM   #1
dcguru
LQ Newbie
 
Registered: Jul 2013
Posts: 8

Rep: Reputation: Disabled
Unhappy understanding DNS using dig


Hi all,

I am a newbie to Linux (1+ years) looking to get into system administration.

I am currently learning about the true innerworkings of DNS using dig as part of an online course and need help understanding a step I am missing...

Basically I need to know how many and list all the Name Servers in the process of resolving a query my host sends that its local name server performs on behalf of it.

The basic part of the quest, 3 name servers (without counting all the recursive possibilities) I believe is correct, the actual nameservers I list are incorrect. The querey is for maps.google.com.

Here is what I come up with. I got this using the following commands:
dig .
dig @a.root-servers.net. com. -t NS
dig @a.gtld-servers.net google.com. -t NS
dig @ns1.google.com maps.google.com -t NS


Answers I have come up with (that are all said to be incrrect by the instructor) are the following:

1 - a.root-servers.net.
2 - a.gtld-servers.net.
3 - maps.l.google.com.

1 - a.root-servers.net.
2 - a.gtld-servers.net.
3 - ns1.google.com

I keep being instructed variations of the following feedback:

"Both root and gtld are root servers and both tell you about .com, .net, etc., you are missing the step between root and google.com. The root server will give information about .com and google.com will give you information about maps. Make sense?"

What am I missing? I've spent so much time looking at DNS, trying to understand more about flags of the dig command itself, asking local experts and nothing...

Can anyone help me understand where I am going wrong? Thanks in advance...
 
Old 07-30-2013, 02:01 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,798

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Try looking at the output from this:
Code:
dig +trace maps.google.com
 
Old 07-30-2013, 04:41 PM   #3
dcguru
LQ Newbie
 
Registered: Jul 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Try looking at the output from this:
Code:
dig +trace maps.google.com
Thanks and I have tried that. The response I get from that command shows the root servers, gtld servers, then the ns1.google.com name servers.

The instructor says that gtld servers are root servers and she is looking for the step between the root servers and google.com...?

I dont understand how that could be though...

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 <<>> +trace maps.google.com ;; global options: +cmd . 75798 IN NS l.root-servers.net. . 75798 IN NS e.root-servers.net. . 75798 IN NS g.root-servers.net. . 75798 IN NS f.root-servers.net. . 75798 IN NS k.root-servers.net. . 75798 IN NS a.root-servers.net. . 75798 IN NS h.root-servers.net. . 75798 IN NS j.root-servers.net. . 75798 IN NS m.root-servers.net. . 75798 IN NS b.root-servers.net. . 75798 IN NS d.root-servers.net. . 75798 IN NS i.root-servers.net. . 75798 IN NS c.root-servers.net. ;; Received 512 bytes from 199.27.148.66#53(199.27.148.66) in 19 ms com. 172800 IN NS a.gtld-servers.net. com. 172800 IN NS b.gtld-servers.net. com. 172800 IN NS c.gtld-servers.net. com. 172800 IN NS d.gtld-servers.net. com. 172800 IN NS e.gtld-servers.net. com. 172800 IN NS f.gtld-servers.net. com. 172800 IN NS g.gtld-servers.net. com. 172800 IN NS h.gtld-servers.net. com. 172800 IN NS i.gtld-servers.net. com. 172800 IN NS j.gtld-servers.net. com. 172800 IN NS k.gtld-servers.net. com. 172800 IN NS l.gtld-servers.net. com. 172800 IN NS m.gtld-servers.net. ;; Received 493 bytes from 199.7.83.42#53(199.7.83.42) in 78 ms google.com. 172800 IN NS ns2.google.com. google.com. 172800 IN NS ns1.google.com. google.com. 172800 IN NS ns3.google.com. google.com. 172800 IN NS ns4.google.com. ;; Received 169 bytes from 192.35.51.30#53(192.35.51.30) in 97 ms maps.google.com. 604800 IN CNAME maps.l.google.com. maps.l.google.com. 300 IN A 74.125.228.97 maps.l.google.com. 300 IN A 74.125.228.99 maps.l.google.com. 300 IN A 74.125.228.101 maps.l.google.com. 300 IN A 74.125.228.110 maps.l.google.com. 300 IN A 74.125.228.104 maps.l.google.com. 300 IN A 74.125.228.105 maps.l.google.com. 300 IN A 74.125.228.96 maps.l.google.com. 300 IN A 74.125.228.102 maps.l.google.com. 300 IN A 74.125.228.98 maps.l.google.com. 300 IN A 74.125.228.103 maps.l.google.com. 300 IN A 74.125.228.100 ;; Received 230 bytes from 216.239.34.10#53(216.239.34.10) in 34 ms


I dont see any other name server in this path...
 
Old 07-30-2013, 11:41 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,798

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
You need to wrap your pasted output in [CODE]...[/CODE] tags to preserve formatting, but I believe I can see four of google's own nameservers in there, and it is one of those that delivers the final mapping.
 
Old 07-30-2013, 11:51 PM   #5
dcguru
LQ Newbie
 
Registered: Jul 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks for the reply.

I also am able to find those name servers but the instructor says I am missing the step / name server right before that and that's where I am confused - hope that helps...
 
Old 07-31-2013, 04:19 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Okay let me see if I understand the lesson correct. You have to give the name of all the nameservers that need to be queried to resolve the name "maps.google.com" to an IP address?

And your answers are:
1 - a.root-servers.net.
2 - a.gtld-servers.net.
3 - maps.l.google.com.

Right? Just from telling the third one is not correct. As you already know.
The instructor saying that the gtld-servers.net is a root server is not right in my opinion. Only if that means those are the root server for the com. domain. Anyways thats just nitpicking.

Way I would go with the command you used when trying to resolve maps.google.com. (output is tailored).
Code:
dig com. -t NS
com.                    171785  IN      NS      j.gtld-servers.net.

j.gtld-servers.net.     172107  IN      A       192.48.79.30
Okay we queried the root servers for the com. top level domain and got something like 10 answers. For each part we have the resource record NS and the resource record A. So we have enough to go on. I choose j.gtld-servers.net and ask them about the next part of the name we want to resolve: google.com

Code:
dig @j.gtld-servers.net google.com. -t NS
google.com.             172800  IN      NS      ns2.google.com.

ns2.google.com.         172800  IN      A       216.239.34.10
This one returns 4 nameserver with two resource records for each one. Okay now we have nameservers that are responsible for all subdomains of google.com. Lets ask them about our initial target: maps.google.com

Code:
root@ns1:~# dig @ns2.google.com maps.google.com. -t NS

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @ns2.google.com maps.google.com. -t NS
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60818
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;maps.google.com.               IN      NS

;; ANSWER SECTION:
maps.google.com.        604800  IN      CNAME   maps.l.google.com.

;; AUTHORITY SECTION:
l.google.com.           60      IN      SOA     ns3.google.com. dns-admin.google.com. 1528064 900 900 1800 60

;; Query time: 35 msec
;; SERVER: 216.239.34.10#53(216.239.34.10)
;; WHEN: Wed Jul 31 10:02:57 2013
;; MSG SIZE  rcvd: 104
We dont get a NS resource record which is okay and tells us that there are no further subdomains for this name. One could get an A resource record and hit the server now.

So to resolve the name "maps.google.com." to an ip address we would need to query 3 nameservers.
1. One of the root servers.
2. One of the [a..l].gtld.server.net
3. One of the ns[1..4].google.com

I guess the step you are missing or the teacher wants to see is the resolve of google.com from the a.gtld.server.net ones. Which return ns2.google.com. You jump straight to maps.google.com. At least as the first answer in your original post.

At least this how I would go about which is quite near to what you have. And the trace output shows the same. Dunno if this is of any help...
Or maybe you should first resolve the SOA servers but to what availe that would be is behind my knowledge.
 
Old 07-31-2013, 02:33 PM   #7
dcguru
LQ Newbie
 
Registered: Jul 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
Okay let me see if I understand the lesson correct. You have to give the name of all the nameservers that need to be queried to resolve the name "maps.google.com" to an IP address?

And your answers are:
1 - a.root-servers.net.
2 - a.gtld-servers.net.
3 - maps.l.google.com.

Right? Just from telling the third one is not correct. As you already know.
The instructor saying that the gtld-servers.net is a root server is not right in my opinion. Only if that means those are the root server for the com. domain. Anyways thats just nitpicking.

Way I would go with the command you used when trying to resolve maps.google.com. (output is tailored).
Code:
dig com. -t NS
com.                    171785  IN      NS      j.gtld-servers.net.

j.gtld-servers.net.     172107  IN      A       192.48.79.30
Okay we queried the root servers for the com. top level domain and got something like 10 answers. For each part we have the resource record NS and the resource record A. So we have enough to go on. I choose j.gtld-servers.net and ask them about the next part of the name we want to resolve: google.com

Code:
dig @j.gtld-servers.net google.com. -t NS
google.com.             172800  IN      NS      ns2.google.com.

ns2.google.com.         172800  IN      A       216.239.34.10
This one returns 4 nameserver with two resource records for each one. Okay now we have nameservers that are responsible for all subdomains of google.com. Lets ask them about our initial target: maps.google.com

Code:
root@ns1:~# dig @ns2.google.com maps.google.com. -t NS

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @ns2.google.com maps.google.com. -t NS
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60818
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;maps.google.com.               IN      NS

;; ANSWER SECTION:
maps.google.com.        604800  IN      CNAME   maps.l.google.com.

;; AUTHORITY SECTION:
l.google.com.           60      IN      SOA     ns3.google.com. dns-admin.google.com. 1528064 900 900 1800 60

;; Query time: 35 msec
;; SERVER: 216.239.34.10#53(216.239.34.10)
;; WHEN: Wed Jul 31 10:02:57 2013
;; MSG SIZE  rcvd: 104
We dont get a NS resource record which is okay and tells us that there are no further subdomains for this name. One could get an A resource record and hit the server now.

So to resolve the name "maps.google.com." to an ip address we would need to query 3 nameservers.
1. One of the root servers.
2. One of the [a..l].gtld.server.net
3. One of the ns[1..4].google.com

I guess the step you are missing or the teacher wants to see is the resolve of google.com from the a.gtld.server.net ones. Which return ns2.google.com. You jump straight to maps.google.com. At least as the first answer in your original post.

At least this how I would go about which is quite near to what you have. And the trace output shows the same. Dunno if this is of any help...
Or maybe you should first resolve the SOA servers but to what availe that would be is behind my knowledge.

Thanks!

I had the answer right the whole time! The response was:

"You have it perfectly! Sorry, it's been all semantics but we want root servers, .com and google.com as the levels that will be queried to find maps. Congratulations on completing this course!"

Then after I said basically "thanks but what exactly were you looking for with my responses", the instructor replied:
"Basically, we are not looking for actual servers but the level each server represents. For example, root servers, .com servers, google.com servers."

OMG!

I clearly said that in my 2nd missed submission to them, (not shown in my initial post) and it's clear that I understand that from the various ways I gained the info on the levels of name servers (root, top level, 2nd level).

All I can say is WOW!!!

Thanks everyone for helping.

The last real question is, what are some specific name servers that control the top level com.? Basically, are the gTLD servers technically classified as root or top level???
 
Old 07-31-2013, 04:27 PM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Words and phrasing make for an A. Understanding stuff but not beeing able to explain goes for an F. Ah F*** that.

Okay according to wikipedia the gTLD are top level servers. There address can be found out by quering the root servers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS - MX record not getting from dig jose_tk Linux - Networking 3 10-23-2009 05:07 AM
PTR in DIG DNS palisetty_suman Linux - Newbie 7 05-04-2009 09:27 AM
Need help setting up DNS- dig almost works tbsmith Linux - Server 6 01-29-2008 09:03 PM
dig command questions DNS emailssent Linux - Networking 3 09-22-2004 06:56 AM
dns question (dig maybe) lenlutz Linux - Networking 2 10-03-2003 08:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration