3

Even after disabling ipv6 on my linux machine and restarting network services, and not having an ipv6 address assigned to an interface, one of my daemon (cassandra to be specific)is using an ipv4 mapped ipv6 address when checking in netstat, like ::ffff:10.xxx.x.xx:9042

I checked strace, and it is using sa_family=AF_INET, sin_port=htons(44315), sin_addr=inet_addr("127.0.0.1") and is not using AF_INET6. Is it that ipv6 is still active? Why is this required?

I have asked this question in Networkengineering as well, as I am not sure where to ask. Apologies for that,and please delete the one in the irrelevant section.

1 Answer 1

1

This should help. It says

IPv6 applications compatibility with IPv4 applications

Socket applications written with AF_INET6 address family allow Internet Protocol version 6 (IPv6) applications to work with Internet Protocol version 4 (IPv4) applications (those applications that use AF_INET address family). This feature allows socket programmers to use an IPv4-mapped IPv6 address format. This address format represents the IPv4 address of an IPv4 node to be represented as an IPv6 address. The IPv4 address is encoded into the low-order 32 bits of the IPv6 address, and the high-order 96 bits hold the fixed prefix 0:0:0:0:0:FFFF. For example, an IPv4-mapped address can look like this:

::FFFF:192.1.1.1

These addresses can be generated automatically by the getaddrinfo() API, when the specified host has only IPv4 addresses.

You must log in to answer this question.

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