IPv4-mapped IPv6 address
termKept 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
Sources
- RFC 4291, IP Version 6 Addressing Architecture: section 2.5.5.2, IPv4-mapped IPv6 address (read 2026-10-27)
- RFC 3493, Basic Socket Interface Extensions for IPv6: section 3.7, compatibility with IPv4 nodes (read 2026-10-27)
- Python 3.13 documentation, ipaddress: ipv4_mapped, ipv6_mapped (3.13) and the is_private rule for mapped addresses (read 2026-10-27)