PadhaikoAll subjects

Next Generation Internet Protocol

Next Generation Networking with IPv6 (ENCT 387)

Open in the Padhaiko app

2.1 Introduction to IPv6

Internet Protocol version 6 (IPv6) is the next-generation network-layer protocol designed by the Internet Engineering Task Force (IETF) to succeed IPv4. Originally published as RFC 1883 (1995), updated in RFC 2460 (1998), and elevated to Internet Standard RFC 8200 (2017), IPv6 provides a vastly expanded 128-bit address space, a streamlined fixed header, extensible options, and native support for autoconfiguration and security.

2.1.1 History and need for IPv6

By the early 1990s, rapid growth of the Internet revealed two looming crises in IPv4: rapid depletion of Class B networks and explosive growth in backbone routing tables.

Definition

Historical Timeline of IPv6 Standardization

Why IPv6 Is Needed:

  1. Address Exhaustion: 2^128 addresses eliminate the need for multi-tier Carrier-Grade NAT (CGNAT).
  2. Routing Efficiency: Hierarchical RIR allocations enable route aggregation across global BGP routers.
  3. Header Simplicity & Forwarding Speed: Fixed 40-byte header with no per-hop checksum reduces router CPU overhead.
  4. End-to-End Integrity & Security: Restores direct reachability for P2P, VoIP, and end-to-end IPsec without NAT traversal workarounds.
  5. Zero-Touch Configuration: Built-in Neighbor Discovery and SLAAC automate addressing and gateway discovery.

2.1.2 IPv6 header format

Unlike IPv4's variable 20–60 byte header containing 12+ fields, the base IPv6 header is always 40 bytes (320 bits) long and contains only 8 fields.

IPv6 Base Header Format (40 Bytes / 320 Bits)Text
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Traffic Class |           Flow Label                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Payload Length        |  Next Header  |   Hop Limit   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                                                               +
|                                                               |
+                         Source Address                        +
|                           (128 bits)                          |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                                                               +
|                                                               |
+                      Destination Address                      +
|                           (128 bits)                          |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IPv6 Header Fields and Functions
FieldSizeFunction
Version4 bitsAlways 0110 (decimal 6) identifying IPv6.
Traffic Class8 bitsReplaces IPv4 ToS/DSCP: 6-bit DSCP (QoS priority) + 2-bit ECN (Explicit Congestion Notification).
Flow Label20 bitsIdentifies packets belonging to the same real-time flow so routers can provide consistent QoS and ECMP hashing without inspecting transport headers.
Payload Length16 bitsLength in bytes of everything following the 40-byte base header (all Extension Headers + upper-layer segment). Max standard payload = 65,535 bytes (0 indicates a Jumbogram via Hop-by-Hop option).
Next Header8 bitsIdentifies the type of header immediately following the IPv6 base header (either an Extension Header like 44 Fragment or an upper-layer protocol like 6 TCP, 17 UDP, 58 ICMPv6).
Hop Limit8 bitsReplaces IPv4 TTL; decremented by 1 at each router. Packet is discarded when it reaches 0 (with ICMPv6 Time Exceeded sent back).
Source Address128 bitsIPv6 address of the packet's originator.
Destination Address128 bitsIPv6 address of the intended recipient (or next node in a Routing Header).
AspectIPv4 Base HeaderIPv6 Base Header
Header LengthVariable: 20 to 60 bytes (requires IHL field)Fixed: always 40 bytes (IHL removed)
Number of Fields12 required fields + optional options8 fields total
Header Checksum16-bit checksum recomputed at every router hopRemoved entirely (relies on L2 CRC and L4 TCP/UDP/ICMPv6 checksums)
Fragmentation FieldsIdentification, Flags, Fragment Offset in base headerRemoved from base header; moved to Fragment Extension Header (source-only)
Protocol Identification8-bit Protocol field8-bit Next Header field (chains Extension Headers and L4 protocols)
Lifetime FieldTime to Live (TTL)Hop Limit (explicitly counts router hops)
QoS Marking8-bit Type of Service (DSCP/ECN)8-bit Traffic Class + 20-bit Flow Label

