From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- slackbook/html/basic-network-commands-dns.html | 181 +++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 slackbook/html/basic-network-commands-dns.html (limited to 'slackbook/html/basic-network-commands-dns.html') diff --git a/slackbook/html/basic-network-commands-dns.html b/slackbook/html/basic-network-commands-dns.html new file mode 100644 index 000000000..f8881aad2 --- /dev/null +++ b/slackbook/html/basic-network-commands-dns.html @@ -0,0 +1,181 @@ + + + + +DNS Tools + + + + + + + + + + + +
+

13.3 DNS Tools

+ +

Domain Name Service (DNS for short) is that magical protocol that allows your computer +to turn meaningless domain names like www.slackware.com into meaningful IP address like +64.57.102.34. Computers can't route packets to www.slackware.com, +but they can route packets to that domain name's IP address. This gives us a convenient +way to remember machines. Without DNS we'd have to keep a mental database of just what IP +address belongs to what computer, and that's assuming the IP address doesn't change. +Clearly using names for computers is better, but how do we map names to IP addresses?

+ +
+

13.3.1 host

+ +

host(1) can do this for us. host is +used to map names to IP addresses. It is a very quick and simple utility without a lot of +functions.

+ + + + + +
+
+% host www.slackware.com
+www.slackware.com is an alias for slackware.com.
+slackware.com has address 64.57.102.34
+
+
+ +

But let's say for some reason we want to map an IP address to a domain name; what +then?

+
+ +
+

13.3.2 nslookup

+ +

nslookup is a tried and true program that has weathered the +ages. nslookup has been deprecated and may be removed from +future releases. There is not even a man page for this program.

+ + + + + +
+
+% nslookup 64.57.102.34
+Note:  nslookup is deprecated and may be removed from future releases.
+Consider using the `dig' or `host' programs instead.  Run nslookup with
+the `-sil[ent]' option to prevent this message from appearing.
+Server:         192.168.1.254
+Address:        192.168.1.254#53
+
+Non-authoritative answer:
+www.slackware.com       canonical name = slackware.com.
+Name:   slackware.com
+Address: 64.57.102.34
+
+
+
+ +
+

13.3.3 dig

+ +

The meanest dog in the pound, the domain information groper, dig(1) for short, is the go-to program for finding DNS information. +dig can grab just about anything from a DNS server including +reverse lookups, A, CNAME, MX, SP, and TXT records. dig has many +command line options and if you're not familiar with it you should read through it's +extensive man page.

+ + + + + +
+
+% dig @192.168.1.254 www.slackware.com mx
+
+; <<>> DiG 9.2.2 <<>> @192.168.1.254 www.slackware.com mx
+;; global options:  printcmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26362
+;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
+
+;; QUESTION SECTION:
+;www.slackware.com.             IN      MX
+
+;; ANSWER SECTION:
+www.slackware.com.      76634   IN      CNAME   slackware.com.
+slackware.com.          86400   IN      MX      1 mail.slackware.com.
+
+;; AUTHORITY SECTION:
+slackware.com.          86400   IN      NS      ns1.cwo.com.
+slackware.com.          86400   IN      NS      ns2.cwo.com.
+
+;; ADDITIONAL SECTION:
+ns1.cwo.com.            163033  IN      A       64.57.100.2
+ns2.cwo.com.            163033  IN      A       64.57.100.3
+
+;; Query time: 149 msec
+;; SERVER: 192.168.1.254#53(192.168.1.254)
+;; WHEN: Sat Nov  6 16:59:31 2004
+;; MSG SIZE  rcvd: 159
+
+
+ +

This should give you an idea how dig works. +“@192.168.1.254” specifies the dns server to use. +“www.slackware.com” is the domain name I am performing a lookup on, and +“mx” is the type of lookup I am performing. The above query tells me that +e-mail to www.slackware.com will instead be sent to mail.slackware.com for delivery.

+
+
+ + + + + -- cgit v1.2.3