Unit 4: The Network Layer — Data Plane

Tutorial 9: IPv6 Architecture and Operations

Course: COMP347 Computer Networks (Revision 10)  |  Textbook: Kurose & Ross, Computer Networking: A Top‑Down Approach (9th ed.)

Table of Contents

1. Learning Objectives

Upon completion of this tutorial, students should be able to:

2. Overview

IPv6 (Internet Protocol version 6) was developed to address the impending exhaustion of IPv4 addresses and to improve upon the design of IPv4. With a 128‑bit address space, IPv6 provides approximately 3.4×10^38 addresses, enabling scalable growth. Beyond addressing, IPv6 introduces a simplified fixed header, removes the checksum, eliminates router fragmentation, and includes built‑in support for security (IPsec) and mobility. IPv6 also replaces ARP with the Neighbor Discovery Protocol (NDP) and provides stateless address autoconfiguration (SLAAC).

This tutorial covers the IPv6 architecture, addressing, header format, extension headers, autoconfiguration, NDP, fragmentation, and transition mechanisms. Advanced topics such as mobile IPv6, segment routing, and operational challenges are also discussed. Understanding IPv6 is critical for modern networking, as deployment continues to grow globally.

3. Detailed Technical and Theoretical Content

3.1 Motivation for IPv6: Address Exhaustion and Beyond

The primary driver for IPv6 was the depletion of IPv4 addresses. The Internet Assigned Numbers Authority (IANA) allocated the last IPv4 address blocks to Regional Internet Registries (RIRs) in 2011. However, IPv6 also addresses other limitations:

3.2 IPv6 Addressing Architecture

IPv6 addresses are 128 bits long, written as eight groups of four hexadecimal digits separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). The address space is divided into various types and scopes.

Key concepts:

3.3 IPv6 Address Types: Unicast, Multicast, Anycast

3.4 IPv6 Datagram Format and Fixed Header

The IPv6 header is 40 bytes fixed and contains the following fields:

FieldSize (bits)Description
Version46 for IPv6.
Traffic Class8Similar to IPv4 DSCP/ECN.
Flow Label20Used for QoS and flow identification.
Payload Length16Length of the payload (excluding header). Max 65,535 bytes.
Next Header8Identifies the type of the next header (e.g., extension header or transport protocol).
Hop Limit8Similar to TTL in IPv4.
Source Address128IPv6 address of the sender.
Destination Address128IPv6 address of the receiver.

Notable differences from IPv4: no checksum, no fragmentation fields (handled by extension headers), fixed header length.

3.5 IPv6 Extension Headers

IPv6 uses extension headers to support optional features. The Next Header field points to the next header, forming a chain. Common extension headers:

3.6 IPv6 Address Representation and Notation

IPv6 addresses can be abbreviated:

Examples: 2001:db8::1, ::1 (loopback), fe80::/10 (link‑local).

3.7 Address Allocation Mechanisms

IANA allocates large blocks to RIRs, which allocate to ISPs, which assign prefixes to customers. Common prefix sizes: /32 for ISPs, /48 for large organizations, /56 for small offices, /64 for subnets. DHCPv6‑PD (Prefix Delegation) can be used for automated assignment.

3.8 Stateless Address Autoconfiguration (SLAAC)

SLAAC allows a host to generate its own IPv6 address without a DHCP server. The host sends a Router Solicitation (RS) to the all‑routers multicast address. Routers reply with Router Advertisement (RA) containing the network prefix (usually /64). The host combines the prefix with its interface identifier (derived from MAC using EUI‑64, or randomly generated to enhance privacy) to form a full address. Duplicate Address Detection (DAD) ensures uniqueness.

SLAAC can also provide additional information via RA options (e.g., DNS servers via RDNSS).

3.9 Neighbor Discovery Protocol (NDP)

NDP is a set of ICMPv6 messages that replaces ARP, handles router discovery, and performs parameter discovery. Main NDP messages:

NDP provides link‑layer address resolution, neighbor unreachability detection, and duplicate address detection.

3.10 Fragmentation in IPv6: End‑to‑End Model

Unlike IPv4, IPv6 routers do not fragment packets. Only the source host can fragment by using the Fragment extension header. This reduces router processing and simplifies forwarding. Path MTU Discovery (PMTUD) is essential; the source must discover the path MTU and send packets of appropriate size. If a router receives a packet larger than its MTU, it discards it and sends an ICMPv6 Packet Too Big (Type 2) message back to the source.

3.11 Transition Mechanisms

IPv6 deployment requires coexistence with IPv4. Main transition mechanisms:

3.12 IPv6 Security Considerations

IPv6 introduces new security challenges:

Best practices: use RA guard, implement SEND, filter unnecessary extension headers, and deploy stateful firewalls.

3.13 Advanced Topics: Mobile IPv6, Segment Routing, and Operational Challenges

4. Quiz Section

Multiple‑Choice Questions

Q1. What is the size of an IPv6 address?

Show Answer

C) 128 bits

Q2. Which field in the IPv6 header is used for QoS and flow identification?

Show Answer

B) Flow Label (20 bits)

Q3. In IPv6, the Hop Limit field is analogous to what in IPv4?

Show Answer

A) TTL

Q4. Which IPv6 address type is used for one‑to‑many communication?

Show Answer

B) Multicast

Q5. Which IPv6 prefix is used for Global Unicast addresses?

Show Answer

A) 2000::/3

Q6. In IPv6, which field is NOT present in the fixed header?

Show Answer

B) Checksum

Q7. What is the typical subnet size in IPv6?

Show Answer

C) /64

Q8. Which extension header is used for IPv6 fragmentation?

Show Answer

C) Fragment

Q9. SLAAC stands for:

Show Answer

B) Stateless Address Autoconfiguration

Q10. Which NDP message is sent by a host to find routers?

Show Answer

B) Router Solicitation

Q11. In IPv6, which mechanism replaces ARP?

Show Answer

B) NDP

Q12. Which IPv6 address type is used for link‑local communication?

Show Answer

A) FE80::/10

Q13. The IPv6 header is how many bytes long (fixed)?

Show Answer

B) 40

Q14. Which transition mechanism encapsulates IPv6 in IPv4 packets without additional headers?

Show Answer

A) 6to4 (uses protocol 41 encapsulation)

Q15. Which IPv6 address is the loopback address?

Show Answer

B) ::1

Q16. In IPv6, which next header value indicates a Hop‑by‑Hop Options extension header?

Show Answer

A) 0

Q17. The Flow Label field in the IPv6 header is used for:

Show Answer

B) Flow‑based QoS

Q18. Which of the following is a valid IPv6 address abbreviation?

Show Answer

D) All are valid representations (B is full, A and C use :: compression)

Q19. In IPv6, which field indicates the type of the next header?

Show Answer

C) Next Header

Q20. Which of the following is NOT a reason for IPv6 development?

Show Answer

C) Reduced header overhead (IPv6 header is larger than IPv4, but fixed)

Q21. The IPv6 unspecified address is:

Show Answer

A) ::

Q22. Which ICMPv6 message is used to report that a packet is too large for the next hop's MTU?

Show Answer

B) Packet Too Big

Q23. In IPv6, extension headers are processed in order. Which header must be processed first?

Show Answer

A) Hop‑by‑Hop Options

Q24. Which transition mechanism uses UDP encapsulation to traverse IPv4 NATs?

Show Answer

B) Teredo

Q25. The IPv6 address FF02::1 is:

Show Answer

A) All‑nodes multicast (FF02::1 is link‑local all‑nodes).

Q26. Which NDP message is used for duplicate address detection?

Show Answer

B) Neighbor Solicitation (sent to the solicited‑node multicast address).