2.1.3 Features of IPv6

  1. Massive 128-Bit Address Space: Provides 2^128 addresses, supporting hierarchical provider-based aggregation and eliminating NAT.
  2. Streamlined Fixed Header: Fixed 40-byte alignment (64-bit aligned) enables fast ASIC/hardware packet switching.
  3. Modular Extension Headers: Optional features (routing, fragmentation, IPsec security) are placed in chained headers processed only when needed, rather than slowing down every router.
  4. Stateless & Stateful Autoconfiguration: Supports SLAAC (hosts configure their own addresses from Router Advertisements) as well as DHCPv6.
  5. Elimination of Broadcast: IPv6 has no broadcast address; broadcast storms are replaced by scoped multicast (such as All-Nodes ff02::1 and Solicited-Node Multicast).
  6. Anycast Support: Multiple servers share an address so packets reach the topologically nearest node.
  7. Source-Only Fragmentation & Mandatory PMTUD: Intermediate routers never fragment packets, preventing router exhaustion.
  8. IPsec Compatibility & Mobility: Designed cleanly for AH/ESP security and Mobile IPv6 (MIPv6) route optimization.

2.1.4 IPv6 addressing format and types

Text Representation and Compression Rules (RFC 4291 / RFC 5952)

An IPv6 address is 128 bits divided into eight 16-bit groups (hextets) written in hexadecimal and separated by colons (:), for example: 2001:0db8:0000:0000:0000:ff00:0042:8329

Two compression rules shorten written IPv6 addresses:

  1. Leading Zero Suppression: Leading zeros in each 16-bit hextet may be omitted (0db8 -> db8, 0042 -> 42, 0000 -> 0). Trailing zeros must never be omitted (ff00 stays ff00).
  2. Zero Compression (::): A single contiguous sequence of one or more all-zero hextets (:0000:0000:...) may be replaced with a double colon ::. Because :: expands to however many zero hextets are needed to reach 8 groups total, :: can appear at most once in an address.

Per RFC 5952 (canonical text representation): use lowercase hex (a–f), compress the longest run of zeros (or leftmost run on a tie), and do not use :: to shorten just a single :0: hextet.

Prefix Notation and Subnetting Structure

Like CIDR, IPv6 uses address/prefix-length. A standard Global Unicast Address follows a three-tier 64-bit / 64-bit split:

Definition

Modified EUI-64 Interface ID Derivation

To derive a 64-bit Interface ID from a 48-bit Ethernet MAC address (AA:BB:CC:DD:EE:FF):

  1. Split the 48-bit MAC in half and insert the 16-bit hex value FFFE in the middle: AABB:CCFF:FEDD:EEFF.
  2. Flip the 7th bit (the Universal/Local bit, i.e., XOR the first byte with 0x02).

Types of IPv6 Addresses

IPv6 defines three fundamental address categories (replacing IPv4 unicast, multicast, and broadcast):

  1. Unicast (One-to-One): Identifies a single interface.
    • Global Unicast Address (GUA, 2000::/3): Globally routable public addresses (first 3 bits 001, covering 2000:: to 3fff:...). Documentation prefix is 2001:db8::/32.
    • Link-Local Address (fe80::/10): Automatically configured on every IPv6-enabled interface; valid only on the local link (never routed beyond a router). Used as next-hop in routing tables and for NDP.
    • Unique Local Address (ULA, fc00::/7, practically fd00::/8): Private internal addressing (similar to IPv4 RFC 1918), not routed on the global Internet.
    • Loopback (::1/128): Equivalent to IPv4 127.0.0.1.
    • Unspecified (::/128): All zeros; used as source address before a host acquires an address (e.g., during DAD).
    • IPv4-Mapped IPv6 Address (::ffff:0:0/96): Represents an IPv4 host inside dual-stack socket APIs (e.g., ::ffff:192.0.2.10).
  2. Anycast (One-to-Nearest): Assigned to multiple interfaces (typically geographically distributed servers like DNS root servers). Packets go to the single nearest interface according to routing protocol metrics. Anycast addresses share the exact syntax of unicast addresses.
  3. Multicast (One-to-Many, ff00::/8): Identifies a group of interfaces; packets are delivered to all group members.
    • Format: 1111 1111 (8 bits ff) | Flags (4 bits: 0RPT, where T=0 permanent well-known, T=1 transient) | Scope (4 bits) | Group ID (112 bits).
