Course: COMP347 Computer Networks (Revision 10) | Textbook: Kurose & Ross, Computer Networking: A Top‑Down Approach (9th ed.)
Upon completion of this tutorial, students should be able to:
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.
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:
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:
The IPv6 header is 40 bytes fixed and contains the following fields:
| Field | Size (bits) | Description |
|---|---|---|
| Version | 4 | 6 for IPv6. |
| Traffic Class | 8 | Similar to IPv4 DSCP/ECN. |
| Flow Label | 20 | Used for QoS and flow identification. |
| Payload Length | 16 | Length of the payload (excluding header). Max 65,535 bytes. |
| Next Header | 8 | Identifies the type of the next header (e.g., extension header or transport protocol). |
| Hop Limit | 8 | Similar to TTL in IPv4. |
| Source Address | 128 | IPv6 address of the sender. |
| Destination Address | 128 | IPv6 address of the receiver. |
Notable differences from IPv4: no checksum, no fragmentation fields (handled by extension headers), fixed header length.
IPv6 uses extension headers to support optional features. The Next Header field points to the next header, forming a chain. Common extension headers:
IPv6 addresses can be abbreviated:
Examples: 2001:db8::1, ::1 (loopback), fe80::/10 (link‑local).
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.
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).
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.
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.
IPv6 deployment requires coexistence with IPv4. Main transition mechanisms:
IPv6 introduces new security challenges:
Best practices: use RA guard, implement SEND, filter unnecessary extension headers, and deploy stateful firewalls.
Q1. What is the size of an IPv6 address?
C) 128 bits
Q2. Which field in the IPv6 header is used for QoS and flow identification?
B) Flow Label (20 bits)
Q3. In IPv6, the Hop Limit field is analogous to what in IPv4?
A) TTL
Q4. Which IPv6 address type is used for one‑to‑many communication?
B) Multicast
Q5. Which IPv6 prefix is used for Global Unicast addresses?
A) 2000::/3
Q6. In IPv6, which field is NOT present in the fixed header?
B) Checksum
Q7. What is the typical subnet size in IPv6?
C) /64
Q8. Which extension header is used for IPv6 fragmentation?
C) Fragment
Q9. SLAAC stands for:
B) Stateless Address Autoconfiguration
Q10. Which NDP message is sent by a host to find routers?
B) Router Solicitation
Q11. In IPv6, which mechanism replaces ARP?
B) NDP
Q12. Which IPv6 address type is used for link‑local communication?
A) FE80::/10
Q13. The IPv6 header is how many bytes long (fixed)?
B) 40
Q14. Which transition mechanism encapsulates IPv6 in IPv4 packets without additional headers?
A) 6to4 (uses protocol 41 encapsulation)
Q15. Which IPv6 address is the loopback address?
B) ::1
Q16. In IPv6, which next header value indicates a Hop‑by‑Hop Options extension header?
A) 0
Q17. The Flow Label field in the IPv6 header is used for:
B) Flow‑based QoS
Q18. Which of the following is a valid IPv6 address abbreviation?
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?
C) Next Header
Q20. Which of the following is NOT a reason for IPv6 development?
C) Reduced header overhead (IPv6 header is larger than IPv4, but fixed)
Q21. The IPv6 unspecified address is:
A) ::
Q22. Which ICMPv6 message is used to report that a packet is too large for the next hop's MTU?
B) Packet Too Big
Q23. In IPv6, extension headers are processed in order. Which header must be processed first?
A) Hop‑by‑Hop Options
Q24. Which transition mechanism uses UDP encapsulation to traverse IPv4 NATs?
B) Teredo
Q25. The IPv6 address FF02::1 is:
A) All‑nodes multicast (FF02::1 is link‑local all‑nodes).
Q26. Which NDP message is used for duplicate address detection?
B) Neighbor Solicitation (sent to the solicited‑node multicast address).
Q27. In IPv6, the Payload Length field includes:
A) Only the extension headers and data, excluding the fixed header
Q28. Which IPv6 address type is used for nearest‑node delivery?
C) Anycast
Q29. What is the purpose of the Hop Limit field in IPv6?
B) To prevent infinite loops
Q30. Which of the following is an advantage of IPv6 over IPv4?
D) All of the above
Q31. In IPv6, the interface identifier is typically 64 bits and often derived from:
D) Both B and C (EUI‑64 or privacy extensions).
Q32. Which IPv6 extension header is used for source routing?
B) Routing
Q33. The IPv6 all‑routers multicast address is:
B) FF02::2 (link‑local all‑routers).
Q34. Which transition mechanism allows IPv6‑only hosts to communicate with IPv4‑only servers?
C) NAT64/DNS64
Q35. The IPv6 header does not include a checksum. How is error detection handled?
B) The transport layer provides end‑to‑end checksums
Q36. Explain the difference between stateless and stateful address autoconfiguration in IPv6.
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?
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.
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?
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.
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.
Q41. An IPv6 host sends a Router Solicitation but receives no Router Advertisement. How can it obtain an address?
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?
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?
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?
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?
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?
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?
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?
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?
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?
A /64 subnet has 2^(128‑64) = 2^64 ≈ 1.84 × 10^19 addresses, which is virtually unlimited.
Write the full IPv6 address 2001:0db8:85a3:0000:0000:8a2e:0370:7334 in compressed notation.
2001:db8:85a3::8a2e:370:7334
What is the prefix length of the subnet if the IPv6 prefix is 2001:db8:acad::/48?
/48 (as given). This is a common assignment for organizations.
List the main fields of the IPv6 fixed header and their sizes.
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.
Explain the sequence of events in SLAAC from host startup to obtaining a global IPv6 address.
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.
What is the difference between a unicast, multicast, and anycast IPv6 address?
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).
An IPv6 packet has a Next Header value of 44. What does this indicate?
Next Header 44 indicates a Fragment extension header. This means the packet is fragmented.
Why does IPv6 not have a broadcast address? How is broadcast functionality achieved?
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.
Describe the function of the Neighbor Solicitation (NS) message and give an example scenario.
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.
Explain the role of NAT64 and DNS64 in IPv6 deployment.
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.
What are the privacy implications of using EUI‑64 for interface identifiers? How are they addressed?
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.
Compare the processing of fragmentation in IPv4 and IPv6. Which model is more efficient and why?
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.
What is the Hop Limit in IPv6 and how does it differ from the IPv4 TTL?
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.
Identify the IPv6 address type for each: a) 2001:db8::1 b) fe80::1 c) ff02::2.
a) Global Unicast (2001:db8::/32 is documentation). b) Link‑Local Unicast (fe80::/10). c) Link‑local multicast (ff02::2 is all‑routers multicast).
Explain the concept of a "solicited‑node multicast address" and its purpose in IPv6.
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.
What is the role of the Flow Label in IPv6? Provide an example of its use.
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.
Research the history of IPv6 development. Write a 500‑word summary covering the main RFCs and milestones.
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.
Explain the concept of "IPv6 privacy extensions" and why they are important. Compare them with EUI‑64 addressing.
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.
Describe the Neighbor Discovery Protocol (NDP) messages and their functions. Include Router Solicitation, Router Advertisement, Neighbor Solicitation, Neighbor Advertisement, and Redirect.
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.
Compare and contrast SLAAC and DHCPv6 in terms of address assignment, configuration, and network management.
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.
Explain the security vulnerabilities of NDP and describe Secure Neighbor Discovery (SEND) as a mitigation.
NDP vulnerabilities include spoofing, man‑in‑the‑middle, and DoS attacks. SEND uses cryptographic signatures and certificates to authenticate NDP messages, preventing these attacks.
Describe three transition mechanisms for IPv6 deployment. Evaluate their advantages and disadvantages.
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.
Explain the IPv6 header format and compare it with the IPv4 header. Which fields are new or modified?
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.
What is the purpose of the Hop‑by‑Hop Options extension header? Provide an example of its use.
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.
Describe the IPv6 anycast addressing and give a practical example of its use.
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).
Explain how IPv6 handles multicast and compare with IPv4 multicast.
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).
Discuss the operational challenges of deploying IPv6 in an enterprise network (e.g., addressing, security, DNS, firewall configuration).
Challenges: addressing plan complexity, dual‑stack management, ensuring firewalls support IPv6, updating DNS for AAAA records, training staff, and handling extension header filtering.
Explain the concept of "IPv6 address assignment via DHCPv6 Prefix Delegation (PD)" and its benefits for ISPs.
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.
Describe the "IPv6 packet fragmentation" process, including the roles of the Fragment extension header and the source host.
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.
Research the global IPv6 adoption statistics. Write a short report on the current status and the leading countries in deployment.
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.
Compare IPv6 extension headers with IPv4 options. What are the advantages of the extension header approach?
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).
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.