www.oreilly.com canonical
name
=
www.oreilly.com.edgekey.net.
www.oreilly.com.edgekey.net
canonical
name
=
e4619.g.akamaiedge.net.
Name:
e4619.g.akamaiedge.net
Address: 23.79.209.167
In that request, the local server has provided an answer to us, but it’s telling us that it’s
a nonauthoritative answer. What we got back for this FQDN is a series of aliases cul‐
minating in the IP address, after all the aliases have been unwound. To get an authori‐
tative response, we need to ask the authoritative name server for the domain. To do
that, we can use another utility that will do DNS lookups. We’ll use the program
dig
and ask it for the name server record. You can see that in
Example 3-10
.
Example 3-10. Using dig
root@rosebud:~# dig ns oreilly.com
; <<>> DiG 9.10.6-Debian <<>> ns oreilly.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER
<<- opco
de: QUERY, status: NOERROR, id: 56163
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;oreilly.com.
IN
NS
;; ANSWER SECTION:
oreilly.com.
3599
IN
NS
a20-66.akam.net.
oreilly.com.
3599
IN
NS
a13-64.akam.net.
oreilly.com.
3599
IN
NS
a3-67.akam.net.
oreilly.com.
3599
IN
NS
a1-225.akam.net.
oreilly.com.
3599
IN
NS
a4-64.akam.net.
oreilly.com.
3599
IN
NS
a16-65.akam.net.
At this point, we could continue to use
dig
, but we’ll go back to using
nslookup
just to
see clearly the differences in the results. When we run
nslookup
again, we specify the
server we are going to query. In this case, we’re going to use one of the name servers
listed in
Example 3-10
. We do that by appending the name server we want to ask to
the end of the line we were using before. You can see how this works in
Example 3-11
.
Example 3-11. Using nslookup and specifying the DNS server
root@rosebud:~# nslookup www.oreilly.com a20-66.akam.net
Server:
a20-66.akam.net
Address:
95.100.175.66#53
www.oreilly.com canonical
name
=
www.oreilly.com.edgekey.net.