---
title: "Header translation and tunneling"
subject: "Computer Networks and Security"
chapter: 7
key: "semester_7/computer_networks_and_security:header-translation-tunneling"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/header-translation-tunneling
site: BCT Engineering
---

# Header translation and tunneling

Computer Networks and Security · Chapter 7: Introduction to IPV6

- Asked in: 2074 Asoj, 4 marks
- Video: [IPv4 to IPv6 transition - 6to4 tunneling](https://www.youtube.com/watch?v=OBxwCE2_8EQ) — Sunny Classroom
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/header-translation-tunneling
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-7

## Question

Explain header translation and tunneling approach used for migrating IPv4 to IPv6.

## Short answer

Header translation converts IPv6↔IPv4 headers at gateway (NAT64/DNS64), losing some features. Tunneling encapsulates IPv6 in IPv4 (protocol 41) across IPv4 networks, preserving original packet. Translation for IPv6-only to IPv4-only; tunneling for IPv6 islands over IPv4.

## Answer

#### Header translation
Used when the sender is IPv6 and the receiver is IPv4-only (or the reverse). The translating gateway (router) **rewrites the header** of each packet from one version to the other. The packet is completely converted, not wrapped.

- IPv6 to IPv4: take the IPv4 address from the mapped address (e.g. ::FFFF:a.b.c.d), calculate the IPv4 header fields (IHL, checksum, TTL from hop limit, protocol from next header), set total length, drop the flow label and extension headers that have no IPv4 equivalent.
- IPv4 to IPv6: build the 40-byte base header, convert TTL to hop limit, protocol to next header.

```text
IPv6 host --[IPv6 hdr|data]--> [Translator] --[IPv4 hdr|data]--> IPv4 host
```
Techniques: SIIT, NAT64 with DNS64. Some IPv6 features (flow label, extension headers) are lost.

#### Tunneling
Used when two IPv6 hosts or networks must communicate across an **IPv4-only network**. At the tunnel entry, the whole IPv6 packet is **encapsulated as the payload** of an IPv4 packet (protocol field 41); the IPv4 destination is the tunnel exit router. The exit router removes the IPv4 header and forwards the original IPv6 packet.

```text
IPv6 host --[IPv6]--> R1 ==[IPv4 hdr|IPv6 packet]==> R2 --[IPv6]--> IPv6 host
                          (IPv4 internet)
```

| Point | Header translation | Tunneling |
|---|---|---|
| Packet | Header converted | Header kept inside new header |
| Use | IPv6-only talks to IPv4-only | IPv6 islands over IPv4 network |
| Information | Some lost | Preserved |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does a translating gateway do in header translation?
   A. Drops all IPv6 packets
   B. Only changes the DNS record
   C. Wraps the IPv6 packet inside an IPv4 packet
   D. Rewrites the packet header from one version to the other
   Answer: D. The gateway completely converts the header, it does not wrap the packet. (Key point: Header translation meaning)

2. In tunneling, how is the IPv6 packet carried across an IPv4 network?
   A. Sent as an ICMP message
   B. Header converted to IPv4 format
   C. Split into IPv4 fragments without a header
   D. Whole IPv6 packet encapsulated as payload of an IPv4 packet, protocol 41
   Answer: D. The entire IPv6 packet becomes the payload of an IPv4 packet with protocol field 41; the exit router removes the IPv4 header. (Key point: Tunneling encapsulation)

3. Which is the correct use case?
   A. Header translation: IPv6-only host talks to IPv4-only host; tunneling: IPv6 islands over IPv4
   B. Header translation: IPv6 islands over IPv4 network
   C. Both are used only between two IPv4 hosts
   D. Tunneling: IPv6-only host talks to IPv4-only host
   Answer: A. Translation bridges IPv6-only and IPv4-only hosts, while tunneling joins IPv6 islands across an IPv4 network. (Key point: When to use each)

4. Which method may lose IPv6 features such as flow label and extension headers?
   A. Header translation
   B. Tunneling
   C. Neither
   D. Both equally
   Answer: A. Translation converts headers and drops fields with no IPv4 equivalent; tunneling keeps the original packet intact. (Key point: Information loss)

## Related in Computer Networks and Security

- [Compare IPv6/IPv4 headers; migration](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv6-ipv4-header-migration) — Computer Networks and Security, chapter 7, asked 2×
- [IPv4/IPv6 coexistence and dual stack](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Adual-stack-coexistence) — Computer Networks and Security, chapter 7
- [IPv4 drawbacks solved by IPv6](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv4-drawbacks-ipv6-advantages) — Computer Networks and Security, chapter 7, asked 2×
- [Factors for IPv6; IPv4 to IPv6 transition](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv6-factors-transition) — Computer Networks and Security, chapter 7, asked 2×
- [IPv4 problems, IPv6 fixes, transition](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv6-problems-solutions-transition) — Computer Networks and Security, chapter 7
- [What is IPv6; interoperability methods](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv6-interoperability-methods) — Computer Networks and Security, chapter 7

## Related in other subjects

- [IPv6 features, header format, RFC streams](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aipv6-features-header-rfc) — Internet and Intranet, chapter 2
- [IPv4 vs IPv6 datagram fragmentation](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aipv4-ipv6-fragmentation) — Internet and Intranet, chapter 2, asked 2×
- [TCP/IP applications; IPv4 vs IPv6 routing](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Atcpip-application-ipv4-ipv6-routing) — Internet and Intranet, chapter 2
- [RFC and IPv4/IPv6 fragmentation](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Arfc-fragmentation-ipv4-ipv6) — Internet and Intranet, chapter 2
