IPv6 over IPv4 tunneling

Implementation

IPv6 over IPv4 tunneling enables isolated IPv6 networks to communicate, as shown in Figure 116.


[NOTE: ]

NOTE:

The devices at both ends of an IPv6 over IPv4 tunnel must support the IPv4/IPv6 dual stack.


Figure 116: IPv6 over IPv4 tunnel

The IPv6 over IPv4 tunnel processes packets by using the following steps:

  1. A host in the IPv6 network sends an IPv6 packet to Device A at the tunnel source.

  2. After Device A receives the IPv6 packet, it processes the packet as follows:

    1. Searches the routing table to identify the outgoing interface for the IPv6 packet.

      The outgoing interface is the tunnel interface, so Device A knows that the packet needs to be forwarded through the tunnel.

    2. Adds an IPv4 header to the IPv6 packet and forwards the packet through the physical interface of the tunnel.

      In the IPv4 header, the source IPv4 address is the IPv4 address of the tunnel source, and the destination IPv4 address is the IPv4 address of the tunnel destination.

  3. Upon receiving the packet, Device B de-encapsulates the packet.

  4. If the destination address of the IPv6 packet is itself, Device B forwards it to the upper-layer protocol. If it is not, Device B forwards it according to the routing table.

Tunnel modes

IPv6 over IPv4 tunnels include manually configured tunnels and automatic tunnels, depending on how the IPv4 address of the tunnel destination is obtained.

The source IPv4 addresses for all IPv6 over IPv4 tunnels are manually configured.

According to the way an IPv6 packet is encapsulated, IPv6 over IPv4 tunnels are divided into the modes shown in the following table:

Table 10: IPv6 over IPv4 tunnel modes and key parameters

Tunnel mode

Destination IPv6 address format

Manually configured tunnel

IPv6 over IPv4 manual tunneling

Ordinary IPv6 address.

Automatic tunnel

Automatic IPv4-compatible IPv6 tunneling

IPv4-compatible IPv6 address. The address format is 0:0:0:0:0:0:a.b.c.d/96, where a.b.c.d is the IPv4 address of the tunnel destination.

NOTE:

The tunnel source also uses an IPv4-compatible IPv6 address.

6to4 tunneling

6to4 address. The address format is 2002:abcd:efgh:subnet number::interface ID/48.

  • 2002 is the fixed IPv6 address prefix.

  • abcd:efgh represents a 32-bit globally unique IPv4 address in hexadecimal notation.For example, 1.1.1.1 can be represented by 0101:0101. The IPv4 address identifies a 6to4 network (an IPv6 network where all hosts use 6to4 addresses). The border router of a 6to4 network must have the IPv4 address abcd:efgh configured on the interface connected to the IPv4 network.

  • The subnet number identifies a subnet in the 6to4 network.

  • The subnet number::interface ID uniquely identifies a host in the 6to4 network.

NOTE:

The destination IPv4 address of a 6to4 tunnel is embedded in the destination 6to4 address. This mechanism enables the device to automatically obtain the tunnel destination address.

ISATAP tunneling

ISATAP address. The address format is prefix:0:5EFE:abcd:efgh/64.

  • The 64-bit prefix is a valid IPv6 unicast address prefix.

  • The abcd:efgh/64 segments represent a 32-bit IPv4 address, which identifies the tunnel destination but does not require global uniqueness.