4

When I attempt resolve a name that is listed with both record types the OS returns the A record. A trace shows that the AAAA record is returned first followed by A but the application (Apache based HTTP GET, nslookup or dig) always returns the v4 address.

I running a dual stack, single NIC machine with Ubuntu 12.04.1 LTS. My network is v4 locally and v6 only to the Internet. My resolv.conf is configured with v6 (Google) nameservers only and my gai.conf had no non-comment/blank lines which should use the default order.

Based on other postings I've tried adding options inet6 to resolv.conf and these lines to gai.conf:

label ::1/128       0
label ::/0          1
label 2002::/16    2
label ::/96         3
label ::ffff:0:0/96 4
label fec0::/10     5
label fc00::/7      6
#label 2001:0::/32   7

Neither has changed the result. Anyone have any idea what is going on?

Thanks.

1 Answer 1

3

dig(1) says "If no type argument is supplied, dig will perform a lookup for an A record." In other words, you need to specify AAAA if that's what you want. nslookup also looks for an A record by default.

Example: "dig google.com AAAA" will return the IPv6 address for google.com

I usually use host, as by default it looks for A, AAAA and MX records.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .