Tunnelling IPv6 over IPv4
Configure 6in4 and GRE tunnels and set a correct tunnel MTU and MSS. Explain 6rd as a provider-scoped automatic tunnel (RFC 5569, RFC 5969). Explain why 6to4 (RFC 3056) and Teredo (RFC 4380) should not be relied on.
Take the quiz · pass mark 70% · 9 questions
Explanation
When an IPv6 island must cross an IPv4-only core, you tunnel IPv6 inside IPv4. RFC 4213 defines the basic configured-tunnel and dual-stack mechanisms; RFC 7059 surveys the whole family and its trade-offs.
Configured tunnels: 6in4 and GRE
6in4 (protocol 41) puts an IPv6 packet directly inside an IPv4 packet: IPv4 header (20 bytes) + IPv6 payload. It is simple, static and predictable — you configure both endpoints — and it is the right tool between two routers you control. GRE over IPv4 adds a GRE header (IPv4 20 + GRE 4 = 24 bytes) and can carry more than IPv6, at slightly more overhead.
The catch with every tunnel is MTU and fragmentation. Encapsulation eats bytes, so the IPv6 MTU inside the tunnel is the path MTU minus the overhead. Get this wrong and large packets are silently dropped (the classic "small sites work, big transfers hang" tunnel failure). Set the tunnel interface MTU correctly and clamp TCP MSS so TCP never builds segments the tunnel cannot carry (L4.08 covered the same clamp for native paths).
6rd: provider-scoped automatic tunnels
6rd (IPv6 Rapid Deployment) lets an ISP deliver IPv6 over its existing IPv4 access network without per-CPE configuration. It was first published as RFC 5569 and standardised as RFC 5969. Unlike 6to4, 6rd uses the ISP's own IPv6 prefix and keeps all relays inside the provider, so it is operationally controlled and reliable. The CPE embeds the IPv4 bits into the 6rd delegated prefix, and a 6rd Border Relay inside the ISP connects to the native IPv6 Internet. 6rd is a legitimate stepping stone; many providers used it before native IPv6.
What not to rely on: 6to4 and Teredo
6to4 (RFC 3056) is an automatic tunnel using the well-known prefix 2002::/16, deriving a /48 from the host's public IPv4 address, and reaching the Internet through anycast public relays. Because those relays are uncontrolled and often broken, return paths are unreliable. RFC 7526 deprecates 6to4 anycast and its relay prefix; do not deploy it.
Teredo (RFC 4380) tunnels IPv6 inside IPv4 UDP (so it can traverse NAT, service port 3544). It is a last-resort host mechanism with poor reliability and performance. Treat both 6to4 and Teredo as legacy you may have to recognise and disable, not as tools you build on. Prefer native IPv6, or a configured/6rd tunnel you control.
ictNetworks scenario
ictNetworks connects a branch IPv6 island across a legacy IPv4 MPLS core with a 6in4 tunnel between two routers it owns, sets the tunnel MTU to 1480 and clamps MSS to 1420, and monitors for black-holing. It offered 6rd to broadband customers during the IPv4-only phase of one access region, using its own prefix, and it blocks 6to4 and Teredo at the edge because their relays are outside its control and RFC 7526 deprecates 6to4.
Drawing diagram…
Worked examples
Example 1: 6in4 tunnel MTU
The IPv4 path MTU is 1500. A 6in4 tunnel adds a 20-byte IPv4 header, so the IPv6 MTU inside the tunnel is 1500 - 20 = 1480 bytes. Set the tunnel interface to 1480.
Example 2: Clamping MSS
TCP over that 1480-byte tunnel should advertise an MSS of 1480 - 40 (IPv6) - 20 (TCP) = 1420 bytes. Clamping MSS to 1420 stops TCP from building segments the tunnel would have to fragment or drop.
Example 3: Why 6to4 is predictable but unreliable
6to4 maps a public IPv4 into 2002::/16: for IPv4 192.0.2.130 (hex c0 00 02 82) the 6to4 prefix is 2002:c000:282::/48. The mapping is deterministic, but the return path depends on an uncontrolled anycast relay, which is why RFC 7526 deprecates it.
Lab
Goal: Connect an IPv6 island across an IPv4-only core with 6in4, then fix the MTU problems.
You need: a containerlab topology (Linux + FRR) with two routers joined by an IPv4-only link, each with an IPv6 "island" behind it; ping/ping6, tracepath/tracepath6 and tcpdump.
- Bring up a 6in4 tunnel (protocol 41) between the two routers and confirm small IPv6 pings cross the core.
- Leave the tunnel MTU at the default and transfer a large file or send large pings; observe the black-hole (small works, large hangs).
- Set the tunnel interface MTU to 1480 and re-test large traffic.
- Add MSS clamping to 1420 on the tunnel and confirm TCP transfers complete.
- Try (in a sandbox) enabling 6to4 and note the uncontrolled relay dependency; then confirm your edge blocks 6to4 and Teredo, citing RFC 7526.
What to submit: the tunnel and MTU/MSS configuration, before/after captures of the large-transfer failure and fix, and a short note on why 6to4/Teredo are blocked.
Summary
- Tunnel IPv6 over IPv4 with configured 6in4 (proto 41) or GRE between endpoints you control (RFC 4213, RFC 7059).
- Always set the tunnel MTU (6in4 over 1500 = 1480) and clamp MSS to avoid black-holes.
- 6rd (RFC 5569, RFC 5969) is a provider-scoped automatic tunnel using the ISP's own prefix — a valid stepping stone.
- 6to4 (RFC 3056) is deprecated by RFC 7526, and Teredo (RFC 4380, UDP 3544) is unreliable; recognise and disable both.
- Next lesson (L6.03): stateless translation (SIIT) and address mapping.
Quiz imported · 9 questions · pass mark 70%. Lab questions are not auto-marked.