DekGenius.com
I l@ve RuBoard Previous Section Next Section

11.4 Adding a Host with an IPv6 Interface

11.4.1 Problem

You need to add forward- and reverse-mapping records for a host with an IPv6 interface.

11.4.2 Solution

Add a AAAA (pronounced "quad A") record to the host's domain name, mapping the name to the host's IPv6 address. The RDATA of the AAAA record is an IPv6 address represented as eight groups of as many as four hexidecimal digits, separated by colons. For example:

0123:4567:89ab:cdef:0123:4567:89ab:cdef

Groups of hex digits that begin with one or more zeroes can be written without the zeroes, so that address could also be written as 123:4567:89ab:cdef:123:4567:89ab:cdef.

So a complete AAAA record might look like this:

host-v6.foo.example.  IN  AAAA  123:4567:89ab:cdef:123:4567:89ab:cdef

To reverse map the address back to a domain name, create a reverse-mapping zone under ip6.arpa to correspond to the network the host is on. Each label to the left of ip6.arpa corresponds to a nibble (four bits) of the 128-bit IPv6 address, written (as it was in the AAAA record's RDATA) as a hex digit. As with reverse-mapping zones for IPv4, the labels are written in the domain name in the opposite order as the corresponding bits appear in the address. So if you run the network 123:4567:89ab:cdef/64, you'd create a zone called f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.0.ip6.arpa. (When creating domain names from IPv6 addresses, you do need to include every nibble of the address; you can't omit any zeroes.)

Within this zone, add a PTR record to the domain name formed by all 32 (!) of the nibbles in the host's IPv6 address, in reverse order, with ip6.arpa appended. So the PTR record that corresponds to the AAAA record shown earlier in this recipe would be:

f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.0.f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.0.ip6.arpa. IN  PTR  
host-v6.foo.example.

This is clearly a good time to take advantage of the default origin in the zone data file (the domain name of the zone), and abbreviate that to:

f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.0    IN    PTR    host-v6.foo.example.

11.4.3 Discussion

You'll need to have your IPv6 reverse-mapping zone delegated to you, just like you had a subdomain of in-addr.arpa delegated to you in Section 1.81.7. Unless you work for an ISP, the ISP that assigned your IPv6 address space to you will probably delegate your IPv6 reverse-mapping zone to you, too. If you do work for an ISP, you may need to contact one of the address registries listed in Recipe 1.7Section 1.8 and ask them to delegate your IPv6 reverse-mapping zone to you.

You can test IPv6 forward- and reverse-mappings with dig. To look up the AAAA record above, you could run:

$ dig host-v6.foo.example aaaa

To look up the PTR record with a BIND 8.3.2 or later version of dig, you could use:

$ dig -x 123:4567:89ab:cdef:123:4567:89ab:cdef

To look up the PTR record with an older BIND 8 or a BIND 9 version of dig, you'd have to use:

$ dig ptr f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.0.f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.0.ip6.arpa

11.4.4 See Also

Section 1.81.7 for delegation of a reverse-mapping zone, RFC 1886 for the specification of the AAAA record and ip6.int (which is now ip6.arpa), and "IPv6 Forward and Reverse Mapping" in Chapter 10 of DNS and BIND.

    I l@ve RuBoard Previous Section Next Section