IPv6 over IPv4 tunneling
Implementation
IPv6 over IPv4 tunneling enables isolated IPv6 networks to communicate, as shown in Figure 116.
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:
A host in the IPv6 network sends an IPv6 packet to Device A at the tunnel source.
After Device A receives the IPv6 packet, it processes the packet as follows:
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.
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.
Upon receiving the packet, Device B de-encapsulates the packet.
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.
Manually configured tunnel—The destination IPv4 address of the tunnel cannot be automatically obtained from the destination IPv6 address of an IPv6 packet at the tunnel source. It must be manually configured.
Automatic tunnel—The destination IPv4 address of the tunnel can be automatically obtained from the destination IPv6 address (with an IPv4 address embedded) of an IPv6 packet at the tunnel source.
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.
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.
|
IPv6 over IPv4 manual tunneling—A point-to-point link. This type of tunneling provides the following solutions:
Connects isolated IPv6 networks over an IPv4 network.
Connects an IPv6 network and an IPv4/IPv6 dual-stack host over an IPv4 network.
Automatic IPv4-compatible IPv6 tunneling—A point-to-multipoint link. Automatic IPv4-compatible IPv6 tunnels have limitations because IPv4-compatible IPv6 addresses must use globally unique IPv4 addresses.
6to4 tunneling
Ordinary 6to4 tunneling—A point-to-multipoint automatic tunnel. It is used to connect multiple isolated IPv6 networks over an IPv4 network.
6to4 tunneling uses an IPv4 address to identify a 6to4 network. This method overcomes the limitations of automatic IPv4-compatible IPv6 tunneling.
6to4 relay—Connects a 6to4 network and an IPv6 network that uses an IP prefix other than 2002::/16. A 6to4 relay router is a gateway that forwards packets from a 6to4 network to an IPv6 network.
As shown in Figure 117, 6to4 network Site 1 communicates with IPv6 network Site 3 over a 6to4 tunnel. Configure a static route on the border router (Device A) in the 6to4 network. The next hop address must be the 6to4 address of the 6to4 relay router (Device C). Device A forwards all packets destined for the IPv6 network over the 6to4 tunnel, and Device C then forwards them to the IPv6 network.
Figure 117: Principle of 6to4 tunneling and 6to4 relay
ISATAP tunneling—A point-to-multipoint automatic tunnel. It provides a solution to connect an IPv6 host and an IPv6 network over an IPv4 network. ISATAP tunnels are mainly used for communication between IPv6 routers or between an IPv6 host and an IPv6 router over an IPv4 network.
Figure 118: Principle of ISATAP tunneling