|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Net::DNS - Perl DNS Resolver Module
|
|
Packit |
e6c8bb |
===================================
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
TABLE OF CONTENTS
|
|
Packit |
e6c8bb |
-----------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
1. Description
|
|
Packit |
e6c8bb |
2. Availability
|
|
Packit |
e6c8bb |
3. Prerequisites
|
|
Packit |
e6c8bb |
4. Installation
|
|
Packit |
e6c8bb |
5. Running Tests
|
|
Packit |
e6c8bb |
6. Demonstration Scripts
|
|
Packit |
e6c8bb |
7. Dynamic Updates
|
|
Packit |
e6c8bb |
8. Signed Queries & Updates
|
|
Packit |
e6c8bb |
9. DNSSEC
|
|
Packit |
e6c8bb |
10. Bugs
|
|
Packit |
e6c8bb |
11. Copyright
|
|
Packit |
e6c8bb |
12. License
|
|
Packit |
e6c8bb |
13. Staying Tuned
|
|
Packit |
e6c8bb |
14. Acknowledgments
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
1. DESCRIPTION
|
|
Packit |
e6c8bb |
-----------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Net::DNS is a DNS resolver implemented in Perl. It allows the programmer
|
|
Packit |
e6c8bb |
to perform nearly any type of DNS query from a Perl script. For details
|
|
Packit |
e6c8bb |
and examples, please read the Net::DNS manual page.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
To read about the latest features, see the Changes file. To find out about
|
|
Packit |
e6c8bb |
known bugs and to see what is planned for future versions, see the CPAN RT
|
|
Packit |
e6c8bb |
ticket list.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
The author invites feedback on Net::DNS. If there is something you would
|
|
Packit |
e6c8bb |
like to have added, please let me know. If you find a bug, please send me
|
|
Packit |
e6c8bb |
the information described in the BUGS section below.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
See http://www.net-dns.org/blog/ for announcements about Net::DNS.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
2. AVAILABILITY
|
|
Packit |
e6c8bb |
------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
You can get the latest version of Net::DNS from the Comprehensive Perl
|
|
Packit |
e6c8bb |
Archive Network (CPAN) or from the module's homepage:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
http://search.cpan.org/dist/Net-DNS/
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
or through
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
http://www.net-dns.org/
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Additionally a subversion repository is made available through
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
http://www.net-dns.org/svn/net-dns/
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
The version on the "trunk" (http://www.net-dns.org/svn/net-dns/trunk) is
|
|
Packit |
e6c8bb |
the version that is targeted for next release.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Please note that the SVN version at any given moment may be broken.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
3. PREREQUISITES
|
|
Packit |
e6c8bb |
-------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
The availability of prerequisites for Net::DNS is tested at installation
|
|
Packit |
e6c8bb |
time. These are the core packages that need to be available:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Digest::HMAC
|
|
Packit |
e6c8bb |
Digest::MD5
|
|
Packit |
e6c8bb |
Digest::SHA
|
|
Packit |
e6c8bb |
File::Spec
|
|
Packit |
e6c8bb |
IO::Socket
|
|
Packit |
e6c8bb |
MIME::Base64
|
|
Packit |
e6c8bb |
Time::Local
|
|
Packit |
e6c8bb |
Test::More
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
The availability of these optional packages is tested at runtime:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Digest::BubbleBabble
|
|
Packit |
e6c8bb |
Digest::GOST
|
|
Packit |
e6c8bb |
IO::Socket::INET6
|
|
Packit |
e6c8bb |
IO::Socket::IP
|
|
Packit |
e6c8bb |
Net::DNS::SEC
|
|
Packit |
e6c8bb |
Net::LibIDN
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
You can obtain the latest version of Perl from:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
http://www.cpan.org
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Some of the demonstration and contributed scripts may require additional
|
|
Packit |
e6c8bb |
modules -- see demo/README and contrib/README for details.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Note that the Test::More module is actually part of the Test-Simple
|
|
Packit |
e6c8bb |
distribution. See the FAQ (lib/Net/DNS/FAQ.pod) for more information.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
4. INSTALLATION
|
|
Packit |
e6c8bb |
------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Please install any modules mentioned in the PREREQUISITES section above.
|
|
Packit |
e6c8bb |
If you do not, some features of Net::DNS will not work. When you run "perl
|
|
Packit |
e6c8bb |
Makefile.PL", Perl should complain if any of the required modules is
|
|
Packit |
e6c8bb |
missing.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
To build this module, run the following commands:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
tar xvzf Net-DNS-?.??.tar.gz
|
|
Packit |
e6c8bb |
cd Net-DNS-?.??
|
|
Packit |
e6c8bb |
perl Makefile.PL
|
|
Packit |
e6c8bb |
make
|
|
Packit |
e6c8bb |
make test
|
|
Packit |
e6c8bb |
make install
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
If you do not wish to run the online tests, the '--no-online-tests' option
|
|
Packit |
e6c8bb |
can be used. Similarly, '--online-tests' will enable the online tests.
|
|
Packit |
e6c8bb |
Online tests will be run by default, but the result will not adversely
|
|
Packit |
e6c8bb |
affect the outcome of test suite.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Also, if you do not wish to run the IPv6 tests, the '--no-IPv6-tests'
|
|
Packit |
e6c8bb |
option can be used. Similarly, '--IPv6-tests' will enable the IPv6 tests.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
5. RUNNING TESTS
|
|
Packit |
e6c8bb |
-------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
If any of the tests fail, please contact the author with the output from
|
|
Packit |
e6c8bb |
the following command:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
make test TEST_VERBOSE=1
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
6. DEMONSTRATION SCRIPTS
|
|
Packit |
e6c8bb |
---------------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
There are a few demonstration scripts in the demo/ directory -- see
|
|
Packit |
e6c8bb |
demo/README for more information. Contributed scripts are in the contrib/
|
|
Packit |
e6c8bb |
directory -- see contrib/README.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
The author would be happy to include any contributed scripts in future
|
|
Packit |
e6c8bb |
versions of this module. All I ask is that they be documented (preferably
|
|
Packit |
e6c8bb |
using POD) and that the contributor's name and contact information be
|
|
Packit |
e6c8bb |
mentioned somewhere.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
7. DYNAMIC UPDATES
|
|
Packit |
e6c8bb |
---------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Net::DNS supports DNS dynamic updates as documented in RFC 2136; for more
|
|
Packit |
e6c8bb |
information and examples, please see the Net::DNS::Update manual page.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Here is a summary of the update semantics for those interested (see RFC
|
|
Packit |
e6c8bb |
2136 for details):
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
PREREQUISITE SECTION
|
|
Packit |
e6c8bb |
# RRs NAME TTL CLASS TYPE RDLENGTH RDATA
|
|
Packit |
e6c8bb |
----- ---- --- ----- ---- -------- -----
|
|
Packit |
e6c8bb |
yxrrset 1 name 0 ANY type 0 empty
|
|
Packit |
e6c8bb |
yxrrset 1+ name 0 class type rdlength rdata
|
|
Packit |
e6c8bb |
nxrrset 1 name 0 NONE type 0 empty
|
|
Packit |
e6c8bb |
yxdomain 1 name 0 ANY ANY 0 empty
|
|
Packit |
e6c8bb |
nxdomain 1 name 0 NONE ANY 0 empty
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
UPDATE SECTION
|
|
Packit |
e6c8bb |
# RRs NAME TTL CLASS TYPE RDLENGTH RDATA
|
|
Packit |
e6c8bb |
----- ---- --- ----- ---- -------- -----
|
|
Packit |
e6c8bb |
add RRs 1+ name ttl class type rdlength rdata
|
|
Packit |
e6c8bb |
del RRset 1 name 0 ANY type 0 empty
|
|
Packit |
e6c8bb |
del all RRsets 1 name 0 ANY ANY 0 empty
|
|
Packit |
e6c8bb |
del RRs 1+ name 0 NONE type rdlength rdata
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
8. SIGNED QUERIES & UPDATES
|
|
Packit |
e6c8bb |
------------------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Net::DNS supports the TSIG resource record to perform signed queries and
|
|
Packit |
e6c8bb |
updates (RFC 2845). See the Net::DNS::Packet and Net::DNS::Update manual
|
|
Packit |
e6c8bb |
pages for examples.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
If you're using the BIND nameserver, the BIND FAQ shows how to generate
|
|
Packit |
e6c8bb |
keys and configure the nameserver to use them:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
http://www.nominum.com/resources/faqs/bind-faq.html
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
TSIG support is new and isn't yet complete. Please use with caution on
|
|
Packit |
e6c8bb |
production systems. Feedback on TSIG functionality would be most welcome.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
9. DNSSEC
|
|
Packit |
e6c8bb |
------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
The extensions to enable the DNSSEC signature generation and verification
|
|
Packit |
e6c8bb |
functions are distributed separately as Net::DNS::SEC. The package is
|
|
Packit |
e6c8bb |
available from CPAN.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
10. BUGS
|
|
Packit |
e6c8bb |
----
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Net::DNS, although begun in 1997, is still under development and may still
|
|
Packit |
e6c8bb |
contain a few bugs. Please see CPAN RT and Changes file for more
|
|
Packit |
e6c8bb |
information.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
We recommend that you exercise caution when using Net::DNS to maintain a
|
|
Packit |
e6c8bb |
production nameserver via dynamic updates. Always test your code
|
|
Packit |
e6c8bb |
*thoroughly*. The Net::DNS authors accept no blame if you corrupt your
|
|
Packit |
e6c8bb |
zone. That warning in place, We are aware of one large company that has
|
|
Packit |
e6c8bb |
used Net::DNS to make thousands of dynamic updates per day for at least
|
|
Packit |
e6c8bb |
three years without any problems.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Please use the following form to submit bug reports:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-DNS
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
If you find any bugs, please report each in a separate "rt.cpan.org"
|
|
Packit |
e6c8bb |
report along with the following information:
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
* subject field containing a concise descriptive summary
|
|
Packit |
e6c8bb |
* version of Perl (output of 'perl -V' is best)
|
|
Packit |
e6c8bb |
* version of Net::DNS
|
|
Packit |
e6c8bb |
* operating system type and version
|
|
Packit |
e6c8bb |
* version of nameserver (if known)
|
|
Packit |
e6c8bb |
* exact text of error message or description of problem
|
|
Packit |
e6c8bb |
* the shortest possible program that exhibits the problem
|
|
Packit |
e6c8bb |
* the specific queries you are making, if the fault can be
|
|
Packit |
e6c8bb |
demonstrated using Internet nameservers
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
If we do not have access to a system similar to yours, you may be asked
|
|
Packit |
e6c8bb |
to insert some debugging lines and report back on the results. The more
|
|
Packit |
e6c8bb |
focussed the help and information you provide, the better.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Net::DNS is currently maintained at NLnet Labs (www.nlnetlabs.nl) by:
|
|
Packit |
e6c8bb |
Willem Toorop.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Between 2005 and 2012 Net::DNS was maintained by:
|
|
Packit |
e6c8bb |
Olaf Kolkman and his team.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Between 2002 and 2004 Net::DNS was maintained by Chris Reinhardt.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Net::DNS was created in 1997 by Michael Fuhr.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
11. COPYRIGHT
|
|
Packit |
e6c8bb |
---------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Authorship of individual components and significant contributions is shown
|
|
Packit |
e6c8bb |
in the copyright notice attached to the relevant documentation. Copyright
|
|
Packit |
e6c8bb |
in all components is retained by their respective authors.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
12. LICENSE
|
|
Packit |
e6c8bb |
-------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Permission to use, copy, modify, and distribute this software and its
|
|
Packit |
e6c8bb |
documentation for any purpose and without fee is hereby granted, provided
|
|
Packit |
e6c8bb |
that the above copyright notice appear in all copies and that both that
|
|
Packit |
e6c8bb |
copyright notice and this permission notice appear in supporting
|
|
Packit |
e6c8bb |
documentation, and that the name of the author not be used in advertising
|
|
Packit |
e6c8bb |
or publicity pertaining to distribution of the software without specific
|
|
Packit |
e6c8bb |
prior written permission.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit |
e6c8bb |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit |
e6c8bb |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
Packit |
e6c8bb |
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
Packit |
e6c8bb |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
Packit |
e6c8bb |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
Packit |
e6c8bb |
DEALINGS IN THE SOFTWARE.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
13. STAYING TUNED
|
|
Packit |
e6c8bb |
-------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
http://www.net-dns.org is a web site dedicated to the development of
|
|
Packit |
e6c8bb |
Net::DNS. Announcements about Net::DNS and Net::DNS::SEC will be done
|
|
Packit |
e6c8bb |
through the Net::DNS weblog at http://www.net-dns.org/blog/. An RSS feed
|
|
Packit |
e6c8bb |
for the weblog is available.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
If you want to have access to the latest and greatest code a subversion
|
|
Packit |
e6c8bb |
repository is made available through
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
http://www.net-dns.org/svn/net-dns/
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
The version on the "trunk" (http://www.net-dns.org/svn/net-dns/trunk) is
|
|
Packit |
e6c8bb |
the version that is targeted for next release.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Please note that code from the SVN repositories trunk and development
|
|
Packit |
e6c8bb |
branches may be broken at any time.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
14. ACKNOWLEDGMENTS
|
|
Packit |
e6c8bb |
---------------
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Mike for letting me take care of his baby.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Chris for maintaining Net::DNS for a couple of years.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Olaf for maintaining Net::DNS for over eight years.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Rob Brown and Dick Franks for all their patches and input.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to all who have used Net::DNS and reported bugs, made suggestions,
|
|
Packit |
e6c8bb |
contributed code, and encouraged me to add certain features. Many of these
|
|
Packit |
e6c8bb |
people are mentioned by name in the Changes file; lack of mention should
|
|
Packit |
e6c8bb |
be considered an oversight and not a conscious act of omission.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Larry Wall and all who have made Perl possible.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Paul Albitz and Cricket Liu for allowing me [OK: that is Mike]
|
|
Packit |
e6c8bb |
to write the Net::DNS section in the programming chapter of DNS and BIND,
|
|
Packit |
e6c8bb |
3rd Edition. This chapter in earlier editions was very helpful while I
|
|
Packit |
e6c8bb |
was developing Net::DNS, and I was proud to contribute to it.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Paul Vixie and all who have worked on the BIND nameserver, which
|
|
Packit |
e6c8bb |
I've used exclusively while developing Net::DNS.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to Andreas Gustafsson for DNAME support, and for all the work he
|
|
Packit |
e6c8bb |
has done on BIND 9.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Olaf acknowledges the RIPE NCC for allowing Net::DNS maintenance to take
|
|
Packit |
e6c8bb |
place as part of 'the job'.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to the team that maintains wireshark. Without its marvelous
|
|
Packit |
e6c8bb |
interface, debugging of bugs in wireformat would be so much more
|
|
Packit |
e6c8bb |
difficult.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
Thanks to the thousands who participate in the open-source community. I
|
|
Packit |
e6c8bb |
have always developed Net::DNS using open-source systems and I am proud
|
|
Packit |
e6c8bb |
to make Net::DNS freely available to the world.
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
|
|
Packit |
e6c8bb |
---- $Id: README 1550 2017-03-08 13:14:14Z willem $
|
|
Packit |
e6c8bb |
|