Q27. In IPv6, the Payload Length field includes:

Show Answer

A) Only the extension headers and data, excluding the fixed header

Q28. Which IPv6 address type is used for nearest‑node delivery?

Show Answer

C) Anycast

Q29. What is the purpose of the Hop Limit field in IPv6?

Show Answer

B) To prevent infinite loops

Q30. Which of the following is an advantage of IPv6 over IPv4?

Show Answer

D) All of the above

Q31. In IPv6, the interface identifier is typically 64 bits and often derived from:

Show Answer

D) Both B and C (EUI‑64 or privacy extensions).

Q32. Which IPv6 extension header is used for source routing?

Show Answer

B) Routing

Q33. The IPv6 all‑routers multicast address is:

Show Answer

B) FF02::2 (link‑local all‑routers).

Q34. Which transition mechanism allows IPv6‑only hosts to communicate with IPv4‑only servers?

Show Answer

C) NAT64/DNS64

Q35. The IPv6 header does not include a checksum. How is error detection handled?

Show Answer

B) The transport layer provides end‑to‑end checksums

Short‑Answer Questions

Q36. Explain the difference between stateless and stateful address autoconfiguration in IPv6.

Show Answer

Stateless autoconfiguration (SLAAC) allows hosts to generate addresses using router advertisements and interface identifiers without any server. Stateful autoconfiguration uses DHCPv6 to assign addresses and other configuration parameters, providing more control.

Q37. Why does IPv6 eliminate the checksum field from the header?

Show Answer

IPv6 removes the checksum to reduce processing overhead at each hop. The checksum is redundant because link‑layer protocols already provide error detection, and transport‑layer protocols (TCP/UDP) provide end‑to‑end checksums. This improves forwarding performance.

Q38. Describe the Neighbor Discovery Protocol (NDP) and its main functions.

Show Answer

NDP is used in IPv6 for address resolution (replacing ARP), router discovery, neighbor unreachability detection, and duplicate address detection. It uses ICMPv6 messages: Router Solicitation/Advertisement, Neighbor Solicitation/Advertisement, and Redirect.

Q39. What is the purpose of the Flow Label field in IPv6?

Show Answer

The Flow Label is used to identify packets belonging to a specific flow (e.g., a sequence of packets requiring special handling, such as QoS or load balancing). It allows routers to classify and process packets without deep packet inspection.

Q40. Explain the concept of "IPv6 address compression" and provide an example.

Show Answer

IPv6 address compression involves omitting leading zeros within a group and compressing consecutive zero groups to :: (once). For example, 2001:0db8:0000:0000:0000:8a2e:0370:7334 can be compressed to 2001:db8::8a2e:370:7334.

Scenario‑Based Questions

Q41. An IPv6 host sends a Router Solicitation but receives no Router Advertisement. How can it obtain an address?

Show Answer

If no RA is received, the host cannot use SLAAC. It may fall back to DHCPv6 stateful autoconfiguration (if a DHCPv6 server is present) or may use a link‑local address (FE80::/64) for local communication only.

Q42. A router receives an IPv6 packet larger than the outgoing link's MTU. What does it do?

Show Answer

In IPv6, routers do not fragment. The router discards the packet and sends an ICMPv6 Packet Too Big (Type 2) message back to the source, including the MTU of the next hop. The source must then reduce the packet size and retransmit.

Q43. An organization uses both IPv4 and IPv6. What transition mechanism should they use for internal communication?

Show Answer

Dual‑stack is the simplest and most common approach: all hosts and routers run both IPv4 and IPv6, and applications choose which to use. This provides full compatibility.

Q44. An attacker sends a forged Neighbor Advertisement to claim the IPv6 address of a legitimate host. What is this attack called, and how can it be mitigated?

Show Answer

This is a Neighbor Spoofing attack (or NDP spoofing). It can be mitigated using Secure Neighbor Discovery (SEND) with cryptographic certificates, or by using static ARP/neighbor entries on trusted networks.

