dns

IPv4 vs IPv6

The Internet Protocol
Evolution

Think of an IP address as a digital home address. Just as every house needs a unique address to receive mail, every device needs a unique IP to receive data.

IPv4 (Internet Protocol version 4) is the legacy system we've used since the 80s. It's like a small town's postal system that ran out of numbers.

IPv6 (Internet Protocol version 6) is the modern upgrade. It's designed to ensure we never run out of addresses again—assigning a unique ID to every "grain of sand" on Earth if needed.

Global Network Connection

Connecting the world, packet by packet.

compare_arrows

Technical Showdown

IPv4 Legacy

Address Size

32-bit

4 bytes total

Format

192.168.1.1

Dotted Decimal

Total Addresses

~4.3 Billion

232 (Exhausted)

Configuration

DHCP or Manual

Needs a server to assign IP

Security

Optional

IPSec is an add-on

IPv6 Future

Address Size

128-bit

16 bytes total

Format

2001:0db8:85a3::8a2e:0370:7334

Hexadecimal (Colon-separated)

Total Addresses

~340 Undecillion

2128 (Virtually Infinite)

Configuration

SLAAC (Auto-config)

Device can generate its own IP

Security

Mandatory (in spec)

Built-in from the ground up

memory

Header Structure Comparison

Notice how the IPv6 header is simpler despite being larger (40 bytes fixed vs 20+ bytes). It removes the Checksum (letting lower layers handle errors) and aligns fields to 64-bit boundaries for faster processing by modern routers.

IPv4 Header (Complex)

Version IHL ToS Total Length Identification Flags Fragment Offset TTL Protocol Header Checksum Source IP Address (32-bit) Destination IP Address (32-bit) Options & Padding

Checksum requires recalculation at every router hop (slow!).

IPv6 Header (Streamlined)

Ver Traffic Class Flow Label Payload Length Next Header Hop Limit Source Address (128-bit) Destination Address (128-bit)

Fixed size (40B). No Checksum field. Flow Label helps QoS.

school

Interview Prep Guide

If asked by an interviewer, focus on these high-impact concepts. Click the cards to reveal the "Model Answer".

Why do we need IPv6 if we have NAT?

expand_more

What is the difference between Broadcast and Multicast?

expand_more

How does IPv6 handle packet fragmentation?

expand_more

Explain "0::0" and "::1" notation.

expand_more