Post

IPv6 Addressing

IPv6 Addressing

🌐 IPv6 Deep Dive: Addressing the Future of the Internet

IPv6 (Internet Protocol version 6) is the modern backbone of the internet’s addressing system. This comprehensive guide explains every IPv6 concept—perfect for learners, interview preparation, and network engineers revising IPv6 fundamentals.

1️⃣ Why We Need IPv6

The evolution to IPv6 arose from the limitations of IPv4.

⚙️ IPv4 Limitations

  • IPv4 Address Exhaustion:
    • IPv4 uses a 32-bit address, supporting roughly 4.3 billion unique addresses (2^32). With the exponential growth of internet-connected devices, this pool is now insufficient.
  • Reserved Ranges:
    • Not all IPv4 addresses are usable—Class D is for multicast and Class E for experimental use.
  • Need for a Scalable Solution:
    • IPv6 offers 128-bit addressing, allowing 2^128 (~340 undecillion) unique addresses—effectively infinite for modern and future networking needs.

2️⃣ IPv6 Address Structure and Notation

IPv6 addresses are written in hexadecimal and structured differently from IPv4.

🧩 Address Format

  • Structure: 8 groups (hextets) of 16 bits, separated by colons :.

  • Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

  • Prefix Length: Always denoted with slash notation (e.g., /64).

  • Network & Host Portions:

    • First 64 bits → Network prefix
    • Last 64 bits → Interface Identifier (host portion)

💡 Example: Address 2001:db8:1:2:a:b:c:d/64 → Network prefix is 2001:db8:1:2::/64

✂️ Abbreviation Rules

  1. Remove Leading Zeros
    • 0db8 → db8, 0000 → 0
  2. Compress Consecutive Zeros
    • Replace a single sequence of consecutive zero hextets with ::
    • (can be used only once per address)

Example: 2001:0db8:0000:0000:0000:0000:0000:1 → 2001:db8::1

🧭 RFC 5952 Guidelines

  • Remove all leading zeros.
  • Use lowercase a–f.
  • Compress the longest sequence of zeros.

3️⃣ IPv6 Header: Simplicity and Efficiency

IPv6 introduces a fixed-length header (40 bytes), optimizing packet processing.

🧱 Key Header Fields

FieldDescription
VersionAlways 6
Traffic ClassQoS (similar to IPv4 Type of Service)
Payload LengthSize of encapsulated data
Next HeaderIdentifies upper-layer protocol (TCP=6, UDP=17, ICMPv6=58)
Hop LimitReplaces TTL; decrements at each router
Source & Destination128-bit IPv6 addresses

4️⃣ Understanding Hexadecimal Conversion

IPv6 addresses use hexadecimal; understanding conversions is crucial.

DecimalBinaryHex
101010A
151111F

🔄 Conversions

Binary → Hexadecimal:

  1. Split into 4-bit groups

  2. Convert each to decimal

  3. Then to hexadecimal

Hexadecimal → Binary:

  1. Split each hex digit
  2. Convert to 4-bit binary equivalent

5️⃣ IPv6 Address Types

IPv6 defines five primary address types—each with distinct purposes.

TypePurposeRange / ExampleIPv4 Equivalent
Global Unicast (GUA)Internet-routable unique addresses2000::/3Public IPv4
Unique Local (ULA)Private internal networksfd00::/8Private IPv4
Link-Local (LLA)Communication on local link onlyfe80::/64APIPA (169.254.x.x)
MulticastOne-to-many communicationff00::/8IPv4 Multicast
AnycastOne-to-one-of-many (closest host responds)No special rangeNone (new in IPv6)

⚡ Reserved Special Addresses

  • Unspecified: :: → Used when a device doesn’t know its address or as default route (::/0)
  • Loopback: ::1 → Used for local testing (like 127.0.0.1 in IPv4)

6️⃣ IPv6 Configuration and EUI-64

IPv6 configuration syntax resembles IPv4, replacing ip with ipv6.

🧑‍💻 Basic Cisco Commands

1
2
3
Router(config)# ipv6 unicast-routing        # Enable IPv6 routing
Router(config-if)# ipv6 address 2001:db8::1/64
Router(config-if)# ipv6 address 2001:db8::2/64 eui-64

🧮 Modified EUI-64 Addressing

Generates the Interface ID automatically from the device’s MAC address:

  1. Split MAC into halves
  2. Insert fffe in the middle
  3. Flip the 7th bit (U/L bit)

Example: MAC: 00:1A:2B:3C:4D:5E → Interface ID: 021a:2bff:fe3c:4d5e

7️⃣ IPv6 Routing and Neighbor Discovery Protocol (NDP)

IPv6 replaces ARP with NDP (Neighbor Discovery Protocol), part of ICMPv6.

🔍 NDP Functions

FunctionDescriptionICMPv6 Type
Neighbor Solicitation (NS)ARP Request equivalent135
Neighbor Advertisement (NA)ARP Reply equivalent136
Router Solicitation (RS)Hosts request router info133
Router Advertisement (RA)Routers advertise prefixes134

📡 Solicited-Node Multicast

  • Used for ARP-like queries
  • Format: ff02::1:ffXX:XXXX (last 24 bits of unicast address)

🧠 SLAAC (Stateless Address Autoconfiguration)

Allows automatic self-addressing:

  1. Host receives prefix from RA
  2. Combines prefix with EUI-64 or random ID

🧾 Duplicate Address Detection (DAD)

Ensures the address is unique before use by sending NS to its own solicited-node multicast address.

8️⃣ IPv6 Routing Table Overview

IPv6 routers follow the Longest Prefix Match (LPM) rule.

📘 Route Types

CodeTypeDescription
CConnectedNetwork directly connected
LLocalHost-specific (/128)
SStaticManually configured
DDynamicLearned via routing protocol

9️⃣ IPv6 Static Routing

⚙️ Command Syntax

1
Router(config)# ipv6 route <destination-prefix> <next-hop / exit-interface>
TypeDescriptionExample
RecursiveNext-hop onlyipv6 route 2001:db8:2::/64 2001:db8:1::2
Directly ConnectedExit interface onlyipv6 route 2001:db8:2::/64 g0/0
Fully SpecifiedBoth interface & next-hopipv6 route 2001:db8:2::/64 g0/0 fe80::2
Default RouteCatch-all routeipv6 route ::/0 fe80::2 g0/0
Floating Static RouteBackup route (higher AD)ipv6 route 2001:db8:2::/64 2001:db8:1::2 2

🧭 Note: When using Link-Local Addresses (LLA) as next hops, the exit interface must be specified.

🧩 Quick IPv6 Interview Revision Sheet

ConceptQuick Definition
IPv6 Length128 bits
Header SizeFixed 40 bytes
BroadcastNo broadcast in IPv6 (uses multicast instead)
Address Auto-ConfigSLAAC
Replacement for ARPNDP (ICMPv6)
Loopback::1
Default Route::/0
Private Rangefd00::/8
Link-Local Rangefe80::/64
Global Range2000::/3

📚 Summary

IPv6 is not just an upgrade—it’s the foundation of the modern Internet, ensuring scalability, efficiency, and robust address management. From addressing structure and compression to routing and NDP, understanding IPv6 is a must-have skill for any network engineer or SOC analyst.

🙌 Connect With Me

GitHub LinkedIn YouTube Gmail

This post is licensed under CC BY 4.0 by the author.