Article View: comp.mail.misc
Article #2174Re: help on IP address
From: Christopher Davis
Date: Sat, 07 Nov 1992 22:01
Date: Sat, 07 Nov 1992 22:01
52 lines
2277 bytes
2277 bytes
Ralph> == Ralph Sims <ralphs@halcyon.com>
Ralph> Dig has proven especially useful, and is used by the folks at
Ralph> the NIC more than nslookup, it seems.
I don't know about the NIC, but I use dig in preference to nslookup.
Ralph> And then there's a 'simple' (for somebody) trick that you can
Ralph> use in your login profiles:
[wrapped for clarity]
Ralph> alias ptr echo \!$ \| awk -F. \'\{printf \"set
Ralph> q=PTR\\n%s.%s.%s.%s.in-addr.arpa\\n\",\$4,\$3,\$2,\$1\}\' \|
Ralph> nslookup
The dig equivalent to this is:
alias ptr 'dig -x'
dig is great. It's on venera.isi.edu, though I don't remember the exact
directory, it should be pretty obvious.
Other nice things about dig come from its nature as a command-line tool;
you can use whatever shell command-line editing you're used to, unlike
with nslookup.
Example: to look up MX records, then HINFO, for a particular machine:
nslookup:
> set q=mx
> foo.bar.dom.
[results]
> set q=hinfo
> foo.bar.dom.
[results]
dig:
% dig foo.bar.dom. mx
[results]
% ^mx^hinfo
[results]
And my favorite dig trick (thanks Randal):
% dig . ns +aa @nearest.root.server > /var/domain/root.cache
Since dig outputs its results in BIND file format (complete with
comments, prefixed with ';') it's great for piping/appending stuff (say,
doing a manual zone transfer to a file so you can prime your secondaries).
--
Christopher K. Davis | ``Usenet seems to run much like the Kif (or,
<ckd@eff.org> EFF #14 | for the TV generation, Klingon) high command.
System Administrator, EFF | Whoever takes action and can be heard wins.''
+1 617 864 0665 [CKD1] | --Peter da Silva <peter@ferranti.com>
Technical Details
Message-ID:
<CKD.92Nov7170142@loiosh.eff.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!sol.ctr.columbia.edu!eff!ckdReferences:
<Bx5Gn9.M9F.2@cs.cmu.edu> <1daes1INNqse@uniwa.uwa.edu.au> <1992Nov5.153349.13260@nwnexus.WA.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.mail.misc Path: arc1-ca.pugleaf.net!sparky!uunet!caen!sol.ctr.columbia.edu!eff!ckd From: ckd@eff.org (Christopher Davis) Subject: Re: help on IP address In-Reply-To: ralphs@halcyon.com's message of 5 Nov 92 15:33:49 GMT Message-ID: <CKD.92Nov7170142@loiosh.eff.org> Sender: usenet@eff.org (NNTP News Poster) Nntp-Posting-Host: loiosh.eff.org Organization: Electronic Frontier Foundation Tech Central References: <Bx5Gn9.M9F.2@cs.cmu.edu> <1daes1INNqse@uniwa.uwa.edu.au> <1992Nov5.153349.13260@nwnexus.WA.COM> Date: Sat, 7 Nov 1992 22:01:44 GMT Lines: 52