forgotmyip.com
Home / Guides

IPv4 vs IPv6

Side-by-side comparison, and why you probably have both.

Published

IPv4 and IPv6 do the same job — give interfaces an address so packets can find them. IPv6 has a far larger address space, which matters because the central IPv4 pool ran out in 2011 (ARIN). Many networks run both at once.

Side-by-side comparison

IPv4 IPv6
Defined in RFC 791 RFC 8200
Address size 32 bits 128 bits
Example 203.0.113.42 2001:db8::8a2e:370:7334
Format 4 decimal numbers, dots 8 hex groups, colons, shortened with :: (RFC 5952)
Total addresses 232 ≈ 4.3 billion 2128 ≈ 3.4 × 1038
Central pool Exhausted 3 Feb 2011 (ARIN) Not exhausted
NAT Widely used to share addresses (RFC 3022) Not needed for address sharing
Address setup DHCP (RFC 2131) or manual SLAAC (RFC 4862), DHCPv6 (RFC 8415) or manual
Header Variable length, with header checksum (RFC 791) Fixed 40 bytes, no header checksum (RFC 8200)
IPsec Optional SHOULD be supported (RFC 8504)
Loopback 127.0.0.1 ::1 (RFC 4291)

Why do I have both?

This is called dual stack. When a site supports both, many clients use Happy Eyeballs (RFC 8305): they try IPv6 first and, if it hasn't connected after a short delay (250 ms recommended), start an IPv4 attempt in parallel and use whichever connects. Each connection uses only one protocol, which is why the home page checks each separately.

Is IPv6 more secure?

Not automatically. With IPv4, NAT means outside hosts can't start connections to your devices unless the router is configured to forward them. With IPv6, devices have globally reachable addresses, so the router's firewall does that job: RFC 6092 recommends that home routers don't forward unsolicited inbound connections to the home network by default. Check your router's firewall settings.

Should I disable IPv6?

For Windows, Microsoft says: “We don't recommend that you disable IPv6 or IPv6 components … If you do, some Windows components might not function.” It suggests preferring IPv4 in prefix policies instead (Microsoft).

Check which ones you have

curl -4 https://forgotmyip.com   # your IPv4 address
curl -6 https://forgotmyip.com   # your IPv6 address (fails if you have no IPv6)

Sources

  1. ARIN — The IANA IPv4 Address Free Pool is Now Depleted (3 Feb 2011)
  2. RFC 791 — Internet Protocol (IPv4)
  3. RFC 8200 — Internet Protocol, Version 6 (IPv6) Specification
  4. RFC 5952 — Recommendation for IPv6 Address Text Representation
  5. RFC 3022 — Traditional IP Network Address Translator (NAT)
  6. RFC 2131 — Dynamic Host Configuration Protocol (DHCP)
  7. RFC 4862 — IPv6 Stateless Address Autoconfiguration (SLAAC)
  8. RFC 8415 — DHCP for IPv6 (DHCPv6)
  9. RFC 8504 — IPv6 Node Requirements (IPsec: SHOULD)
  10. RFC 4291 — IP Version 6 Addressing Architecture
  11. RFC 8305 — Happy Eyeballs Version 2
  12. RFC 6092 — Simple Security in IPv6 Residential CPE
  13. Microsoft — Configure IPv6 for advanced users (don't disable IPv6)

Forgot your IP? See your IPv4 and IPv6 now.

Show my IP