O'Reilly logo

Computer Science & Perl Programming by Jon Orwant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 57. DNS Updates with Perl

Jon Drukman

This article talks about the Net::DNS::Update module, and how you can use it to remotely update information on a DNS server. You might do this if you are a DNS administrator wanting to balance a load between a range of machines, or if you are the owner of a domain and want to programmatically update the information in that domain even though you don’t have access to the DNS server’s configuration files.

When this article was written, BIND 8 was the most recent version. BIND 9 is now available; the examples in this article will work with both versions.

DNS Basics

Whenever you send mail or visit a web site, your computer has to know how to reach a remote computer. In particular, it has to translate a name like “perl.com” to its Internet address, 199.45.135.9. Only when that address is known can your mail program send mail to and your web browser display http://www.perl.com/CPAN/.

The act of translating hostnames to Internet addresses is called name resolution, and the infrastructure that supports it is the Domain Name System, or DNS. In this article, I’ll demonstrate how to access some of the new features of the Berkeley Internet Name Daemon (BIND) Version 8 with the Net::DNS modules available on CPAN. In particular, I’ll focus on Net::DNS::Update, which allows you to change the information stored in a nameserver on the fly. You could use this technique to take a crashed box in a server farm out of rotation, manage PPP or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required