Q45. An ISP provides IPv6 service but uses NAT64/DNS64. What does this mean for end‑users?

Show Answer

End‑users will have IPv6 connectivity. When they try to access IPv4‑only servers, DNS64 synthesizes an IPv6 address, and NAT64 translates the IPv6 packets to IPv4. This allows IPv6‑only clients to reach IPv4 resources seamlessly.

Q46. Why is IPv6 scanning considered difficult compared to IPv4 scanning?

Show Answer

IPv6 address space is 128 bits (2^128 addresses), making brute‑force scanning infeasible. Attackers cannot scan the entire space; they must rely on DNS, logging, or other methods to discover hosts.

Q47. An IPv6 packet with a Routing extension header is received. What does this indicate?

Show Answer

The Routing extension header indicates that source routing is being used, specifying intermediate routers the packet should traverse. This can be used for traffic engineering but may also be a security risk.

Q48. Compare the IPv4 TTL and IPv6 Hop Limit fields. What is the key difference?

Show Answer

Both are used to prevent infinite loops and have the same function. The key difference is that IPv6 uses the term Hop Limit, while IPv4 uses TTL (Time to Live). Both are decremented at each router.

Q49. In a dual‑stack environment, an application prefers IPv6 but can fall back to IPv4. What mechanism is used to determine which IP version to use?

Show Answer

Applications typically use the getaddrinfo() API with AI_ADDRCONFIG, which returns IPv6 addresses if the host has IPv6 connectivity, otherwise IPv4. The Happy Eyeballs algorithm (RFC 8305) speeds up connection establishment by attempting both IPv6 and IPv4 in parallel.

Q50. A network administrator needs to assign a /64 prefix to a new subnet. How many addresses are available in this subnet?

Show Answer

A /64 subnet has 2^(128‑64) = 2^64 ≈ 1.84 × 10^19 addresses, which is virtually unlimited.

5. Exercise Section

Exercise 1

Write the full IPv6 address 2001:0db8:85a3:0000:0000:8a2e:0370:7334 in compressed notation.

Show Solution

2001:db8:85a3::8a2e:370:7334

Exercise 2

What is the prefix length of the subnet if the IPv6 prefix is 2001:db8:acad::/48?

Show Solution

/48 (as given). This is a common assignment for organizations.

Exercise 3

List the main fields of the IPv6 fixed header and their sizes.

Show Solution

Version (4), Traffic Class (8), Flow Label (20), Payload Length (16), Next Header (8), Hop Limit (8), Source Address (128), Destination Address (128). Total 40 bytes.

Exercise 4

Explain the sequence of events in SLAAC from host startup to obtaining a global IPv6 address.

Show Solution

1. Host generates a link‑local address (FE80::/64). 2. Host performs Duplicate Address Detection (DAD) using Neighbor Solicitation. 3. Host sends Router Solicitation (RS) to all‑routers multicast. 4. Router replies with Router Advertisement (RA) containing the network prefix (e.g., 2001:db8:1::/64). 5. Host combines the prefix with its interface ID to form a global address. 6. Host performs DAD for the global address. 7. Address is configured and ready.

Exercise 5

What is the difference between a unicast, multicast, and anycast IPv6 address?

Show Solution

Unicast: identifies a single interface. Multicast: identifies a group of interfaces; packets sent to a multicast address are received by all members. Anycast: identifies multiple interfaces; packets are sent to the nearest one (in routing metric).

Exercise 6

An IPv6 packet has a Next Header value of 44. What does this indicate?

Show Solution

Next Header 44 indicates a Fragment extension header. This means the packet is fragmented.

Exercise 7

Why does IPv6 not have a broadcast address? How is broadcast functionality achieved?

Show Solution

IPv6 does not have broadcast; it uses multicast for the same purpose. For example, the all‑nodes multicast address FF02::1 is used to send to all nodes on a link.