Common IPv6 Multicast Scopes and Well-Known Addresses
Address / ScopeMeaning
Scope 1 (ff01::/16)Interface-Local (loopback within single node)
Scope 2 (ff02::/16)Link-Local (local LAN segment only)
Scope 5 (ff05::/16)Site-Local (within an organization site)
Scope 8 (ff08::/16)Organization-Local
Scope e (ff0e::/16)Global Scope (Internet-wide)
ff02::1All-Nodes on the local link (replaces IPv4 broadcast)
ff02::2All-Routers on the local link
ff02::5 / ff02::6All OSPFv3 Routers / All OSPFv3 Designated Routers
ff02::9All RIPng Routers
ff02::1:ff00:0/104Solicited-Node Multicast (appends last 24 bits of target unicast/anycast address; used for NDP address resolution & DAD)

2.1.5 Extension headers

IPv6 places optional network-layer functions in separate Extension Headers chained between the 40-byte base header and the upper-layer payload (TCP/UDP/ICMPv6) using the Next Header field.

IPv6 Extension Header ChainingText
+--------------------+     +--------------------+     +--------------------+     +-------------+
|  IPv6 Base Header  | --> |  Routing Header    | --> |  Fragment Header   | --> | TCP Segment |
| Next Header = 43   |     | Next Header = 44   |     | Next Header = 6    |     |  + Payload  |
+--------------------+     +--------------------+     +--------------------+     +-------------+

With the sole exception of the Hop-by-Hop Options header, intermediate routers do not examine extension headers—they only inspect the 40-byte base header and forward at wire speed.

Standard IPv6 Extension Headers (RFC 8200 Recommended Order)
OrderNext Header CodeExtension HeaderPurpose
10Hop-by-Hop OptionsOptions examined by every router along the path (e.g., Router Alert, IPv6 Jumbograms).
260Destination Options (1st)Options processed only by the first destination listed in the Routing Header (or final destination if no Routing Header).
343Routing HeaderSpecifies intermediate nodes to visit (Type 0 deprecated for DoS risk; Type 2 used in Mobile IPv6; Segment Routing SRH Type 4).
444Fragment HeaderAllows the source host only to fragment packets exceeding Path MTU (contains 13-bit Fragment Offset, M flag, 32-bit Identification).
551Authentication Header (AH)IPsec header providing data origin authentication, integrity, and anti-replay protection.
650Encapsulating Security Payload (ESP)IPsec header providing confidentiality (encryption), integrity, and authentication.
760Destination Options (2nd)Options processed strictly by the final destination node.
86 / 17 / 58Upper-Layer HeaderTCP (6), UDP (17), ICMPv6 (58), or 59 (No Next Header).

2.2 ICMPv6

Internet Control Message Protocol for IPv6 (ICMPv6), specified in RFC 4443, is identified by Next Header = 58. Unlike IPv4 where ICMP was an auxiliary diagnostic protocol separate from ARP and IGMP, ICMPv6 is a mandatory core pillar of IPv6.

2.2.1 Features

  1. Unified Control Plane: Consolidates IPv4's ICMPv4 (errors and echo), ARP (Layer 3-to-MAC resolution), and IGMP (multicast group membership via MLD, Multicast Listener Discovery).
  2. Mandatory Pseudo-Header Checksum: Every ICMPv6 message includes a mandatory checksum computed across the ICMPv6 message plus a 40-byte IPv6 pseudo-header (Source, Destination, ICMPv6 Length, Next Header = 58), protecting against misrouted packets.
  3. Error-Suppression Safeguards: To prevent broadcast/multicast storms, ICMPv6 error messages are never generated in response to another ICMPv6 error message, nor for packets sent to multicast/anycast-link addresses (with narrow exceptions like Packet Too Big for multicast Path MTU Discovery).
  4. Rate Limiting: Nodes must rate-limit outgoing ICMPv6 error messages to defend against bandwidth exhaustion and DoS amplification.

2.2.2 General message format

ICMPv6 General Message Format (Next Header = 58)Text
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |     Code      |          Checksum             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                         Message Body                          +
|                     (varies by Type/Code)                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

2.2.3 ICMP error and informational message types

Key ICMPv6 Error and Informational Messages
CategoryTypeNameKey Codes / Role
Error1Destination UnreachableCode 0: No route; Code 1: Administratively prohibited (firewall); Code 3: Address unreachable; Code 4: Port unreachable
Error2Packet Too BigReturned by a router when packet exceeds outgoing link MTU; carries 32-bit Next-Hop MTU for PMTUD
Error3Time ExceededCode 0: Hop Limit exceeded in transit (used by traceroute6); Code 1: Fragment reassembly time exceeded
Error4Parameter ProblemCode 0: Erroneous header field; Code 1: Unrecognized Next Header; Code 2: Unrecognized IPv6 option
Info128Echo RequestSent by ping6 / ping to test host reachability
Info129Echo ReplyResponse to Echo Request
Info130–132MLD (Listener Query/Report/Done)Replaces IPv4 IGMP; manages IPv6 multicast group memberships
Info133–137Neighbor Discovery Protocol (NDP)RS (133), RA (134), NS (135), NA (136), Redirect (137)

