IPv4-mapped IPv6 address

term

networkingsecurity

Kept in this browser · My desk

An IPv6 address of the form ::ffff:a.b.c.d that stands for an IPv4 address, so that IPv6 software can name an IPv4 peer.

RFC 4291 (section 2.5.5.2) defines the layout: 80 zero bits, 16 one bits, then the IPv4 address. RFC 3493 uses it so that AF_INET6 sockets can reach IPv4 nodes, and Python's documentation notes that a dual-stack listener reports an IPv4 client in this form. Python's ipaddress returns the embedded address as ipv4_mapped, IPv4Address.ipv6_mapped goes the other way (3.13), and since 3.13 is_private, is_global and the other properties of a mapped address follow its IPv4 address. Security checks must unwrap it: ::ffff:127.0.0.1 is the loopback address.

Also known as: ::ffff:0:0/96, IPv4-mapped address, v4-mapped address, ipv4_mapped

← Back to I Back to the glossary