Exercise 8

Describe the function of the Neighbor Solicitation (NS) message and give an example scenario.

Show Solution

NS is used for address resolution (similar to ARP) and duplicate address detection. For example, a host wanting to communicate with another host sends an NS to the solicited‑node multicast address, asking for the link‑layer address of the target.

Exercise 9

Explain the role of NAT64 and DNS64 in IPv6 deployment.

Show Solution

NAT64 translates IPv6 packets to IPv4 and vice versa. DNS64 synthesizes AAAA records for IPv4-only domains by embedding the IPv4 address in a prefix. Together, they allow IPv6-only clients to access IPv4-only resources.

Exercise 10

What are the privacy implications of using EUI‑64 for interface identifiers? How are they addressed?

Show Solution

EUI‑64 uses the MAC address, which is globally unique and can be used to track devices. Privacy extensions (RFC 4941) generate random, temporary interface IDs that change periodically, reducing tracking.

Exercise 11

Compare the processing of fragmentation in IPv4 and IPv6. Which model is more efficient and why?

Show Solution

IPv4 routers can fragment; IPv6 routers do not fragment, only the source can fragment using extension headers. IPv6 model reduces router processing and complexity, making forwarding faster. However, it requires sources to perform PMTUD.

Exercise 12

What is the Hop Limit in IPv6 and how does it differ from the IPv4 TTL?

Show Solution

Hop Limit is the IPv6 equivalent of TTL. Both are decremented by 1 at each router. When it reaches 0, the packet is discarded and an ICMP time exceeded message is sent. There is no functional difference; the name change was made to clarify its purpose.

Exercise 13

Identify the IPv6 address type for each: a) 2001:db8::1 b) fe80::1 c) ff02::2.

Show Solution

a) Global Unicast (2001:db8::/32 is documentation). b) Link‑Local Unicast (fe80::/10). c) Link‑local multicast (ff02::2 is all‑routers multicast).

Exercise 14

Explain the concept of a "solicited‑node multicast address" and its purpose in IPv6.

Show Solution

A solicited‑node multicast address is formed by taking the last 24 bits of the IPv6 address and appending to FF02::1:FF00:0/104. It is used by NDP for address resolution. Hosts join the solicited‑node multicast group for each of their unicast addresses to receive Neighbor Solicitation messages.

Exercise 15

What is the role of the Flow Label in IPv6? Provide an example of its use.

Show Solution

The Flow Label identifies packets belonging to a specific flow (e.g., a video stream) that require similar handling (QoS, load balancing). It allows routers to classify and process packets without inspecting higher layers.

6. Homework Section

Homework 1

Research the history of IPv6 development. Write a 500‑word summary covering the main RFCs and milestones.

Show Sample Answer

IPv6 was developed by the IETF in the 1990s. RFC 2460 (1998) defined the basic specification. Key milestones: World IPv6 Day (2011), World IPv6 Launch (2012), and increasing global adoption. RFCs also defined extension headers, NDP, and transition mechanisms.

Homework 2

Explain the concept of "IPv6 privacy extensions" and why they are important. Compare them with EUI‑64 addressing.

Show Sample Answer

Privacy extensions generate random interface IDs that change periodically, preventing tracking across networks. EUI‑64 uses the MAC address, which is persistent and can be used to identify devices. Privacy extensions enhance user privacy.

Homework 3

Describe the Neighbor Discovery Protocol (NDP) messages and their functions. Include Router Solicitation, Router Advertisement, Neighbor Solicitation, Neighbor Advertisement, and Redirect.

Show Sample Answer

RS: hosts ask for routers; RA: routers announce prefixes and other info; NS: address resolution and DAD; NA: replies to NS; Redirect: informs a host of a better route.

Homework 4

Compare and contrast SLAAC and DHCPv6 in terms of address assignment, configuration, and network management.

Show Sample Answer

