Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using a IPv4 + IPv6 on a server (#1).

Sometimes the IPv4 address is mapped to another server (#2), so #1 isn't accessible via IPv4, but remains accessible via IPv6.

In this case IPv6 dns lookups won't work.

$ ping6 mirror.ipv6.hetzner.de
unknown host

If I disable the IPv4 address everything works fine.

$ ping6 mirror.ipv6.hetzner.de
PING mirror.ipv6.hetzner.de(2a01:4f8:0:a101::1:1) 56 data bytes
64 bytes from 2a01:4f8:0:a101::1:1: icmp_seq=1 ttl=60 time=0.469 ms

How is this possible? The IPv6 network should serve as a fallback if the IPv4 address is mapped to another server. But if I can't resolve any hostnames, i can't really work with it.

Are there any possibilities to make IPv6 dns work nevertheless IPv4 is available or not?



$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
nameserver 2a01:4f8:0:a0a1::add:1010
nameserver 2a01:4f8:0:a102::add:9999
nameserver 2a01:4f8:0:a111::add:9898


$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    100    0        0 eth0 UH    0      0        0 eth0

$ route -6
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
2a01:4f8:162:7ffe:1::2/128     ::                         U    1024 0     1 eth0
2a01:4f8:162:7ffe:6::/80       ::                         U    256 0     0 eth0
fe80::/64                      ::                         U    256 0     0 eth0
::/0                           2a01:4f8:162:7ffe:1::2     UG   1024 0     0 eth0
::/0                           ::                         !n   -1  1     6 lo
::1/128                        ::                         Un   0   1     5 lo
2a01:4f8:162:7ffe:6::2/128     ::                         Un   0   1   190 lo
fe80::5054:ff:fe3d:5f4c/128    ::                         Un   0   1     0 lo
ff00::/8                       ::                         U    256 0     0 eth0
::/0                           ::                         !n   -1  1     6 lo
share|improve this question
What does your resolv.conf look like? What does your routing table look like when the IPv4 address is not available locally? –  larsks Aug 16 '12 at 12:36
I've added both. –  dbanck Aug 16 '12 at 12:51
Does this resolve correctly: dig -t AAAA mirror.ipv6.hetzner.de @ –  faker Aug 16 '12 at 14:17
add comment

1 Answer 1

up vote 0 down vote accepted

You describe the situation as 'the IPv4 address is mapped to another server'. Does that mean the IPv4 address is actually removed from server #1 (unconfigured from network interface) or just that it doesn't get routed to the system?

I ask this because the order in resolv.conf will try IPv4 first and IPv6 second, so when the server 'thinks' it has IPv4 it will send out a packet over IPv4 and will never see the answer (and server #2 will ignore it).

The solution would be to find out what process causes the IPv4 addresses in resolvconf config and what process causes the IPv6 addresses and switch those around in /etc/resolvconf/interface-order

share|improve this answer
The IP address is just routed to another server, it's an failover IP. I switched around the IPv6 and IPv4 nameservers and it's working now. –  dbanck Aug 18 '12 at 20:57
add comment

Your Answer


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.