2.2.4 Neighbor discovery

Neighbor Discovery Protocol (NDP, RFC 4861) uses five ICMPv6 informational messages (Types 133–137) with Hop Limit = 255 (preventing off-link spoofing, because any packet routed from elsewhere would have Hop Limit < 255).

Definition

The Five NDP Message Types (RFC 4861)

  1. Router Solicitation (RS, Type 133): Sent by a booting host to ff02::2 (All-Routers) asking local routers to send an RA immediately instead of waiting for the periodic broadcast timer.
  2. Router Advertisement (RA, Type 134): Sent periodically by routers (or in reply to RS) to ff02::1 (All-Nodes). Carries the link prefix (e.g., 2001:db8:1::/64), link MTU, default gateway lifetime, and M (Managed) / O (Other) flags telling hosts whether to use SLAAC or DHCPv6.
  3. Neighbor Solicitation (NS, Type 135): Sent to the target's Solicited-Node Multicast address (ff02::1:ffxx:xxxx) to resolve a link-layer (MAC) address (replacing IPv4 ARP Request) or to perform Duplicate Address Detection (DAD) using source address ::.
  4. Neighbor Advertisement (NA, Type 136): Response to NS containing the target's MAC address (or unsolicited announcement if a MAC changes).
  5. Redirect (Type 137): Sent by a router to inform a host of a better first-hop router for a specific destination.

Core Functions Performed by NDP

2.2.5 Path MTU discovery

In IPv4, routers fragment packets that exceed an outgoing interface's MTU. In IPv6, routers never fragment packets—only the originating source host may fragment.

Definition

Path MTU Discovery (PMTUD, RFC 8201) Mechanism

  1. Minimum IPv6 Link MTU: Every IPv6-capable link must support an MTU of at least 1280 bytes.
  2. Initial Assumption: The source host initially sends packets sized up to its own outgoing interface MTU (typically 1500 bytes on Ethernet).
  3. Bottleneck Detection: If a router along the path has a smaller outgoing MTU (e.g., 1300 bytes on a tunnel interface), the router drops the packet and sends an ICMPv6 Type 2 (Packet Too Big) message containing the 1300-byte Next-Hop MTU back to the source.
  4. Adaptation: The source updates its cached Path MTU for that destination to 1300 bytes and either reduces TCP MSS / application segment size or breaks the datagram at the source using the Fragment Extension Header (Next Header = 44).

Worked Examples

Example 1

1

Given the network prefix 2001:0db8:0085:0000::/64 and a host interface with Ethernet MAC address 00:1A:2B:3C:4D:5E:

  1. Derive the 64-bit Interface Identifier using Modified EUI-64.
  2. Write the full 128-bit SLAAC Global Unicast Address and compress it to canonical RFC 5952 format.
  3. Compute the host's Solicited-Node Multicast Address used for DAD and Neighbor Discovery.

Deriving the Modified EUI-64 Interface Identifier:

  1. Split the 48-bit MAC 00:1A:2B:3C:4D:5E in half and insert FF:FE: 00:1A:2B:FF:FE:3C:4D:5E
  2. Invert the 7th bit (Universal/Local bit) of the first byte (0x00 = 0000 0000 XOR 0000 0010 = 0000 0010 = 0x02): 02:1A:2B:FF:FE:3C:4D:5E
  3. Format into four 16-bit lowercase hextets: 021a:2bff:fe3c:4d5e

Forming and Compressing the Full IPv6 Address:

  • Combining the /64 prefix 2001:0db8:0085:0000 with 021a:2bff:fe3c:4d5e: Uncompressed: 2001:0db8:0085:0000:021a:2bff:fe3c:4d5e
  • Applying RFC 5952 compression (drop leading zeros in each hextet; do not use :: for a single :0: group): Compressed: 2001:db8:85:0:21a:2bff:fe3c:4d5e/64