SLAAC is stateless: hosts generate addresses using RA prefixes. It provides only addressing, not other configuration (like DNS). DHCPv6 can provide full configuration (addresses, DNS, domain) and supports stateful and stateless modes. SLAAC is simpler, but DHCPv6 offers more control.

Homework 5

Explain the security vulnerabilities of NDP and describe Secure Neighbor Discovery (SEND) as a mitigation.

Show Sample Answer

NDP vulnerabilities include spoofing, man‑in‑the‑middle, and DoS attacks. SEND uses cryptographic signatures and certificates to authenticate NDP messages, preventing these attacks.

Homework 6

Describe three transition mechanisms for IPv6 deployment. Evaluate their advantages and disadvantages.

Show Sample Answer

Dual‑stack: full compatibility but requires dual infrastructure. 6to4: automatic tunneling but requires public IPv4. NAT64: allows IPv6‑only but requires translation and DNS64, which may break some applications.

Homework 7

Explain the IPv6 header format and compare it with the IPv4 header. Which fields are new or modified?

Show Sample Answer

IPv6 header has Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source, Destination. IPv4 has IHL, Total Length, Identification, Flags, Fragment Offset, TTL, Protocol, Header Checksum, etc. IPv6 removes checksum, fragmentation fields, and options; adds Flow Label.

Homework 8

What is the purpose of the Hop‑by‑Hop Options extension header? Provide an example of its use.

Show Sample Answer

It carries options that must be processed by every router along the path. Example: the Jumbo Payload option, which allows packets larger than 65,535 bytes.

Homework 9

Describe the IPv6 anycast addressing and give a practical example of its use.

Show Sample Answer

Anycast addresses are assigned to multiple interfaces; packets are sent to the nearest one. Used in DNS root servers and for load balancing (e.g., anycast CDN).

Homework 10

Explain how IPv6 handles multicast and compare with IPv4 multicast.

Show Sample Answer

IPv6 has built‑in multicast with a well‑defined address range (FF00::/8) and includes scope identifiers. IPv4 multicast also exists but is less integrated. IPv6 uses multicast for many functions (e.g., NDP).

Homework 11

Discuss the operational challenges of deploying IPv6 in an enterprise network (e.g., addressing, security, DNS, firewall configuration).

Show Sample Answer

Challenges: addressing plan complexity, dual‑stack management, ensuring firewalls support IPv6, updating DNS for AAAA records, training staff, and handling extension header filtering.

Homework 12

Explain the concept of "IPv6 address assignment via DHCPv6 Prefix Delegation (PD)" and its benefits for ISPs.

Show Sample Answer

DHCPv6‑PD allows a DHCP server to delegate a prefix to a customer edge router, enabling sub‑prefix allocation for internal subnets. ISPs use this to automate address management.

Homework 13

Describe the "IPv6 packet fragmentation" process, including the roles of the Fragment extension header and the source host.

Show Sample Answer

The source host divides the packet into fragments, each with a Fragment header (containing offset, more flag, ID). Fragments are sent independently and reassembled at the destination. Routers do not fragment.

Homework 14

Research the global IPv6 adoption statistics. Write a short report on the current status and the leading countries in deployment.

Show Sample Answer

As of 2025, global adoption is around 40‑50% (varies by country). Leading countries include India, France, Germany, and the USA. Many mobile networks are IPv6‑enabled.

Homework 15

Compare IPv6 extension headers with IPv4 options. What are the advantages of the extension header approach?

Show Sample Answer

IPv4 options are limited (40 bytes max) and processing is slow. IPv6 extension headers are flexible, can be chained, and are not required for all packets. They allow efficient processing (only the destination needs to process them).

7. Summary

This tutorial has provided an in‑depth exploration of IPv6 architecture and operations. Key takeaways:

IPv6 is the future of the Internet, and understanding it is essential for modern networking. In the next tutorial, we will explore generalized forwarding and SDN data planes.