Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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.

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.