The transition tunnel (IPv6 over IPv4) technology provides a way to transfer the IPv6 data with the existing IPv4 routing system: the IPv6 packet is encapsulated in the IPv4 packet as unstructured data and transmitted through the IPv4 network. According to the different setup modes, the transitional tunnels can be divided into manual tunnels and automatic tunnels. The transition tunnel technology skillfully utilizes the existing IPv4 network, its significance lies in providing a way to enable IPv6 nodes to communicate during the transition period, but it cannot solve the intercommunication problem between IPv6 nodes and IPv4 nodes. Transition tunnels are divided into manual type and automatic type. The corresponding relationship between the types and the modes is as follows:
Table 11-1 Transition tunnel mode
Tunnel Type
|
Tunnel Mode
|
Tunnel Source/Destination Address
|
Tunnel Interface Address
|
Manual tunnel
|
IPv6 over IPv4 manual tunnel
|
The source/destination address is the manual configured IPv4 address
|
IPv6 address
|
Auto tunnel
|
IPv4 compatible IPv6 auto tunnel
|
The source address is the manual configured IPv4 address, and the destination address does not need to be configured
|
IPv4 compatible IPv6 address, the format is ::a.b.c.d/96
|
6to4 tunnel
|
6to4 address, the format is: 2002:a.b.c.d::/48
|
ISATAP tunnel
|
ISATAP address, the format is: Prefix:0:5EFE:a.b.c.d/64
|
- IPv6 over IPv4 manual tunnel
This kind of tunnel is established manually. The terminal address of the tunnel is determined by the configuration. It is not necessary to assign special IPv6 addresses to the nodes. It is suitable for the IPv6 nodes that often communicate.
- IPv4 compatible IPv6 auto tunnel
IPv4 compatible IPv6 auto tunnels are point-to-multipoint tunnels. Special IPv6 addresses are adopted at both ends of the tunnel in the form of: a.b.c.d/96, in which a.b.c.d is IPv4 address. This embedded IPv4 address is automatically used as the end of the tunnel in the process of tunnel encapsulation, which makes the establishment of the tunnel very convenient. But the IPv4 compatible IPv6 address still depends on the IPv4 address in application, and this limitation cannot be changed, so IETF has abandons this kind of address in the new standard, and this kind of tunnel will be eliminated gradually.
The 6to4 tunnel is a point-to-multipoint tunnel. Special IPv6 addresses are required at both ends of the tunnel in the format of 2002:a.b.c.d:/48, in which 2002 represents a fixed IPv6 address prefix and a.b.c.d represents the unique 32-bit IPv4 address corresponding to the 6to4 tunnel. This embedded IPv4 address is automatically used as the end point of the tunnel in the process of tunnel encapsulation, which makes the establishment of the tunnel very convenient. Therefore, the nodes using the 6to4 mechanism must have at least one unique IPv4 address in the world. This mechanism is suitable for the intercommunication between the nodes running IPv6. Since the first 48 bits in the IPv6 address prefix of 6to4 have been determined by the fixed number plus the IPv4 address, the remaining 16 bits subnet number can be defined by the user himself, which makes it more flexible to use the IPv4 network to realize the interconnection of the IPv6 network. 6to4 overcomes the limitation of IPv4 compatible IPv6 automatic tunnel.
ISATAP (Intra-Site Automatic Tunnel Addressing Protocol) tunnels are point-to-multipoint automatic tunnels. Special IPv6 addresses are required at both ends of the tunnel in the format of Prefix: 0:5EFE: a.b.c.d/64, where Prefix represents any valid IPv6 unicast address prefix, and a.b.c.d represents 32-bit IPv4 address (not required to be globally unique). The embedded IPv4 address is automatically used as the end point of the tunnel during the tunnel encapsulation, so this kind of tunnel is also built automatically.
- Transition tunnel encapsulation
When IPv6 packets are sent through transitional tunnels, an IP header is added to the tunnel header, the protocol number in the IP header is 41, the source address in the IP header is set to the source address of the tunnel, and the destination address in the IP header is set according to the type of the tunnel: if it is a manual tunnel, it is set as the configured tunnel destination address, and if it is an automatic tunnel, it is set as the IPv4 address embedded in the IPv6 address.
- The structure of the transition tunnel packet
IPv4 Header
|
IPv6 Header
|
IPv6 Packet Payload
|
IPv6 Packet Payload: The payload of the IPv6 packet before entering the tunnel, which serves as the valid payload of the tunnel packet.
IPv6 Header: The header of the IPv6 packet before entering the tunnel.
IPv4 Header: The encapsulated outer IPv4 header, which is the transmission tool of the IPv6 packet across the IPv4 network.
- The forwarding of the transition tunnel packet
After the packet is encapsulated at the beginning of the transition tunnel, select the route according to the encapsulated destination address, and then, send the packet from the corresponding network interface. The intermediate device forwards it as an ordinary IP packet until the packet reaches the end of the tunnel.
- The encapsulation/de-capsulation of the transition tunnel packet
The de-capsulation process and the encapsulation process are opposite. The tunnel end first analyzes the IPv4 header after receiving the packet. If the destination address is its own address, check the protocol field of the IP header. If the protocol field is 41, hand over the packet to the transition tunnel for processing. After the tunnel removes the IPv4 header of the packet, select the route according to the destination address of the packet after de-capsulation, and perform the subsequent processing according to the result of the route selection.