john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

dns lookup using dig

http://members.shaw.ca/nicholas.fong/dig/

http://members.shaw.ca/nicholas.fong/dig/dig-files.zip

Create a folder   c:\dig
extract the files in dig-files.zip to c:\dig

Windows XP:
Install (use Google search to find notepad++ ) and use notepad++ to open the file c:\dig\resolv.conf and edit the first line:
Replace 198.80.55.1 with the IP address of a DNS server that your ISP gives you. (or the Name Server :)

e.g. 84.22.161.11 which is ns4.easyspace.com
62.128.193.201  ns5

81.3.74.20  dns1.pdq-it.com
81.3.74.2   dns2.pdq-it.com

Now from the cmd line go to c:\dig
type dig --help

"dig . NS" will show you the 13 root level name servers

"dig com. NS" will show you the (TopLevelDomain)

dig example.com. NS         //Shows you the name servers

dig example.com MX @ns.goodplace.com    //Query a particular dns/name server for the records

You can not only see what version of dig, but that this particular query was REFUSED...

; <<>> DiG 9.3.2 <<>> dell.com. NS
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 876
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;dell.com.          IN  NS

;; Query time: 46 msec
;; SERVER: 84.22.161.11#53(84.22.161.11)
;; WHEN: Tue Dec 09 15:36:36 2008
;; MSG SIZE  rcvd: 26

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Here you can see an ANSWER from 2 Authority DNS servers...

; <<>> DiG 9.3.2 <<>> example.co.uk
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 115
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;example.co.uk.         IN  A

;; ANSWER SECTION:
example.co.uk.      86400   IN  A   199.203.207.193

;; AUTHORITY SECTION:
example.co.uk.      86400   IN  NS  ns.iomart.co.uk.
example.co.uk.      86400   IN  NS  ns2.iomart.co.uk.

;; Query time: 15 msec
;; SERVER: 84.22.161.11#53(84.22.161.11)
;; WHEN: Tue Dec 09 15:37:30 2008
;; MSG SIZE  rcvd: 88

  • « css example
  • drupal 6 how to allow anonynous comments »

Published

Feb 6, 2010

Category

web

~261 words

Tags

  • dig 2
  • dns 6
  • lookup 2
  • using 8
  • web 56