Computing the Solicited-Node Multicast Address: Solicited-Node Multicast uses the fixed 104-bit prefix ff02:0:0:0:0:1:ff00::/104 followed by the last 24 bits of the unicast address. The last 24 bits of 021a:2bff:fe3c:4d5e are 3c:4d5e, yielding: ff02:0000:0000:0000:0000:0001:ff3c:4d5e -> ff02::1:ff3c:4d5e

Answer:
  1. Modified EUI-64 Interface ID: 021a:2bff:fe3c:4d5e
  2. Canonical IPv6 Address (RFC 5952): 2001:db8:85:0:21a:2bff:fe3c:4d5e/64
  3. Solicited-Node Multicast Address: ff02::1:ff3c:4d5e
Example 2

2

An IPv6 packet carries a 1000-byte application payload inside a UDP datagram (8-byte UDP header) and uses a Fragment Extension Header (8 bytes) before the UDP header.

  1. Trace the Next Header field values in every header of the chain.
  2. Calculate the value stored in the IPv6 base header's Payload Length field and the total IPv6 packet size.

Tracing the Next Header Chain:

  1. IPv6 Base Header (40 bytes): Points to the Fragment Extension Header -> Next Header = 44.
  2. Fragment Extension Header (8 bytes): Points to the UDP header -> Next Header = 17.
  3. UDP Header (8 bytes) + Application Data (1000 bytes): Upper-layer transport payload (no Next Header field).

Computing Payload Length and Total Packet Size: In IPv6, Payload Length counts every byte after the 40-byte base header (including all extension headers): Payload Length = Fragment Header (8) + UDP Header (8) + Application Data (1000) = 1016 bytes Total IPv6 Packet Size = Base Header (40) + Payload Length (1016) = 1056 bytes

Answer:
  1. Next Header Chain: IPv6 Base Header (Next Header = 44) -> Fragment Header (Next Header = 17) -> UDP + Data.
  2. IPv6 Payload Length: 1016 bytes; Total Packet Size: 1056 bytes.
Example 3

3

A host wants to send a 3960-byte UDP datagram (UDP header + application payload) over IPv6 to a destination whose discovered Path MTU is 1300 bytes. Because intermediate routers cannot fragment IPv6 packets, the source fragments the packet using the Fragment Extension Header (8 bytes). Calculate:

  1. The maximum fragmentable payload bytes per fragment (must be a multiple of 8 bytes).
  2. The total number of IPv6 fragments generated.
  3. For each fragment: its payload length, Fragment Offset field value (in 8-octet units), M (More Fragments) flag, and total IPv6 packet size.

Maximum Fragment Payload per Packet: Each fragment carries a 40-byte IPv6 base header plus an 8-byte Fragment Extension Header (40 + 8 = 48 bytes of IPv6 overhead). Available bytes for fragmentable payload within the 1300-byte Path MTU: 1300 - 48 = 1252 bytes Because the Fragment Offset field measures offsets in 8-byte units, every non-final fragment's payload must be a multiple of 8 bytes: (1252 // 8) * 8 = 156 * 8 = 1248 bytes

Number of Fragments Needed for 3960 Bytes:

  • First 3 fragments each carry 1248 bytes: 3 * 1248 = 3744 bytes.
  • Final (4th) fragment carries the remainder: 3960 - 3744 = 216 bytes.

Total fragments = 4.

Fragment-by-Fragment Header Values:

  • Fragment 1: Payload = 1248 B, Offset = 0 / 8 = 0, M = 1, Total packet = 48 + 1248 = 1296 B
  • Fragment 2: Payload = 1248 B, Offset = 1248 / 8 = 156, M = 1, Total packet = 48 + 1248 = 1296 B
  • Fragment 3: Payload = 1248 B, Offset = 2496 / 8 = 312, M = 1, Total packet = 48 + 1248 = 1296 B
  • Fragment 4: Payload = 216 B, Offset = 3744 / 8 = 468, M = 0, Total packet = 48 + 216 = 264 B
Answer:
  1. Max fragment payload: 1248 bytes (48 bytes overhead + 1248 bytes payload = 1296 bytes <= 1300 MTU).
  2. Number of fragments: 4 fragments.
  3. Fragment table: Frag 1 (1248 B, Offset 0, M=1, 1296 B); Frag 2 (1248 B, Offset 156, M=1, 1296 B); Frag 3 (1248 B, Offset 312, M=1, 1296 B); Frag 4 (216 B, Offset 468, M=0, 264 B).

Exercises

