Dig & host command examples (DNS lookup utility)

Posted: August 7, 2013 in Uncategorized

#dig +trace google.com  #Trace usage

; <<>> DiG 9.5.0-P2 <<>> +trace google.com
;; global options:  printcmd
.                       409046  IN      NS      e.root-servers.net.
.                       409046  IN      NS      f.root-servers.net.
.                       409046  IN      NS      g.root-servers.net.
.                       409046  IN      NS      h.root-servers.net.
.                       409046  IN      NS      i.root-servers.net.
.                       409046  IN      NS      j.root-servers.net.
.                       409046  IN      NS      k.root-servers.net.
.                       409046  IN      NS      l.root-servers.net.
.                       409046  IN      NS      m.root-servers.net.
.                       409046  IN      NS      a.root-servers.net.
.                       409046  IN      NS      b.root-servers.net.
.                       409046  IN      NS      c.root-servers.net.
.                       409046  IN      NS      d.root-servers.net.
;; Received 512 bytes from 192.168.28.5#53(192.168.28.5) in 1 ms


#dig +short google.com #Get only short answer

74.125.236.110
74.125.236.96
74.125.236.97
74.125.236.98
74.125.236.99
74.125.236.100
74.125.236.101
74.125.236.102
74.125.236.103
74.125.236.104
74.125.236.105


# host -t a google.com  # To Find Out the Domain IP

google.com has address 74.125.236.105
google.com has address 74.125.236.110
google.com has address 74.125.236.96
google.com has address 74.125.236.97
google.com has address 74.125.236.98
google.com has address 74.125.236.99
google.com has address 74.125.236.100
google.com has address 74.125.236.101
google.com has address 74.125.236.102
google.com has address 74.125.236.103
google.com has address 74.125.236.104


#host -t ns google.com     # To Find Out the Domain Name Servers 

google.com name server ns4.google.com.
google.com name server ns1.google.com.
google.com name server ns2.google.com.
google.com name server ns3.google.com.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s