IPv6 (Internet Protocol Version 6)
1. Introduction to IPv6
- IPv6 stands for Internet Protocol Version 6. It is a Network Layer (Layer 3) protocol used to provide addressing and routing for devices connected to an IP network.
- IPv6 was developed mainly to overcome the limited address space of IPv4 and to support the continued growth of the Internet.
Basic Diagram
IPv6 NETWORK
┌──────────────┐
│ Computer │
│ 2001:db8::10 │
└──────┬───────┘
│
│ IPv6 Packet
▼
┌──────────────┐
│ Router │
│ IPv6 Router │
└──────┬───────┘
│
│
▼
┌──────────────┐
│ Server │
│ 2001:db8::20 │
└──────────────┘- The router uses the destination IPv6 address to forward the packet toward the destination network.
2. IPv6 Address
- An IPv6 address is 128 bits long.
- It is normally represented as eight groups of 16 bits, written in hexadecimal and separated by colons (
:).
IPv6 Address Structure
128 Bits
┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐
│ 16b │ 16b │ 16b │ 16b │ 16b │ 16b │ 16b │ 16b │
└──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
2001 : 0db8 : 0000 : 0000 : 0000 : ff00 : 0042 : 8329Example
2001:0db8:0000:0000:0000:ff00:0042:8329Each group contains 4 hexadecimal digits, representing 16 bits.
3. IPv6 Address Shortening
IPv6 provides rules for shortening addresses.
- Rule 1: Leading zeros can be removed
0db8 → db8
0042 → 42Therefore:
2001:0db8:0000:0000:0000:ff00:0042:8329can become:
2001:db8:0:0:0:ff00:42:8329- Rule 2: Consecutive zero groups can be replaced by
::
::2001:db8:0:0:0:ff00:42:8329can be written as:
2001:db8::ff00:42:8329Important: :: should normally be used only once in an IPv6 address.
4. IPv6 Address Structure
An IPv6 address can be logically divided into:
┌───────────────────────────────┬──────────────────────┐
│ Network Prefix │ Interface ID │
└───────────────────────────────┴──────────────────────┘
64 bits 64 bitsA common IPv6 subnet uses a /64 prefix.
For example:
2001:db8:1234:5678:abcd:ef01:2345:6789
└───────────────┬───────────────┘
Network Prefix
64 bits
└───────────────┬───────────────┘
Interface ID
64 bits5. Types of IPv6 Addresses
IPv6 has three main address types.
A. Unicast
- A Unicast address identifies a single interface.
Communication is:
One → One
PC ─────────────────► Server
UnicastB. Multicast
- A Multicast address identifies a group of interfaces.
Communication is:
┌──► PC 1
│
Server ──────────┼──► PC 2
│
└──► PC 3
Multicast- One sender can send data to multiple receivers that belong to the multicast group.
C. Anycast
- An Anycast address can be assigned to multiple interfaces.
- Routing delivers the packet to one appropriate destination, typically the nearest according to the routing topology.
┌──► Server 1
│
Client ──────────┼──► Server 2
│
└──► Server 3
Anycast6. IPv6 Does Not Use Broadcast
- One important difference from IPv4 is that IPv6 does not use broadcast.
Instead, IPv6 uses mechanisms such as:
- Multicast
- Anycast
for communication patterns that do not require ordinary unicast.
7. IPv6 Packet Format
An IPv6 packet consists of:
┌─────────────────────────────────────┐
│ IPv6 Base Header │
│ 40 Bytes │
├─────────────────────────────────────┤
│ Extension Header(s) │
│ Optional │
├─────────────────────────────────────┤
│ Payload │
│ Data │
└─────────────────────────────────────┘The IPv6 base header is fixed at 40 bytes.
8. IPv6 Header
- The important fields of the IPv6 header are:
┌──────────────────────────────────────────────┐
│ Version │ Traffic Class │ │
├─────────┴────────────────────────────────────┤
│ Flow Label │
├──────────────────────┬───────────────────────┤
│ Payload Length │ Next Header │
├──────────────────────┴───────────────────────┤
│ Hop Limit │
├──────────────────────────────────────────────┤
│ Source Address (128 bits) │
├──────────────────────────────────────────────┤
│ Destination Address (128 bits) │
└──────────────────────────────────────────────┘Important Fields
- Version: Indicates the IP version. For IPv6, the value is 6.
- Traffic Class: Used for traffic classification and handling.
- Flow Label: Helps identify packets belonging to a particular flow.
- Payload Length: Specifies the length of the payload following the IPv6 base header.
- Next Header: Identifies the next header, such as an extension header or transport protocol.
- Hop Limit: Limits the number of routers a packet can pass through.
- Source Address: IPv6 address of the sender.
- Destination Address: IPv6 address of the receiver.
9. IPv6 Communication
SOURCE DESTINATION
┌──────────────┐ ┌──────────────┐
│ PC │ │ Server │
│ 2001:db8::10 │ │ 2001:db8::20 │
└──────┬───────┘ └──────▲───────┘
│ │
│ IPv6 Packet │
▼ │
┌──────────────┐ ┌──────┴───────┐
│ Router 1 │──────► Router 2 ─►│ Destination │
└──────────────┘ └──────────────┘- The routers examine the destination IPv6 address and forward the packet toward the appropriate network.
10. IPv6 Auto-Configuration
- IPv6 supports SLAAC (Stateless Address Autoconfiguration).
- SLAAC allows a host to automatically configure an IPv6 address in suitable network environments.
Router
│
│ Router Advertisement
▼
┌────────────┐
│ Computer │
└─────┬──────┘
│
▼
IPv6 Address
Configured- IPv6 can also use DHCPv6 when required.
11. Neighbor Discovery Protocol (NDP)
- IPv6 uses Neighbor Discovery Protocol (NDP) for discovering and interacting with neighboring nodes on the local link.
- NDP is based on ICMPv6.
It can help with:
- Neighbor discovery
- Router discovery
- Address resolution
- Neighbor reachability detection
- Address configuration support
In IPv4, ARP is commonly used for address resolution. IPv6 uses NDP instead of ARP.
12. Advantages of IPv6
1. Huge Address Space
- IPv6 uses 128-bit addresses.
- The theoretical address space is of 2¹²⁸
- This provides an enormous number of possible addresses.
2. Simplified Base Header
- The IPv6 base header has a fixed size of 40 bytes.
3. No Broadcast
- IPv6 eliminates broadcast and uses multicast/anycast where appropriate.
4. Auto-Configuration
- IPv6 supports automatic address configuration through mechanisms such as SLAAC.
5. Efficient Multicast Support
- Multicast is an important part of IPv6 communication.
6. Suitable for Large Networks
- The huge address space makes IPv6 suitable for large-scale networks, including modern Internet and IoT deployments.
13. Why Was IPv6 Developed?
The major limitation of IPv4 is its 32-bit address space.
IPv4
│
▼
32 bits
│
▼
Limited Address Space
│
▼
More Devices
│
▼
IPv6
│
▼
128 bits
│
▼
Huge Address SpaceAs the number of Internet-connected devices increased, the availability of IPv4 addresses became a major issue. IPv6 provides a vastly larger address space.
14. Example of IPv6 in a College Network
Suppose a college has several computers and a server:
COLLEGE IPv6 NETWORK
┌─────────────────┐
│ Computer 1 │
│ 2001:db8:1::10 │
└────────┬────────┘
│
┌──────▼──────┐
│ Switch │
└──────┬──────┘
│
┌──────▼──────┐
│ Router │
│ 2001:db8:1::1│
└──────┬──────┘
│
┌──────▼──────┐
│ Server │
│ 2001:db8:1::20│
└─────────────┘The computer can send an IPv6 packet to the server using the server's IPv6 address as the destination address.
15. IPv6 vs IPv4 — Important Comparison
16. Quick Revision Diagram
IPv6
│
┌───────────┴───────────┐
│ │
128-bit Address Layer 3
│ │
Hexadecimal Format Routing
│
┌───────┼────────┐
│ │ │
Unicast Multicast Anycast
│
└─────────────────────┐
│
No Broadcast
│
┌──────────┴──────────┐
│ │
SLAAC NDP
Auto Configuration Neighbor DiscoveryExam Definition
- IPv6 (Internet Protocol Version 6) is a 128-bit Network Layer protocol that provides addressing and routing for IP networks.
- It was developed primarily to provide a vastly larger address space than IPv4 and includes features such as multicast, SLAAC, and Neighbor Discovery Protocol (NDP).
Key point to remember:
IPv4 = 32-bit address
IPv6 = 128-bit address
Advantages of IPv6
- Realtime Data Transmission: There is very little latency in the transmission of data. For instance, live broadcasting of sporting events with a five to six second lag.
- IPv6 authentication verifies that data is authentic and hasn't been tampered with. For instance, utilizing hash values to verify messages.
- IPv6 Encryption: Provides inherent security by encrypting communications at the network layer even when the application layer does not.
- Faster Router Processing: Compared to IPv4's 20–60 byte variable header, IPv6's fixed 40-byte header enables routers to process packets more quickly.
Disadvantages of IPv6
- Transition Period: It will take a while to fully switch to IPv6 because IPv4 is still widely used.
- Communication Barrier: Direct communication between IPv4 and IPv6 machines is not possible.
- No Backward Compatibility: Because IPv4 systems do not support IPv6, IPv6 cannot operate on computers that support IPv4.
- Conversion Challenges: The switch from IPv4 to IPv6 is time-consuming due to IPv6's inability to uniquely identify every device on the network.
- Protocol Isolation: Direct communication between IPv4 and IPv6 is impossible, making cross-protocol communication impossible.

