home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / mail / misc / 3613 < prev    next >
Encoding:
Text File  |  1992-11-08  |  2.2 KB  |  67 lines

  1. Newsgroups: comp.mail.misc
  2. Path: sparky!uunet!caen!sol.ctr.columbia.edu!eff!ckd
  3. From: ckd@eff.org (Christopher Davis)
  4. Subject: Re: help on IP address
  5. In-Reply-To: ralphs@halcyon.com's message of 5 Nov 92 15:33:49 GMT
  6. Message-ID: <CKD.92Nov7170142@loiosh.eff.org>
  7. Sender: usenet@eff.org (NNTP News Poster)
  8. Nntp-Posting-Host: loiosh.eff.org
  9. Organization: Electronic Frontier Foundation Tech Central
  10. References: <Bx5Gn9.M9F.2@cs.cmu.edu> <1daes1INNqse@uniwa.uwa.edu.au>
  11.     <1992Nov5.153349.13260@nwnexus.WA.COM>
  12. Date: Sat, 7 Nov 1992 22:01:44 GMT
  13. Lines: 52
  14.  
  15. Ralph> == Ralph Sims <ralphs@halcyon.com> 
  16.  
  17.  Ralph> Dig has proven especially useful, and is used by the folks at
  18.  Ralph> the NIC more than nslookup, it seems.
  19.  
  20. I don't know about the NIC, but I use dig in preference to nslookup.
  21.  
  22.  Ralph> And then there's a 'simple' (for somebody) trick that you can
  23.  Ralph> use in your login profiles:
  24. [wrapped for clarity]
  25.  Ralph> alias ptr echo \!$ \| awk -F. \'\{printf \"set
  26.  Ralph> q=PTR\\n%s.%s.%s.%s.in-addr.arpa\\n\",\$4,\$3,\$2,\$1\}\' \|
  27.  Ralph> nslookup
  28.  
  29. The dig equivalent to this is:
  30.  
  31. alias ptr 'dig -x'
  32.  
  33. dig is great.  It's on venera.isi.edu, though I don't remember the exact
  34. directory, it should be pretty obvious.
  35.  
  36. Other nice things about dig come from its nature as a command-line tool;
  37. you can use whatever shell command-line editing you're used to, unlike
  38. with nslookup.
  39.  
  40. Example: to look up MX records, then HINFO, for a particular machine:
  41.  
  42. nslookup:
  43. > set q=mx
  44. > foo.bar.dom.
  45. [results]
  46. > set q=hinfo
  47. > foo.bar.dom.
  48. [results]
  49.  
  50. dig:
  51. % dig foo.bar.dom. mx
  52. [results]
  53. % ^mx^hinfo
  54. [results]
  55.  
  56. And my favorite dig trick (thanks Randal):
  57. % dig . ns +aa @nearest.root.server > /var/domain/root.cache
  58.  
  59. Since dig outputs its results in BIND file format (complete with
  60. comments, prefixed with ';') it's great for piping/appending stuff (say,
  61. doing a manual zone transfer to a file so you can prime your secondaries).
  62. --
  63. Christopher K. Davis      | ``Usenet seems to run much like the Kif (or,
  64. <ckd@eff.org>   EFF #14   |   for the TV generation, Klingon) high command.
  65. System Administrator, EFF |   Whoever takes action and can be heard wins.''
  66. +1 617 864 0665  [CKD1]   |   --Peter da Silva <peter@ferranti.com>
  67.