PROJECTENGRAM

IPV6 TUNNELING AND ENCAPSULATION

IPv6 Tunneling and Encapsulation

Tags: #◇CSNETWK #◇Computer Science #◇Computer Networks #◇Networking Protocols #◇Graph Theory Basics


◇Overview

Tunneling is a technique used when two IPv6 networks need to communicate but are separated by an older IPv4 network. Since the intermediate IPv4 ro...

◇Key Concepts

Dual-Stack Routers Encapsulation The Path Path Tunnel Entrance

◇Details / Theory

◇1. Concept Overview: Tunneling

Definition

Tunneling is a technique used when two IPv6 networks need to communicate but are separated by an older IPv4 network. Since the intermediate IPv4 routers cannot understand IPv6 addresses, the edge routers must "wrap" (encapsulate) the entire IPv6 packet inside a standard IPv4 packet.

The Mechanism
Dual-Stack Routers: The routers at the edge (Entrance and Exit) must speak both protocols. Encapsulation: The IPv6 packet becomes the payload (data) of the IPv4 packet. The Path: To the intermediate routers, the packet looks like normal IPv4 traffic. They only care about the IPv4 headers and ignore the IPv6 payload inside.

◇2. The Network Topology

Scenario Data
!◇Pasted image 20251121092752.png
Path: Subnet B →\rightarrow Router B →\rightarrow Router c →\rightarrow Router d →\rightarrow Router E →\rightarrow Subnet D Tunnel Entrance: Router B (IPv4: 152.17.200.113) Tunnel Exit: Router E (IPv4: 156.225.10.66) Original Source (IPv6): 7555...3D9E (Host in Subnet B) Final Destination (IPv6): B6D2...D28B (Host in Subnet D)

◇3. Problem Analysis

Phase 1: Inside the Tunnel (B →\rightarrow c →\rightarrow d →\rightarrow E)

1. Is the datagram... IPv4 or IPv6?
Analysis: We are traversing the IPv4-only network (Routers c and d). The IPv6 packet cannot travel naked here; it must be enclosed in an IPv4 shell. Correct Answer: IPv4

2/3. What are the Source and Destination addresses?
Analysis (The "Vehicle"): The "Vehicle" is the IPv4 packet carrying the data.
Destination: The router ending the tunnel (Router E). Correct Answer (Source): 152.17.200.113 (Router B) Correct Answer (Dest): 156.225.10.66 (Router E)

4/5/6. Is it encapsulating? What is inside?
Analysis (The "Passenger"): Inside the IPv4 payload sits the original IPv6 packet. It remains untouched.
Inner Dest: The original IPv6 receiver. Correct Answer (Encapsulated?): Yes Correct Answer (Inner Source): 7555:F3BE...3D9E Correct Answer (Inner Dest): B6D2:9E28...D28B

(Note: This logic applies identically to the hop from c →\rightarrow d and d →\rightarrow E. As long as the packet is in the tunnel, the outer IPv4 headers remain constant to guide it to Router E.)

Phase 2: Exiting the Tunnel (E →\rightarrow D)

19. Is the datagram... IPv4 or IPv6?
Analysis: Router E receives the IPv4 packet, sees that it is the destination, strips off the IPv4 header (decapsulation), and reveals the IPv6 packet. It then forwards this IPv6 packet to Subnet D. Correct Answer: IPv6

20/21. What are the Source and Destination addresses?
Analysis: The IPv4 wrapper is gone. We are back to the original packet. Correct Answer (Source): 7555:F3BE...3D9E Correct Answer (Dest): B6D2:9E28...D28B

22. Is it encapsulating?
Analysis: No. The "Vehicle" has been discarded. The "Passenger" is now walking on their own. Correct Answer: No

◇Summary of Logic (Cheat Sheet)

LocationPacket TypeOuter SourceOuter DestInner Content
Before TunnelIPv6Original IPv6Original IPv6Data
Inside TunnelIPv4Tunnel Entry (Rtr B)Tunnel Exit (Rtr E)Complete IPv6 Packet
After TunnelIPv6Original IPv6Original IPv6Data

Visual Rule:
Inside the Tunnel: You have TWO sets of IP addresses.
Outer = Router to Router (IPv4).
Inner = Host to Host (IPv6).

◇Common Pitfalls

Forgetting that intermediate IPv4 routers only see the outer IPv4 header and are unaware of the inner IPv6 packet. Confusing the tunnel endpoints (dual-stack routers) with regular IPv4-only routers in the middle. Not recognizing that encapsulation adds overhead — the outer IPv4 header increases total packet size.

◇Summary

TL;DR — IPv6 tunneling wraps IPv6 packets inside IPv4 headers so they can traverse IPv4-only networks. Dual-stack routers at tunnel endpoints handle encapsulation/decapsulation; intermediate IPv4 routers forward based on the outer header only.

Related: - ◇Pasted image 20251121092752.png Source / Reference:

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

Why was IPv6 standardized with a 128-bit address space and a simplified fixed 40-byte base header?

Q2

Which three IPv4 header fields were removed from the base IPv6 header to speed up Layer-3 router processing?

Q3

What is IPv6-over-IPv4 Tunneling, and how does it enable two IPv6 islands to communicate across legacy IPv4-only intermediate routers?

Q4

When an ingress border router BB encapsulates an IPv6 packet (originating from IPv6 host AA and destined for IPv6 host FF) into an IPv4 tunnel ending at egress border router EE, what are the outer IPv4 source and destination addresses while inside the tunnel?

Q5

From the perspective of the IPv6 routing architecture at endpoints BB and EE, what does the intervening chain of IPv4-only routers (C→DC \to D) look like?

IPv6 Tunneling and Encapsulation | PROJECT ENGRAM