Practice Exercises — Next Generation Internet Protocol & ICMPv6

Question 1

Draw the IPv6 40-byte base header format, explain the function of each of its 8 fields, and state four structural changes made compared to the IPv4 header.

IPv6 Base Header Fields (8 Fields, 40 Bytes Fixed):

  1. Version (4 bits): Set to 6 (0110).
  2. Traffic Class (8 bits): Carries 6-bit DSCP + 2-bit ECN for QoS/congestion marking.
  3. Flow Label (20 bits): Identifies packets belonging to a common flow for consistent forwarding/QoS.
  4. Payload Length (16 bits): Size of all extension headers plus upper-layer payload in bytes.
  5. Next Header (8 bits): Identifies the first Extension Header or upper-layer protocol (e.g., 6 = TCP, 17 = UDP, 58 = ICMPv6).
  6. Hop Limit (8 bits): Decremented by 1 per router; packet dropped at 0.
  7. Source Address (128 bits) & Destination Address (128 bits): Origin and target addresses.

Four Structural Changes From IPv4:

  1. Fixed 40-byte length (removes IPv4 IHL field and inline variable-length options).
  2. Header Checksum removed (no per-hop checksum recalculation when Hop Limit decrements).
  3. Fragmentation fields moved out of the base header into the optional Fragment Extension Header (source-only fragmentation).
  4. 20-bit Flow Label added and Protocol generalized to Next Header chaining.
Answer:

The IPv6 base header is a fixed 40-byte structure with 8 fields: Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source Address, and Destination Address. Compared to IPv4, it fixes header length at 40 bytes, removes the per-hop header checksum, moves fragmentation to an Extension Header, and adds a 20-bit Flow Label.

Question 2

Apply RFC 5952 compression rules to shorten each IPv6 address, and expand the compressed addresses back to full 32-hex-digit form:

  1. Compress: fe80:0000:0000:0000:0202:b3ff:fe1e:8329
  2. Compress: 2001:0db8:0000:0012:0000:0000:0000:00a0
  3. Expand: 2001:db8:a::123
  4. Expand: ff02::1:ff00:5

Compressing Addresses (Leading Zeros + Longest :: Run):

  1. fe80:0000:0000:0000:0202:b3ff:fe1e:8329: Drop leading zeros -> fe80:0:0:0:202:b3ff:fe1e:8329; replace the three :0:0:0: groups with :: -> fe80::202:b3ff:fe1e:8329.
  2. 2001:0db8:0000:0012:0000:0000:0000:00a0: Drop leading zeros -> 2001:db8:0:12:0:0:0:a0; compress the longest run (three zeros on the right, leaving the single 0 intact) -> 2001:db8:0:12::a0.

Expanding Addresses to 8 Full 4-Digit Hextets:

  1. 2001:db8:a::123: Four explicit hextets exist (2001, db8, a, 123), so :: represents 8 - 4 = 4 zero hextets -> 2001:0db8:000a:0000:0000:0000:0000:0123.
  2. ff02::1:ff00:5: Four explicit hextets exist (ff02, 1, ff00, 5), so :: represents 8 - 4 = 4 zero hextets -> ff02:0000:0000:0000:0000:0001:ff00:0005.
Answer:
  1. fe80::202:b3ff:fe1e:8329
  2. 2001:db8:0:12::a0
  3. 2001:0db8:000a:0000:0000:0000:0000:0123
  4. ff02:0000:0000:0000:0000:0001:ff00:0005
Question 3

A host with Ethernet MAC address 34:17:EB:9A:BC:01 attaches to a LAN whose router advertises the prefix 2001:db8:40:10::/64 via SLAAC.

  1. Compute the host's Modified EUI-64 Interface ID and its resulting Global Unicast Address.
  2. Explain step-by-step how Duplicate Address Detection (DAD) verifies this address is unique using ICMPv6 Neighbor Discovery messages.

Modified EUI-64 Computation:

  • Insert FFFE in the middle of 34:17:EB:9A:BC:01: 34:17:EB:FF:FE:9A:BC:01.
  • Flip the 7th bit of the first byte 0x34 (0011 0100 XOR 0000 0010 = 0011 0110 = 0x36).
  • Interface ID: 3617:ebff:fe9a:bc01.
  • Full Global Unicast Address: 2001:db8:40:10:3617:ebff:fe9a:bc01/64.

