summaryrefslogtreecommitdiffstats
path: root/slackbook/html/basic-network-commands-dns.html
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /slackbook/html/basic-network-commands-dns.html
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'slackbook/html/basic-network-commands-dns.html')
-rw-r--r--slackbook/html/basic-network-commands-dns.html181
1 files changed, 181 insertions, 0 deletions
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 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title>DNS Tools</title>
+<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" />
+<link rel="HOME" title="Slackware Linux Essentials" href="index.html" />
+<link rel="UP" title="Basic Network Commands" href="basic-network-commands.html" />
+<link rel="PREVIOUS" title="traceroute" href="basic-network-commands-traceroute.html" />
+<link rel="NEXT" title="finger" href="basic-network-commands-finger.html" />
+<link rel="STYLESHEET" type="text/css" href="docbook.css" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+</head>
+<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"
+alink="#0000FF">
+<div class="NAVHEADER">
+<table summary="Header navigation table" width="100%" border="0" cellpadding="0"
+cellspacing="0">
+<tr>
+<th colspan="3" align="center">Slackware Linux Essentials</th>
+</tr>
+
+<tr>
+<td width="10%" align="left" valign="bottom"><a
+href="basic-network-commands-traceroute.html" accesskey="P">Prev</a></td>
+<td width="80%" align="center" valign="bottom">Chapter 13 Basic Network Commands</td>
+<td width="10%" align="right" valign="bottom"><a
+href="basic-network-commands-finger.html" accesskey="N">Next</a></td>
+</tr>
+</table>
+
+<hr align="LEFT" width="100%" />
+</div>
+
+<div class="SECT1">
+<h1 class="SECT1"><a id="BASIC-NETWORK-COMMANDS-DNS"
+name="BASIC-NETWORK-COMMANDS-DNS">13.3 DNS Tools</a></h1>
+
+<p>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
+<tt class="HOSTID">64.57.102.34</tt>. 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?</p>
+
+<div class="SECT2">
+<h2 class="SECT2"><a id="AEN4475" name="AEN4475">13.3.1 <tt
+class="COMMAND">host</tt></a></h2>
+
+<p><tt class="COMMAND">host</tt>(1) can do this for us. <tt class="COMMAND">host</tt> is
+used to map names to IP addresses. It is a very quick and simple utility without a lot of
+functions.</p>
+
+<table border="0" bgcolor="#E0E0E0" width="100%">
+<tr>
+<td>
+<pre class="SCREEN">
+<samp class="PROMPT">%</samp> <kbd class="USERINPUT">host www.slackware.com</kbd>
+www.slackware.com is an alias for slackware.com.
+slackware.com has address 64.57.102.34
+</pre>
+</td>
+</tr>
+</table>
+
+<p>But let's say for some reason we want to map an IP address to a domain name; what
+then?</p>
+</div>
+
+<div class="SECT2">
+<h2 class="SECT2"><a id="AEN4487" name="AEN4487">13.3.2 <tt
+class="COMMAND">nslookup</tt></a></h2>
+
+<p><tt class="COMMAND">nslookup</tt> is a tried and true program that has weathered the
+ages. <tt class="COMMAND">nslookup</tt> has been deprecated and may be removed from
+future releases. There is not even a man page for this program.</p>
+
+<table border="0" bgcolor="#E0E0E0" width="100%">
+<tr>
+<td>
+<pre class="SCREEN">
+<samp class="PROMPT">%</samp> <kbd class="USERINPUT">nslookup 64.57.102.34</kbd>
+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
+</pre>
+</td>
+</tr>
+</table>
+</div>
+
+<div class="SECT2">
+<h2 class="SECT2"><a id="AEN4496" name="AEN4496">13.3.3 <tt
+class="COMMAND">dig</tt></a></h2>
+
+<p>The meanest dog in the pound, the domain information groper, <tt
+class="COMMAND">dig</tt>(1) for short, is the go-to program for finding DNS information.
+<tt class="COMMAND">dig</tt> can grab just about anything from a DNS server including
+reverse lookups, A, CNAME, MX, SP, and TXT records. <tt class="COMMAND">dig</tt> has many
+command line options and if you're not familiar with it you should read through it's
+extensive man page.</p>
+
+<table border="0" bgcolor="#E0E0E0" width="100%">
+<tr>
+<td>
+<pre class="SCREEN">
+<samp class="PROMPT">%</samp> <kbd
+class="USERINPUT">dig @192.168.1.254 www.slackware.com mx</kbd>
+
+; &lt;&lt;&#62;&#62; DiG 9.2.2 &lt;&lt;&#62;&#62; @192.168.1.254 www.slackware.com mx
+;; global options: printcmd
+;; Got answer:
+;; -&#62;&#62;HEADER&lt;&lt;- 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
+</pre>
+</td>
+</tr>
+</table>
+
+<p>This should give you an idea how <tt class="COMMAND">dig</tt> works.
+&#8220;@192.168.1.254&#8221; specifies the dns server to use.
+&#8220;www.slackware.com&#8221; is the domain name I am performing a lookup on, and
+&#8220;mx&#8221; is the type of lookup I am performing. The above query tells me that
+e-mail to <tt class="HOSTID">www.slackware.com</tt> will instead be sent to <tt
+class="HOSTID">mail.slackware.com</tt> for delivery.</p>
+</div>
+</div>
+
+<div class="NAVFOOTER">
+<hr align="LEFT" width="100%" />
+<table summary="Footer navigation table" width="100%" border="0" cellpadding="0"
+cellspacing="0">
+<tr>
+<td width="33%" align="left" valign="top"><a
+href="basic-network-commands-traceroute.html" accesskey="P">Prev</a></td>
+<td width="34%" align="center" valign="top"><a href="index.html"
+accesskey="H">Home</a></td>
+<td width="33%" align="right" valign="top"><a href="basic-network-commands-finger.html"
+accesskey="N">Next</a></td>
+</tr>
+
+<tr>
+<td width="33%" align="left" valign="top"><tt class="COMMAND">traceroute</tt></td>
+<td width="34%" align="center" valign="top"><a href="basic-network-commands.html"
+accesskey="U">Up</a></td>
+<td width="33%" align="right" valign="top"><tt class="COMMAND">finger</tt></td>
+</tr>
+</table>
+</div>
+</body>
+</html>
+