Network Layer · Computer Networks

Logical Addressing — IPv6

Watch lectures
SVGVector Architecture Diagram (SVG)
COMPUTER NETWORKS · Module 3★ High PriorityLogical Addressing: IPv6IT Sem 6 · Code 100602 · 128-bit addressesMNEMONICIPv6 = 128 bits, 8 groups of 4 hex digits, fixed 40-byte header, no checksum, no broadcast.Compress: drop leading zeros, then use :: once only.Core BreakdownWhy IPv6IPv4 ran out (4.3 billion); IPv6 gives 2^128 addresses.Simple header, no NAT needed, IPsec built in, SLAAC autoconfig.Format128 bits as 8 groups of 16 bits in hex, separated by colons.Drop leading zeros; :: replaces zero groups, at most once.UnicastGlobal 2000::/3 is public; Link-local fe80::/10 is one subnet only.Unique local fc00::/7 is private; loopback ::1; unspecified ::.Multicastff00::/8 delivers to a group: ff02::1 all nodes, ff02::2 all routers.Replaces broadcast; IPv6 has NO broadcast address.HeaderFixed 40 bytes: Flow Label 20 bits, Payload Length, Next Header, Hop Limit.Hop Limit replaces TTL; no header checksum so routers forward faster.TransitionDual stack: run both IPv4 and IPv6 at once.Tunneling (6to4, Teredo) wraps IPv6 in IPv4; NAT64 / DNS64 translates.Diagram: IPv6 Address20010DB885A3000000008A2E037073348 groups x 16 bits = 128 bitsShort: 2001:DB8:85A3::8A2E:370:7334Global2000::/3Link-localfe80::/10Unique localfc00::/7Multicast ff00::/8one-to-manyAnycastone-to-nearestNO broadcast in IPv6: use multicast ff02::1Header: fixed 40 B, no checksumHop Limit = TTL, Flow Label 20 bitsDual stack / tunnel / NAT64⚠️ Exam Traps & Viva Favorites① No header checksum?Removed so routers need not recompute it atevery Hop Limit decrement. L2 CRC and L4checksums give the protection.② What replaced broadcast?Multicast, mainly all-nodes ff02::1.Never write "IPv6 broadcast" in the exam:it does not exist.③ What is anycast?One address on several hosts; the packet goes tothe nearest member by routing metric. Used forDNS root servers and CDNs.Tip: one :: only, no broadcastMaster Revision Table(learn it row by row!)FeatureIPv4IPv6NoteAddress size32 bits128 bits (2^128)Huge spaceNotationDotted decimalColon hex, :: allowedCompress onceHeader20 - 60 bytes, optionsFixed 40 bytesFaster lookupChecksumHeader checksumNoneLess work per hopBroadcastYesNo: multicast ff02::1Anycast is newLoopback127.0.0.1::1Local testQUICK FACTSCompress FE80:0000:0000:0000:0202:B3FF:FE1E:8329 -> FE80::202:B3FF:FE1E:8329GUA = 48-bit routing prefix + 16-bit subnet ID + 64-bit interface IDLink-local fe80::/10 · ULA fc00::/7 · multicast ff00::/8 · RFC 8200VERIFIED★ Golden rule: 128 bits, 40-byte header,multicast not broadcast.

Logical Addressing: IPv6

1. Motivation: Why IPv6?

IPv6 (Internet Protocol Version 6) was designed by the IETF (RFC 8200) to replace IPv4.

Driving Factors:

  1. IPv4 Address Exhaustion: The 4.3 billion4.3\text{ billion} 32-bit IPv4 addresses were completely depleted by the exponential explosion of smartphones, IoT devices, and cloud computing.
  2. Simplified Header Processing: Fixed 40-byte base header accelerates router lookup speed and hardware forwarding.
  3. No Need for NAT: Provides true end-to-end direct reachability for all internet nodes.
  4. Built-in Security: IPsec (Authentication and Encryption) is natively mandated in IPv6 architecture.
  5. Autoconfiguration: Stateless Address Autoconfiguration (SLAAC) allows plug-and-play network connectivity without requiring a DHCP server.

2. IPv6 Address Structure and Representation

An IPv6 address is 128 bits long (yielding 2128≈3.4×10382^{128} \approx 3.4 \times 10^{38} unique addresses, enough to assign billions of IPs to every atom on Earth!).

  • Written as 8 groups of 4 hexadecimal digits (each hex digit = 4 bits, each group = 16 bits / 2 bytes), separated by colons (:):
2001:0DB8:85A3:0000:0000:8A2E:0370:7334\text{2001:0DB8:85A3:0000:0000:8A2E:0370:7334}

Address Compression & Abbreviation Rules:

  1. Omission of Leading Zeros:
    • Within any 16-bit group, leading zeros can be dropped:
    • 0DB8 →\rightarrow DB8, 0000 →\rightarrow 0, 0370 →\rightarrow 370.