Duplicate Address Detection (DAD) Procedure:

  1. The host marks 2001:db8:40:10:3617:ebff:fe9a:bc01 as tentative (cannot yet be used for normal traffic).
  2. It joins the Solicited-Node Multicast group ff02::1:ff9a:bc01.
  3. It sends an ICMPv6 Neighbor Solicitation (Type 135) with Source Address = :: (Unspecified), Destination Address = ff02::1:ff9a:bc01, and Target Address = 2001:db8:40:10:3617:ebff:fe9a:bc01.
  4. If another host already owns that address, it replies with a Neighbor Advertisement (Type 136) to ff02::1, and DAD fails. If no NA arrives before the timer expires, the host promotes the address to preferred.
Answer:
  1. Interface ID: 3617:ebff:fe9a:bc01; GUA: 2001:db8:40:10:3617:ebff:fe9a:bc01/64.
  2. During DAD, the host sends an ICMPv6 NS (Type 135) from :: to ff02::1:ff9a:bc01 targeting its tentative address; if no NA (Type 136) is received, the address is promoted from tentative to preferred.
Question 4

Explain the purpose of IPv6 Extension Headers, list the standard RFC 8200 ordering of extension headers, and distinguish between the Hop-by-Hop Options header and the Destination Options header.

Purpose and RFC 8200 Ordering of Extension Headers: Extension headers provide optional network-layer features without bloating the fixed 40-byte base header. RFC 8200 recommends placing them in this order:

  1. Hop-by-Hop Options (0)
  2. Destination Options (60, before Routing)
  3. Routing Header (43)
  4. Fragment Header (44)
  5. Authentication Header (51)
  6. Encapsulating Security Payload (50)
  7. Destination Options (60, final destination)
  8. Upper-Layer Header (6 TCP, 17 UDP, 58 ICMPv6)

Hop-by-Hop Options vs. Destination Options:

  • Hop-by-Hop Options (Next Header = 0): Placed immediately after the base header and examined by every intermediate router along the path (used for Router Alert or Jumbograms).
  • Destination Options (Next Header = 60): Ignored by ordinary intermediate routers; processed only by the destination node (or by intermediate nodes listed in a Routing Header if placed before the Routing Header).
Answer:

Extension headers chain optional functions via the Next Header field in RFC 8200 order: Hop-by-Hop (0), Destination Options (60), Routing (43), Fragment (44), AH (51), ESP (50), final Destination Options (60), then Upper-Layer. Hop-by-Hop Options are inspected by every router on the path, whereas Destination Options are processed only at the designated destination(s).

Question 5

Describe how Path MTU Discovery (PMTUD) works in IPv6 when a sender transmits a 3000-byte UDP datagram (plus 40-byte IPv6 base header) across a path containing a link whose MTU is the IPv6 minimum (1280 bytes). Compute the size and Fragment Offset of each resulting source fragment.

How PMTUD Detects the 1280-Byte Bottleneck:

  1. The sender initially transmits the 3040-byte IPv6 packet.
  2. The router facing the 1280-byte MTU link cannot fragment the packet, so it drops it and sends an ICMPv6 Type 2 (Packet Too Big) message back to the sender reporting Next-Hop MTU = 1280.
  3. The sender updates its destination Path MTU cache to 1280 bytes and performs source fragmentation.

Calculating Fragment Sizes and Offsets:

  • Overhead per fragment = 40 B (base header) + 8 B (Fragment header) = 48 B.
  • Max payload space = 1280 - 48 = 1232 bytes, which is already divisible by 8 (1232 / 8 = 154).
  • Splitting the 3000-byte UDP datagram:
    • Fragment 1: 1232 B, Offset = 0, M = 1, Total packet = 1280 B.
    • Fragment 2: 1232 B, Offset = 1232 / 8 = 154, M = 1, Total packet = 1280 B.
    • Fragment 3: 3000 - 2464 = 536 B, Offset = 2464 / 8 = 308, M = 0, Total packet = 48 + 536 = 584 B.
Answer:

The bottleneck router drops the oversized packet and returns ICMPv6 Type 2 (Packet Too Big, MTU = 1280), prompting the source to fragment the 3000-byte datagram into 3 fragments: Frag 1 (1232 B, Offset 0, M=1, 1280 B), Frag 2 (1232 B, Offset 154, M=1, 1280 B), and Frag 3 (536 B, Offset 308, M=0, 584 B).

← Fundamentals of Internet and Networking ProtocolsSecurity and Quality of Service in IPv6 →