[Gllug] DNS

Kieran Barry kieran at esperi.demon.co.uk
Tue Nov 13 11:54:18 UTC 2001


On Tue, 13 Nov 2001, Paul Brazier wrote:

> I've been reading up on DNS but I don't understand this:
> 
> In the DNS Howto it gives a sample "root.hints" file that lists the root
> nameservers. They are named A to M but listed in a strange order. I
> thought the order didn't matter, so wouldn't it make more sense to have
> them in alphabetical order, then it would be clearer to see if one was
> accidently missing.
> 
> Or am I missing something here?

I suspect that some applications only query the first nameserver
returned: I remember Paul Vixie saying that when he changed BIND to
do round-robin, he got a lot of flak, so old versions of BIND would 
fall into this category.

If this is true, then it makes sense that name servers change the order
that these things are returned:


; <<>> DiG 8.2 <<>> . NS 
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 4
;; QUERY SECTION:
;;	., type = NS, class = IN

;; ANSWER SECTION:
.			2d7m43s IN NS	K.ROOT-SERVERS.NET.
.			2d7m43s IN NS	L.ROOT-SERVERS.NET.
.			2d7m43s IN NS	M.ROOT-SERVERS.NET.
.			2d7m43s IN NS	A.ROOT-SERVERS.NET.
.			2d7m43s IN NS	B.ROOT-SERVERS.NET.
.			2d7m43s IN NS	C.ROOT-SERVERS.NET.
.			2d7m43s IN NS	D.ROOT-SERVERS.NET.
.			2d7m43s IN NS	E.ROOT-SERVERS.NET.
.			2d7m43s IN NS	F.ROOT-SERVERS.NET.
.			2d7m43s IN NS	G.ROOT-SERVERS.NET.
.			2d7m43s IN NS	H.ROOT-SERVERS.NET.
.			2d7m43s IN NS	I.ROOT-SERVERS.NET.
.			2d7m43s IN NS	J.ROOT-SERVERS.NET.

;; ADDITIONAL SECTION:
J.ROOT-SERVERS.NET.	3d7m43s IN A	198.41.0.10
K.ROOT-SERVERS.NET.	3d7m43s IN A	193.0.14.129
L.ROOT-SERVERS.NET.	3d7m43s IN A	198.32.64.12
M.ROOT-SERVERS.NET.	3d7m43s IN A	202.12.27.33

;; Total query time: 5 msec
;; FROM: cuchulainn.tirnanog to SERVER: default -- 192.168.14.16
;; WHEN: Tue Nov 13 11:47:34 2001
;; MSG SIZE  sent: 17  rcvd: 292


; <<>> DiG 8.2 <<>> . NS 
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 4
;; QUERY SECTION:
;;	., type = NS, class = IN

;; ANSWER SECTION:
.			2d7m42s IN NS	B.ROOT-SERVERS.NET.
.			2d7m42s IN NS	C.ROOT-SERVERS.NET.
.			2d7m42s IN NS	D.ROOT-SERVERS.NET.
.			2d7m42s IN NS	E.ROOT-SERVERS.NET.
.			2d7m42s IN NS	F.ROOT-SERVERS.NET.
.			2d7m42s IN NS	G.ROOT-SERVERS.NET.
.			2d7m42s IN NS	H.ROOT-SERVERS.NET.
.			2d7m42s IN NS	I.ROOT-SERVERS.NET.
.			2d7m42s IN NS	J.ROOT-SERVERS.NET.
.			2d7m42s IN NS	K.ROOT-SERVERS.NET.
.			2d7m42s IN NS	L.ROOT-SERVERS.NET.
.			2d7m42s IN NS	M.ROOT-SERVERS.NET.
.			2d7m42s IN NS	A.ROOT-SERVERS.NET.

;; ADDITIONAL SECTION:
J.ROOT-SERVERS.NET.	3d7m42s IN A	198.41.0.10
K.ROOT-SERVERS.NET.	3d7m42s IN A	193.0.14.129
L.ROOT-SERVERS.NET.	3d7m42s IN A	198.32.64.12
M.ROOT-SERVERS.NET.	3d7m42s IN A	202.12.27.33

;; Total query time: 6 msec
;; FROM: cuchulainn.tirnanog to SERVER: default -- 192.168.14.16
;; WHEN: Tue Nov 13 11:47:35 2001
;; MSG SIZE  sent: 17  rcvd: 292


; <<>> DiG 8.2 <<>> . NS 
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 4
;; QUERY SECTION:
;;	., type = NS, class = IN

;; ANSWER SECTION:
.			2d7m41s IN NS	G.ROOT-SERVERS.NET.
.			2d7m41s IN NS	H.ROOT-SERVERS.NET.
.			2d7m41s IN NS	I.ROOT-SERVERS.NET.
.			2d7m41s IN NS	J.ROOT-SERVERS.NET.
.			2d7m41s IN NS	K.ROOT-SERVERS.NET.
.			2d7m41s IN NS	L.ROOT-SERVERS.NET.
.			2d7m41s IN NS	M.ROOT-SERVERS.NET.
.			2d7m41s IN NS	A.ROOT-SERVERS.NET.
.			2d7m41s IN NS	B.ROOT-SERVERS.NET.
.			2d7m41s IN NS	C.ROOT-SERVERS.NET.
.			2d7m41s IN NS	D.ROOT-SERVERS.NET.
.			2d7m41s IN NS	E.ROOT-SERVERS.NET.
.			2d7m41s IN NS	F.ROOT-SERVERS.NET.

;; ADDITIONAL SECTION:
J.ROOT-SERVERS.NET.	3d7m41s IN A	198.41.0.10
K.ROOT-SERVERS.NET.	3d7m41s IN A	193.0.14.129
L.ROOT-SERVERS.NET.	3d7m41s IN A	198.32.64.12
M.ROOT-SERVERS.NET.	3d7m41s IN A	202.12.27.33

;; Total query time: 5 msec
;; FROM: cuchulainn.tirnanog to SERVER: default -- 192.168.14.16
;; WHEN: Tue Nov 13 11:47:36 2001
;; MSG SIZE  sent: 17  rcvd: 292

which the above (got from three runs of "dig . NS >> /tmp/NS"
seems to back up.)
> 
> When I resolve a domain name does it select one of these root
> nameservers at random which then sends the request on to a second level
> nameserver (if one exists for that domain)?
> 
I think this is called recursive lookup.  Root name servers _never_ do
this.  They return the nameservers for the zone, which one of the
servers you contacted then queries.  The whole process is called
iterative.

Recursive:

a -> b -> root. -> .com. -> google.com.

Iterative:
a -> b -> root
       -> .com.
       -> google.com.

Regards

Kieran


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list