dns queries
Platform: - Linux and windows
Keywords: - DNS queries using nslookup
Author: - Dinesh Aggarwal
Most of us are aware about the normal functionalities of nslookup command.
It is used to resolve domain name into ip address and ip address into domain names.
C:\>nslookup
Default Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
> google.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
Name: google.com
Addresses: 64.233.187.99, 64.233.167.99, 72.14.207.99
> yahoo.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
Name: yahoo.com
Addresses: 216.109.112.135, 66.94.234.13
> 66.94.234.13
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Name: w2.rc.vip.scd.yahoo.com
Address: 66.94.234.13
Here 202.56.215.55 is the ip address of ISP. By typing yahoo.com we get to know the ip addresses of domain name yahoo.com and by typing 66.94.234.13 we got to know the domain name associated with this IP address.
There are much more uses of command nslookup.
To see all the DNS servers of a domain name:-
C:\>nslookup
Default Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
> set type=ns
> yahoo.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
yahoo.com nameserver = ns8.yahoo.com
yahoo.com nameserver = ns5.yahoo.com
yahoo.com nameserver = ns6.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns2.yahoo.com
yahoo.com nameserver = ns1.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
ns2.yahoo.com internet address = 68.142.255.16
ns1.yahoo.com internet address = 66.218.71.63
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 216.109.116.17
ns6.yahoo.com internet address = 202.43.223.170
ns8.yahoo.com internet address = 202.165.104.22
(Above are the DNS servers of yahoo.com)
> google.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
google.com nameserver = ns1.google.com
google.com nameserver = ns4.google.com
google.com nameserver = ns3.google.com
google.com nameserver = ns2.google.com
ns1.google.com internet address = 216.239.32.10
ns2.google.com internet address = 216.239.34.10
ns3.google.com internet address = 216.239.36.10
ns4.google.com internet address = 216.239.38.10
(Above are the DNS servers of google.com)
To see all the mail servers of a domain name:-
C:\>nslookup
Default Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
> set type=mx
> yahoo.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
yahoo.com MX preference = 1, mail exchanger = d.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = e.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = f.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = g.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = a.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = b.mx.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = c.mx.mail.yahoo.com
yahoo.com nameserver = ns5.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns2.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
yahoo.com nameserver = ns1.yahoo.com
yahoo.com nameserver = ns8.yahoo.com
yahoo.com nameserver = ns6.yahoo.com
c.mx.mail.yahoo.com internet address = 68.142.237.182
c.mx.mail.yahoo.com internet address = 216.39.53.3
d.mx.mail.yahoo.com internet address = 216.39.53.2
e.mx.mail.yahoo.com internet address = 216.39.53.1
f.mx.mail.yahoo.com internet address = 68.142.202.247
f.mx.mail.yahoo.com internet address = 209.191.88.247
g.mx.mail.yahoo.com internet address = 206.190.53.191
g.mx.mail.yahoo.com internet address = 209.191.88.239
a.mx.mail.yahoo.com internet address = 209.191.118.103
b.mx.mail.yahoo.com internet address = 66.196.97.250
ns2.yahoo.com internet address = 68.142.255.16
ns1.yahoo.com internet address = 66.218.71.63
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
(The mail servers of yahoo.com are
c.mx.mail.yahoo.com,
c.mx.mail.yahoo.com
d.mx.mail.yahoo.com
e.mx.mail.yahoo.com
f.mx.mail.yahoo.com
f.mx.mail.yahoo.com
g.mx.mail.yahoo.com
g.mx.mail.yahoo.com
a.mx.mail.yahoo.com
b.mx.mail.yahoo.com )
> google.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
google.com MX preference = 10, mail exchanger = smtp1.google.com
google.com MX preference = 10, mail exchanger = smtp2.google.com
google.com MX preference = 10, mail exchanger = smtp3.google.com
google.com MX preference = 10, mail exchanger = smtp4.google.com
google.com nameserver = ns2.google.com
google.com nameserver = ns4.google.com
google.com nameserver = ns1.google.com
google.com nameserver = ns3.google.com
smtp1.google.com internet address = 72.14.203.25
smtp2.google.com internet address = 64.233.167.25
smtp3.google.com internet address = 64.233.183.25
smtp4.google.com internet address = 72.14.215.25
ns1.google.com internet address = 216.239.32.10
ns2.google.com internet address = 216.239.34.10
ns3.google.com internet address = 216.239.36.10
ns4.google.com internet address = 216.239.38.10
To see SOA, refresh time, TTL etc of a domain name:-
> set type=SOA
> yahoo.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
yahoo.com
primary name server = ns1.yahoo.com
responsible mail addr = hostmaster.yahoo-inc.com
serial = 2007100201
refresh = 3600 (1 hour)
retry = 300 (5 mins)
expire = 1814400 (21 days)
default TTL = 600 (10 mins)
yahoo.com nameserver = ns5.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
yahoo.com nameserver = ns8.yahoo.com
yahoo.com nameserver = ns2.yahoo.com
yahoo.com nameserver = ns1.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns6.yahoo.com
ns2.yahoo.com internet address = 68.142.255.16
ns1.yahoo.com internet address = 66.218.71.63
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 216.109.116.17
ns6.yahoo.com internet address = 202.43.223.170
ns8.yahoo.com internet address = 202.165.104.22
> google.com
Server: ns3.ncr.airtelbroadband.in
Address: 202.56.215.55
Non-authoritative answer:
google.com
primary name server = ns1.google.com
responsible mail addr = dns-admin.google.com
serial = 2007092700
refresh = 7200 (2 hours)
retry = 1800 (30 mins)
expire = 1209600 (14 days)
default TTL = 300 (5 mins)
google.com nameserver = ns4.google.com
google.com nameserver = ns3.google.com
google.com nameserver = ns1.google.com
google.com nameserver = ns2.google.com
ns1.google.com internet address = 216.239.32.10
ns2.google.com internet address = 216.239.34.10
ns3.google.com internet address = 216.239.36.10
ns4.google.com internet address = 216.239.38.10
you have any suggestions or want to add more to this article do write us an email articles@knowurtech.com
What Next?
If you liked this article, you can share it with others using the following link:
Related Content :