Communication Networks · Visualized

IPv4 vs IPv6

Addressing & Names

How devices get numbers, find each other on the LAN, and turn human-readable names into addresses.

7 interactive subtopics — each one animated, step-through and explained.

IPv4 vs IPv6

Addressing & Names

IPv4's 4.3 billion addresses are exhausted — NAT and carrier-grade NAT paper over the shortage. IPv6 expands addresses to 128 bits (≈ 340 undecillion), simplifies the header for faster routing, drops the checksum and fragmentation burden, replaces broadcast with efficient multicast/anycast, and lets hosts auto-configure addresses (SLAAC) without DHCP.

How IPv4 vs IPv6 Works

  1. IPv4 writes 32 bits as four dotted decimals (192.168.1.1); IPv6 writes 128 bits as eight hex groups (2001:db8::1).
  2. The IPv6 header is fixed 40 bytes with far fewer fields — routers process it in one pass.
  3. Routers no longer recompute header checksums or fragment; senders learn the path MTU instead.
  4. Broadcast disappears: multicast (one-to-many) and anycast (nearest of many) take its place.
  5. Transition tech — dual stack, tunnels, NAT64 — lets the two protocols coexist for decades.

IPv4 vs IPv6 Worked Example

Try it: Compare the headers side by side.

IPv4: 12+ fields, variable length, checksum recalculated at every hop, fragmentation anywhere. IPv6: 8 fixed fields, no checksum, no router fragmentation, flow labels for QoS — the simplifications are why IPv6 routes at line rate with less CPU.

IPv4 header — 20–60 bytesIPv6 header — fixed 40 bytesVer / IHL / fieldsver, IHL, ToS, length, ID, flags, TTL, proto… (12+)ver, class, flow label, length, next, hop — 8 fixedChecksumrecomputed at every hopnone — removedFragmentationany router may fragmentsource only (path MTU discovery)Address sizesource + dest: 2 × 32 bitssource + dest: 2 × 128 bitsExtrasoptions field, padding — variable lengthflow label for QoS, extension headersevery highlighted row: IPv6 simplified or removed the IPv4 burden
IPv4 field in focus IPv6 field in focus
Stage 1 / 5
IPv4 header: 20–60 bytes, 12+ fields. IPv6: FIXED 40 bytes, 8 fields — routers process it in one pass.

IPv4 vs IPv6: Key Facts to Remember

Address spaceIPv4 ≈ 4.3 × 10⁹ addresses; IPv6 ≈ 3.4 × 10³⁸ — every device on Earth gets billions
AdoptionGoogle reports 45%+ of its traffic arrives over IPv6 (and climbing)
Shorthand:: replaces one run of all-zero groups — 2001:0db8:0000:0000:... → 2001:db8::

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses

See how packets really travel

Networks are built on the structures and algorithms you can watch step by step — queues, trees, and routing algorithms.