Upload
jaymnea
View
378
Download
0
Embed Size (px)
Citation preview
1
NSLOOKUP March 2009 ITCJay Hall
NEA-SEA ITC 2009
Quick DNS Record Type Review
• A– Maps a host name to an IPv4 address.
• CNAME– Alias of one name to another (canonical name).
• MX– Mail eXchanger record.
Quick DNS Record Type Review
• NS– Authoritative Name Server for the zone.
• PTR– PoinTer Record. Only returns a name. Commonly
used for reverse DNS.
What is nslookup?
• Used in Windows and *NIX systems to query DNS servers to find– details of the zone
• including IP addresses.• A, MX and other records for the zone• primary name server addresses for the zone.
Using nslookup
• nslookup has two modes– command line and – interactive.
• Personally, I think interactive mode is easier to use.– Mainly because I cannot remember the command
line parameters.
nslookup commands
• server aa.dd.re.ss– IP address, or name, of the server to use for DNS
queries.
• set – domain=name
• set a default domain name.
– type• type of record to search for.• A, ANY, CNAME, MX, NS, PTR, SOA.
nslookup commands
• server name– Use the specified server for queries. Can be an IP
address or a name.
• ls (Windows only)– List the addresses in the domain.– -t specifies the type to list.
nslookup examplesjhall@jefmhallja-~$ nslookup> set type=mx> server 10.129.10.41Default server: 10.129.10.41Address: 10.129.10.41#53> server mo-hq-s1.mo.locDefault server: mo-hq-s1.mo.locAddress: 10.129.10.41#53> mnea.orgServer: mo-hq-s1.mo.locAddress: 10.129.10.41#53mnea.org mail exchanger = 20 mail2.mnea.org.mnea.org mail exchanger = 10 mo-hq-s1.mo.loc.>
nslookup examples
jhall@jefmhallja-~$ nslookup -type=mx mnea.org mo-hq-s1.mo.loc
Server: mo-hq-s1.mo.loc
Address: 10.129.10.41#53
mnea.org mail exchanger = 10 mo-hq-s1.mo.loc.
mnea.org mail exchanger = 20 mail2.mnea.org.
nslookup examples
> set type=a
> mail.mnea.org
Server: ns3.socket.net
Address:70.246.240.169#53
Non-authoritative answer:
Name: mail.mnea.org
Address: 65.117.48.157
nslookup examples
> server mo-hq-s1.mo.loc
Default server: mo-hq-s1.mo.loc
Address: 10.129.10.41#53
> mail.mnea.org
Server: mo-hq-s1.mo.loc
Address:10.129.10.41#53
Name: mail.mnea.org
Address: 10.129.10.45
What is Dig?
• Domain Information Groper
• Has the same uses as nslookup.
• ISC is slowly replacing nslookup with dig due to security concerns.
• In my opinion, dig is easier to use.
Dig Commands and Examples
• dig @server name type– Type can be any valid DNS record type.
• Dig has a special query type called axfr.– This initiates a zone transfer so all of the zone data
can be seen.
– Some servers do not allow this.
Dig Commands and Examples
;; QUESTION SECTION:;mnea.org. IN A
;; ANSWER SECTION:mnea.org. 900 IN A 65.117.48.158
;; AUTHORITY SECTION:mnea.org. 900 IN NS dca-ans-01.inet.qwest.net.mnea.org. 900 IN NS svl-ans-01.inet.qwest.net.
;; ADDITIONAL SECTION:dca-ans-01.inet.qwest.net. 3600 IN A 205.171.9.242svl-ans-01.inet.qwest.net. 3600 IN A 205.171.14.195
;; Query time: 107 msec;; SERVER: 205.171.9.242#53(205.171.9.242);; WHEN: Wed Feb 25 05:34:06 2009;; MSG SIZE rcvd: 138
Dig Commands and Examples;; QUESTION SECTION:;mnea.org. IN MX
;; ANSWER SECTION:mnea.org. 900 IN MX 5 mail.mnea.org.
;; AUTHORITY SECTION:mnea.org. 900 IN NS dca-ans-01.inet.qwest.net.mnea.org. 900 IN NS svl-ans-01.inet.qwest.net.
;; ADDITIONAL SECTION:mail.mnea.org. 900 IN A 65.117.48.157dca-ans-01.inet.qwest.net. 3600 IN A 205.171.9.242svl-ans-01.inet.qwest.net. 3600 IN A 205.171.14.195
;; Query time: 97 msec;; SERVER: 205.171.9.242#53(205.171.9.242);; WHEN: Wed Feb 25 05:49:26 2009;; MSG SIZE rcvd: 159
Why are DNS tools useful?
• Comparing results between servers.– Internal v. external– Ensuring zone data has propagated from primary
to secondary name servers.– Troubleshooting web access problems.
A better way?There has to be a better way to this.
There is.
http://www.dnsstuff.com
Thank you to DNSStuff for their donation of two one year memberships.
DNSStuff.com
Demonstration
The End