Phones, laptops, smart TVs, cloud servers, sensors, vehicles and thousands of other devices all need network addresses.
IPv6 was designed to provide a much larger address space and a cleaner Internet Protocol header while keeping the basic idea of packet delivery across networks.
IPv6 means Internet Protocol version 6. It uses 128-bit addresses, normally written as eight hexadecimal groups separated by colons.
IPv6 has a fixed 40-byte base header containing Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source Address and Destination Address.
Compared with IPv4, IPv6 provides a much larger address space, a simpler fixed base header, extension headers, no broadcast addressing and different fragmentation behaviour.
What Is IPv6?
IPv6 stands for:
It is a Network Layer protocol used for logical addressing and packet delivery across interconnected networks.
IPv6 performs the same basic Internet Layer job that IPv4 performs, but it uses a much larger address space and a redesigned header.
Why Was IPv6 Needed?
IPv4 addresses are 32 bits long.
That gives:
That sounds huge, but the Internet became far larger than early designers expected.
IPv6 uses:
This is an enormously larger address space.
IPv6 Address Format
An IPv6 address contains:
The address is normally written as eight groups of hexadecimal digits.
Each group contains 16 bits.
Hexadecimal in IPv6
IPv6 uses hexadecimal because writing 128 binary bits would be very difficult to read.
Hexadecimal uses:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
4 hexadecimal digits = 16 bits = 1 hextet
What Is a Hextet?
One group of four hexadecimal digits in an IPv6 address is commonly called a hextet.
Example:
Each group can represent 16 bits.
IPv6 Address Shortening Rules
IPv6 addresses can look very long.
Two major rules make them easier to write:
- Remove leading zeros inside a hextet.
- Replace one consecutive run of all-zero hextets with ::.
Rule 1: Remove Leading Zeros
Consider:
Rule 2: Double Colon Compression
A consecutive sequence of zero hextets can be replaced by:
How to Expand a Short IPv6 Address
Example:
Count the visible hextets:
Expanded address:
IPv6 Prefix Length
IPv6 uses CIDR-style prefix notation just like modern IPv4 routing.
Example:
The /64 means the first 64 bits form the network prefix.
Main IPv6 Address Types
IPv6 does not use broadcast addressing in the same way IPv4 does.
Important IPv6 address types include:
No traditional broadcast address.
Global Unicast Address
Global unicast addresses are used for globally routable IPv6 communication.
A commonly discussed global unicast allocation range begins within:
Example documentation prefix:
Link-Local IPv6 Address
Link-local addresses are used for communication on the local network link.
They use:
IPv6 interfaces normally have link-local addressing that can be used for operations such as Neighbor Discovery.
Unique Local IPv6 Addresses
Unique Local Addresses are intended for local/private-style IPv6 communication rather than global Internet routing.
Their address block is:
IPv6 Multicast Address
IPv6 multicast addresses begin with:
Multicast replaces several functions for which IPv4 networks might previously have used broadcast.
IPv6 Anycast
An anycast address may be assigned to more than one interface.
Routing delivers the packet to one member of the anycast set, normally based on routing topology.
Important Special IPv6 Addresses
::
Unspecified Address
Represents the absence of a specified IPv6 address in certain contexts.
::1
Loopback Address
IPv6 equivalent concept of local loopback testing.
fe80::/10
Link-Local
Local-link communication.
fc00::/7
Unique Local
Local/private-style addressing.
ff00::/8
Multicast
Multicast address space.
2001:db8::/32
Documentation
Used in examples and documentation.
IPv6 Header Format
The IPv6 base header has a fixed size:
Unlike IPv4, optional features are usually moved into separate extension headers rather than making the base header variable in size.
1. Version Field
The Version field is 4 bits long.
For IPv6:
2. Traffic Class
Traffic Class is an 8-bit field.
It supports packet classification and congestion-related treatment.
Its role is conceptually similar to modern DSCP and ECN use in IPv4.
3. Flow Label
The Flow Label field contains:
It can identify packets belonging to the same flow so network devices can recognise related traffic.
4. Payload Length
Payload Length is 16 bits.
It normally gives the number of bytes after the fixed 40-byte IPv6 base header.
5. Next Header
The Next Header field is 8 bits long.
It tells what comes immediately after the IPv6 base header.
That may be:
- An IPv6 extension header
- TCP
- UDP
- ICMPv6
6. Hop Limit
Hop Limit performs the job similar to IPv4 TTL.
Each router decreases it.
Hop Limit = 64
Hop Limit = 63
Hop Limit = 62
When Hop Limit reaches zero, the packet is discarded.
IPv6: Hop Limit
7. Source and Destination IPv6 Addresses
Both fields contain:
The source field identifies the packet's source address, while the destination field identifies where the packet should be delivered.
IPv6 Extension Headers
One of the major design changes in IPv6 is that optional information does not have to make the base header variable in the same way as IPv4 options.
IPv6 can place extra information into separate extension headers.
40 Bytes
Optional
Payload
Examples of IPv6 Extension Headers
- Hop-by-Hop Options
- Routing Header
- Fragment Header
- Destination Options
- Authentication Header
Extra Information = Extension Headers
Why Does IPv6 Have No Header Checksum?
IPv4 contains a Header Checksum.
IPv6 removes this field from the base header.
Removing it reduces per-hop header-processing work because routers do not need to recalculate an IPv6 header checksum every time a hop-related field changes.
IPv6 base header → No header checksum field.
IPv6 Fragmentation
IPv6 handles fragmentation differently from IPv4.
IPv6 routers do not fragment transit packets.
If fragmentation is required, the source can use the IPv6 Fragment extension header.
Packet must fit the path
IPv6 router does not fragment.
IPv6 source handles fragmentation when needed.
IPv6 Neighbor Discovery
IPv6 uses Neighbor Discovery Protocol functions through ICMPv6.
Neighbor Discovery helps with tasks such as:
- Discovering neighboring nodes
- Resolving local-link addresses
- Finding routers
- Learning network prefixes
- Detecting certain reachability information
Needs Neighbor Information
SLAAC — Stateless Address Autoconfiguration
SLAAC allows an IPv6 host to configure addressing information using information advertised by IPv6 routers.
DHCPv6
DHCPv6 is the IPv6 version of Dynamic Host Configuration Protocol.
It can provide IPv6 hosts with configuration information and, depending on the network design, addresses or other parameters.
IPv6 networks can use SLAAC, DHCPv6 or combinations of configuration mechanisms depending on requirements.
Main Features of IPv6
IPv4 vs IPv6 Difference
| Point | IPv4 | IPv6 |
|---|---|---|
| Address Size | 32 bits | 128 bits |
| Address Writing | Dotted decimal | Colon-separated hexadecimal |
| Example | 192.168.1.10 | 2001:db8::10 |
| Base Header Size | Minimum 20 bytes, variable with options | Fixed 40 bytes |
| Header Checksum | Present | Not present in base header |
| TTL Equivalent | TTL | Hop Limit |
| Protocol Field Equivalent | Protocol | Next Header |
| Router Fragmentation | Can occur when required and allowed | Transit routers do not fragment |
| Address Resolution | ARP in IPv4 local networks | Neighbor Discovery using ICMPv6 |
| Broadcast | Supported | No traditional broadcast addressing |
| Multicast | Supported | Supported and used extensively |
| Anycast | Can be implemented through routing practices | Defined as part of IPv6 addressing architecture |
| Autoconfiguration | Commonly uses DHCP or manual configuration | Supports SLAAC and DHCPv6 |
| Options | Can exist inside IPv4 header | Mostly handled through extension headers |
| Address Exhaustion Pressure | Severe due to 32-bit space | Massively expanded 128-bit space |
IPv6 = 128 bit + hexadecimal + Hop Limit + no base-header checksum
IPv4 and IPv6 Coexistence
The Internet cannot replace every IPv4 system at one moment.
Therefore IPv4 and IPv6 can coexist using transition approaches.
Solved IPv6 Examples
Example 1: Number of Bits
How many bits are present in:
IPv6 always contains:
Example 2: Expand 2001:db8::25
Expanded:
Example 3: Compress an IPv6 Address
Given:
Remove leading zeros:
Compress the zero run:
Example 4: /64 Address Count
A /64 prefix leaves:
Number of possible values in those remaining 64 bits:
Example 5: /48 to /64 Subnets
Suppose an organisation has:
If /64 subnets are created:
Example 6: Hop Limit
An IPv6 packet begins with:
Example 7: IPv6 Packet Size
Suppose:
Ignoring special jumbogram cases:
IPv6 Remember Tricks
IPv6 uses colons.
Use :: for one zero sequence.
IPv6 = Hop Limit
IPv6 = Neighbor Discovery
IPv6 router does not.
No traditional broadcast.
Common IPv6 Exam Mistakes
Wrong. IPv6 addresses are 128 bits.
Wrong. That is IPv4 notation. IPv6 normally uses hexadecimal groups separated by colons.
Wrong. One hextet contains 16 bits.
Wrong. Double-colon compression normally appears only once in one textual address.
Wrong. That describes IPv4 header length. The IPv6 base header is fixed at 40 bytes.
Wrong. The IPv6 base header does not contain a header checksum field.
Wrong. IPv6 transit routers do not perform fragmentation.
Wrong. IPv6 uses Neighbor Discovery functions through ICMPv6.
IPv6 does not use traditional broadcast addressing.
Wrong. Routers decrease Hop Limit.
Wrong. It is reserved for documentation and examples.
IPv6's huge address space reduces the address-conservation pressure that drove widespread IPv4 NAT, but that does not mean translation mechanisms or policy-based address translation can never exist.
40 Important IPv6 Questions With Answers
20 IPv6 MCQs With Answers
A. 32 bits
B. 64 bits
C. 128 bits
D. 256 bits
A. 4 hextets
B. 6 hextets
C. 8 hextets
D. 16 hextets
A. 8 bits
B. 16 bits
C. 32 bits
D. 64 bits
A. Decimal only
B. Hexadecimal
C. Octal
D. ASCII names
A. 127.0.0.1
B. ::1
C. ::
D. ff00::1
A. ::
B. ::1
C. fe80::1
D. ff00::
A. fe80::/10
B. 192.168.0.0/16
C. 10.0.0.0/8
D. 127.0.0.0/8
A. ff00::/8
B. fc00::/7
C. fe80::/10
D. 2001:db8::/32
A. 20 bytes
B. 32 bytes
C. 40 bytes
D. 60 bytes
A. 4
B. 5
C. 6
D. 8
A. 4 bits
B. 8 bits
C. 16 bits
D. 20 bits
A. Flow Label
B. Hop Limit
C. Traffic Class
D. Next Header
A. Next Header
B. Flow Label
C. Source Address
D. Version
A. Header checksum
B. No header checksum field
C. IPv4 IHL
D. IPv4 Fragment Offset
A. Fragment every large packet
B. Do not fragment transit packets
C. Use ARP to fragment packets
D. Always remove extension headers
A. ICMPv6
B. FTP
C. SMTP
D. HTTP
A. Stateless Address Autoconfiguration
B. Secure Link Address Allocation Control
C. Static Local Address Access Control
D. System Layer Automatic Address Code
A. Yes
B. No
A. Documentation and examples
B. Loopback only
C. Link-local only
D. Multicast
A. 32 bits
B. 48 bits
C. 64 bits
D. 128 bits
Frequently Asked Questions
What is IPv6?
IPv6 is Internet Protocol version 6, a Network Layer protocol using 128-bit addresses for communication across IP networks.
How many bits are in an IPv6 address?
An IPv6 address contains 128 bits.
How many hextets are in a full IPv6 address?
A full IPv6 address contains eight 16-bit hexadecimal groups called hextets.
What does :: mean in IPv6?
It compresses one consecutive sequence of all-zero hextets in an IPv6 address.
What is the size of the IPv6 header?
The fixed IPv6 base header is 40 bytes.
Does IPv6 use broadcast?
IPv6 does not use traditional broadcast addressing. It uses multicast and other addressing mechanisms instead.
What is the IPv6 loopback address?
The IPv6 loopback address is ::1.
What is a link-local IPv6 address?
A link-local IPv6 address is used for communication on the local network link and uses the fe80::/10 block.
Can IPv6 routers fragment packets?
IPv6 transit routers do not fragment packets. Fragmentation, when required, is performed by the source.
What replaces ARP in IPv6?
Neighbor Discovery functions using ICMPv6 provide address-resolution and neighbor-discovery functions in IPv6.
What is SLAAC?
SLAAC is Stateless Address Autoconfiguration, which allows IPv6 hosts to configure address information using router advertisements.
What is the main difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses and introduces a redesigned fixed-size base header and other architectural changes.