2001:DB8:85A3:0:0:8A2E:370:7334\text{2001:DB8:85A3:0:0:8A2E:370:7334}
  1. Double Colon (::) Zero Compression:
    • A contiguous sequence of one or more groups of all zeros can be replaced with a single double colon (::).
    • Strict Rule: The double colon can be used at most ONCE per address to avoid ambiguity:
2001:DB8:85A3::8A2E:370:7334\text{2001:DB8:85A3::8A2E:370:7334}

3. IPv6 Address Classifications

IPv6 categorizes addresses into three primary scopes:

MermaidDiagram
Rendering diagram…

IMPORTANT: There is NO Broadcast Address in IPv6! Broadcast functionality is entirely replaced by targeted, efficient Multicast Groups.

A. Unicast Addresses (One-to-One):

  1. Global Unicast Address (GUA - 2000::/3):
    • Publicly routable on the global Internet (equivalent to public IPv4).
    • Structure: 48-bit Global Routing Prefix + 16-bit Subnet ID + 64-bit Interface ID.
  2. Link-Local Address (fe80::/10):
    • Mandatory on every IPv6-enabled interface; automatically generated using the interface MAC address (EUI-64) or random generation.
    • Routable only within the local physical subnet (routers never forward link-local packets across subnets).
  3. Unique Local Address (ULA - fc00::/7 or fd00::/8):
    • Routable within private enterprise intranets; unroutable on the public Internet (equivalent to RFC 1918 private IPv4).
  4. Loopback Address: ::1 or ::1/128 (equivalent to 127.0.0.1 in IPv4).
  5. Unspecified Address: :: or ::/128 (used when a host does not yet know its IP during bootup).

B. Multicast Addresses (One-to-Many - ff00::/8):

  • Delivers a packet to all interfaces that belong to the multicast group.
  • Examples:
    • ff02::1: All-Nodes multicast (replaces local subnet broadcast).
    • ff02::2: All-Routers multicast on the local link.

C. Anycast Addresses (One-to-Nearest):

  • An Anycast address is assigned to multiple interfaces across different geographical locations.
  • Routers deliver the packet to the physically closest / lowest-metric interface belonging to the anycast address (used for global DNS and CDN root servers).

4. IPv6 Header Format

The base IPv6 header is streamlined to a fixed 40-byte size to eliminate variable options processing at intermediate routers:

SVGVector Architecture Diagram (SVG)
Version Traffic Class Flow Label (20 bits) Payload Length Next Header Hop Limit Source IPv6 Address (128 bits) Destination IPv6 Address (128 bits)

Key Field Functions:

  1. Flow Label (20 bits): Enables real-time Quality of Service (QoS) by tagging packets belonging to the same packet flow so routers handle them without deep inspection.
  2. Payload Length (16 bits): Length of data payload and extension headers following the 40-byte base header.
  3. Next Header (8 bits): Specifies the protocol following the IPv6 header (replaces IPv4 Protocol field; links to Extension Headers like Hop-by-Hop, Routing, Fragment, ESP/AH).
  4. Hop Limit (8 bits): Counter decremented by 1 at each router hop (replaces IPv4 Time-to-Live - TTL). When it hits 0, the packet is discarded and an ICMPv6 Time Exceeded message is returned.
  5. No Header Checksum!: Removed entirely to eliminate per-hop checksum recalculation latency at high router line speeds (relies on L2 CRC and L4 TCP/UDP checksums).

5. IPv4 to IPv6 Transition Strategies

Because the entire global Internet cannot switch overnight, three primary migration mechanisms are used:

  1. Dual Stack: Routers and hosts run both IPv4 and IPv6 protocol stacks concurrently.
  2. Tunneling (6to4, Teredo, GRE): IPv6 packets are encapsulated inside IPv4 packet payloads to traverse legacy IPv4-only Internet backbones.
  3. Translation (NAT64 / DNS64): Protocol converters translate IPv6 headers directly into IPv4 headers, allowing IPv6-only clients to communicate with IPv4-only web servers.

Frequently Asked Questions

QCompress the following IPv6 address using standard abbreviation rules.
  • FE80:0000:0000:0000:0202:B3FF:FE1E:8329
  • Omit leading zeros: FE80:0:0:0:202:B3FF:FE1E:8329
  • Double colon compression: FE80::202:B3FF:FE1E:8329
QWhy does the base IPv6 header not include a checksum?

Eliminating the checksum removes the computationally expensive requirement for every intermediate router to recalculate the header checksum each time the Hop Limit is decremented, drastically improving router forwarding throughput.

QWhat replaced Broadcast in IPv6?

Multicast addressing (specifically the All-Nodes multicast address ff02::1).

QWhat is an Anycast address?

An address assigned to a group of interfaces (usually on different hosts). A packet sent to an anycast address is routed to the single nearest member interface according to routing metrics.

QName the IPv4 to IPv6 transition mechanisms.

Dual stack (run both protocols), tunneling (carry IPv6 packets inside IPv4, e.g., 6to4, Teredo) and translation (NAT64/DNS64, converting between IPv6 and IPv4 headers).

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

← All Computer Networks modules