NetDetectHubGet the app

Home / Learn

Module 1: IP addresses and your connectionLesson 1 of 136 min read

IPv4 vs IPv6: public, private and shared addresses

Ask a laptop for its IP address and it may say 192.168.1.23. Ask a website and it sees something completely different. Neither answer is wrong. They are two kinds of address doing two different jobs, and on many connections a third kind is added on top, from IPv6. This lesson sorts out which is which, using the number formats from the standards and a home network as the example.

Two address sizes

An IP address is the number that tells the internet where to deliver a packet. The original Internet Protocol, IPv4, defined in RFC 791, fixes every address at four octets, which is 32 bits. That allows 2^32 different values: 4,294,967,296 in total, which sounds like a lot until you count every phone, laptop, server and router that wants one.

IPv6, specified in RFC 8200, raises the address size from 32 bits to 128 bits. The standard gives three reasons: more levels of addressing hierarchy, far more addressable nodes, and simpler automatic configuration. 2^128 is about 3.4 × 10^38 addresses, so IPv6 networks are not rationed the way IPv4 is.

How many addresses

IPv4: 2^32 = 4,294,967,296 addresses. IPv6: 2^128 ≈ 3.4 × 10^38 addresses. One standard IPv6 network (a /64) alone holds 2^64 ≈ 1.8 × 10^19 addresses, about four billion times the whole IPv4 space.

How they are written

IPv4 is written as four decimal numbers from 0 to 255, separated by dots, such as 203.0.113.45. Each number is one octet, or 8 bits.

IPv6 is written as eight groups of four hexadecimal digits separated by colons. Two shortcuts keep it readable. Leading zeros in a group can be dropped, and one run of all-zero groups can be replaced by a double colon. RFC 4291 uses this example: 2001:DB8:0:0:8:800:200C:417A can be shortened to 2001:DB8::8:800:200C:417A. The loopback address, which always means this computer, is ::1.

RFC 4291 also fixes the shape of most IPv6 addresses: for ordinary unicast addresses the last 64 bits, called the interface identifier, name the device, and the first 64 bits name the network. That is why a home IPv6 network is usually a /64.

Private addresses and the router in between

RFC 1918 sets aside three IPv4 blocks for private networks. Anyone may use them inside a home or company, and they are never assigned to anyone on the public internet:

  • 10.0.0.0 – 10.255.255.255 (10/8): 16,777,216 addresses
  • 172.16.0.0 – 172.31.255.255 (172.16/12): 1,048,576 addresses
  • 192.168.0.0 – 192.168.255.255 (192.168/16): 65,536 addresses

Why private hosts can still browse

RFC 1918 says private hosts cannot have direct IP connectivity outside their own network, but can still reach outside services through a mediating gateway. In a home, that gateway is the router: it rewrites each outgoing packet so it appears to come from the router's single public address, and sends the replies back to the right device.

Worked example: one home, three addresses

Picture a laptop on a home network. The router hands it the private address 192.168.1.23. The ISP gives the router one public IPv4 address, here written as the documentation address 203.0.113.45. Every website the laptop visits over IPv4 sees 203.0.113.45, not 192.168.1.23, and so does every other device in the house.

If the ISP also offers IPv6, the router receives a network prefix such as 2001:db8:4a1:2c00::/64 and the laptop builds its own address inside it, for example 2001:db8:4a1:2c00:1c3e:9f2:aa01:7d. That address is public: no translation is needed, because IPv6 has enough room for every device. A website reached over IPv6 sees this address instead of the IPv4 one, and the browser picks which family to use for each site.

The same laptop, as seen from three places

Its own settings: 192.168.1.23 (private, RFC 1918). A website over IPv4: 203.0.113.45 (the router's public address, shared by the household). A website over IPv6: 2001:db8:4a1:2c00:1c3e:9f2:aa01:7d (public, unique to the laptop).

The shared range used by ISPs

Some ISPs no longer have enough IPv4 addresses to give every customer one. They put a second translator, called carrier-grade NAT (CGN), inside their own network. RFC 6598 reserves 100.64.0.0/10, about 4.2 million addresses, for the link between that CGN and customers' routers.

This shared address space is not globally routable, like RFC 1918 space, but it is meant only for service-provider networks. If your router's WAN or internet address starts with 100.64 to 100.127, your public IPv4 address belongs to the ISP's translator and is shared with other customers. That matters for anyone who wants to run a server at home, which is the subject of the port forwarding lesson.

See the public address websites receive from you. Check the IPv4 address and IPv6 address rows: if IPv6 says None, your connection is IPv4 only. Compare the IPv4 value with the address in your device's settings to see the translation at work.

What is my IP

Quick check

Three questions. Pick an answer to see why.

  1. Your phone's Wi-Fi settings show 192.168.0.14, but a website reports 203.0.113.80. What explains the difference?

    Show the answer

    Answer: 192.168.0.14 is a private RFC 1918 address and the router translates it to its public address Private addresses only work inside the home network; the router rewrites outgoing traffic to its own public IPv4 address.

  2. Why does a home IPv6 network not need address translation the way IPv4 does?

    Show the answer

    Answer: With 128-bit addresses there is room to give every device its own public address A single /64 has 2^64 addresses, so the ISP can give each household a whole network instead of one shared address.

  3. Your router's status page shows an internet address of 100.72.18.9. What does that tell you?

    Show the answer

    Answer: Your ISP uses carrier-grade NAT; 100.72.18.9 is in the shared range 100.64.0.0/10 RFC 6598 reserves 100.64.0.0/10 for the link between an ISP's CGN and customer routers, so your public IPv4 address belongs to the CGN.

Standards, not guesses

These guides explain how the internet's plumbing works, using the published standards (RFCs) and official documentation. Each guide shows the date it was last checked.

Sources

Last checked October 28, 2026

Results come from public DNS, registry and certificate data and from checks run from Cloudflare's network at the moment you ask. They can differ from what another network sees. How our tools work · Terms of use.