Transition Mechanisms
Tunneling

The general principle of tunneling is depicted in the figure below.

Tunneling

Each tunnel has generally the two ends and each end has its own IP address. If the device at one end of tunnel decides that the IPv6 datagram should be sent through the tunnel, the device takes the IPv6 datagram and inserts them as the data to newly created IPv4 datagram. The decision is done based on the routing table or special address of the target node in the incoming IPv6 datagram. Destination address of new IPv4 datagram will be an IPv4 address of the second end of the tunnel and source address will be an IPv4 address of the local end of the tunnel. The value 41 is inserted into the Protocol field in IPv4 datagram header. The value 41 represents the tunneled IPv6 datagram.

After that the datagram is sent in the normal way to the second end of the tunnel through IPv4 network. According the value 41, the devices at the second end of the tunnels recognizes that it is the tunneled IPv6 datagram and unpacks an IPv6 datagram and processes it based on its destination IPv6 address and routing table. Passage of the IPv6 datagram through the tunnel is counted as one hop in terms of IPv6. Therefore, the device at the second end of the tunnel will reduce the Hop Limit field in IPv6 datagram header by one.

There are two tunneling modes in the case of IPv4 and IPv6 cooperation: