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 work in a mixed IPv4 / IPv6 environment. I read that IPv4 addresses can be mapped into the IPv6 space with this syntax

::ffff:1.2.3.4 (1.2.3.4 is the IPv4 address)

Does Linux support this notation ? All these fail on my server:

ping6 ::ffff:1.2.3.4 # to the server IP
ping6 ::ffff:127.0.0.1
share|improve this question

1 Answer 1

up vote 6 down vote accepted

Rather than using ping6, try ssh'ing to ::ffff:127.0.0.1.

I think the specific failure here is related to ping6, not the IP4 mapped addresses.

Aren't IPv4 mapped IPv6 addresses actually using IPv4, and hence, not suitable for ping6?

Linux has a socket option, IPV6_V6ONLY which prevents some applications using IPv4 mapped addresses. However, I think for ping6 the specific issue is the way it works internally.

This is from netbsd, but I think it covers the issue.

You should be aware that IPv4 mapped IPv6 is still IPv4 - it's only presented in a IPv6-resembling text format (or actually, when calling your operating system's libraries or kernel, binary socket address format.)

For dual-protocol applications this is no problem - they know how to switch (implicitly, when using the right (modern) library calls).

share|improve this answer
1  
ssh works indeed! Why would support for IPv4 mapped addresses be specifiy to each application ? –  Gene Vincent Jul 23 '13 at 18:43
2  
lists.apple.com/archives/ipv6-dev/2011/Oct/msg00003.html for an explanation regarding ping6 –  dawud Jul 23 '13 at 18:46
1  
@GeneVincent I would expect that support for IPv4 mapped addresses is specific to libraries. Tools like ping6 have their own code for mapping addresses and building packets, and in the case of ping6 I would expect it to use IPv6 ICMP packets rather than IPv4 ICMP packets. IPv4 wouldn't recognize the ping request. –  BillThor Jul 24 '13 at 0:04

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.