Gearhead: Wrapping up DNS

This week we dive back into the depths of DNS records and related esoterica.

A DNS record type that we haven't covered is the pointer, or PTR record. This record type reverse maps addresses to names, so for the network we've been talking about, the PTR records would be: IN PTR IN PTR IN PTR IN PTR IN PTR

As before, the addresses on the left side are reversed and the domain is added. This data goes in the database that resolves reverse lookups - 206.65.120.db (www.nwfusion. com, DocFinder: 3736).

Now we have the forward lookup database for our domain - redqueen.db, and our reverse lookup database - 206.65.120.db.

The final thing we need to do is set up a loopback network database. The loopback address - - is used when a machine wants to send and receive packets to and from itself. In our example, this data is stored in the file 127.0.0.db and looks like this: IN SOA alice. ( 200103051053 ; Serial 86400 ; 1 day refresh 3600 ; 1 hour retry 604800 ; 1 week expiration 86400 ) ; 1 day TTL IN NS IN PTR localhost.

That final line is how the name server knows that "localhost" is mapped to (the reverse of the record " IN A 127.0. 0.1" in the database redqueen.db).

One thing we haven't discussed is how DNS works with e-mail. There's a special record type - the Mail Exchanger, or MX record - for specifying mail servers for a domain.

An MX record looks like this: IN MX 1 borogrove. com.

This means will accept or relay mail for the domain The value "1" is used when there are multiple mail servers for a given name to determine the order servers should be used in. If we had several servers: IN MX 1 borogrove1. IN MX 2 borogrove2. IN MX 5

The lowest-numbered server would be tried first and, failing that, the next-highest-numbered server, and so on. Again, there's a lot more behind the mechanisms of MX records and how mail servers interact with them that we will forgo due to space constraints.

Anyway, that should get you started with a DNS server.

We have considered producing a more-detailed online Gearhead Guide to DNS. Let us know if you'd find it useful. Anyone interested in sponsoring it should drop a line to

This story, "Gearhead: Wrapping up DNS" was originally published by Network World.

ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon