a
second gateway, where the IPv4 address included in the destination IPv6
address is an IPv4 address of the second gateway or an IPv4 address
designated by the second gateway, the second gateway is a device
connecting an IPv6 network to an IPv4 network, or a device connecting a
layer 2 network to an IPv4 network, and IPv6 addresses of all IPv6
terminals connected to the second gateway include the same IPv4 address.

[0032] Optionally, if the IPv4 address of the gateway or designated by the
gateway may be a compressed IPv4 address, when the first gateway
encapsulates the IPv6 packet in the IPv4 packet of which the destination
address is the IPv4 address, the first gateway first recovers the
compressed IPv4 address, and then encapsulates the IPv6 packet in an IPv4
packet of which a destination address is themay be used
when the second terminal sends an IPv6 packet to the first terminal, and
the only difference is that the first terminal and the second terminal
need to interchange their roles, and the first gateway and the second
gateway need to interchange their roles. For example, when an IPv6 packet
sent by the second terminal is sent to the second gateway, the second
gateway encapsulates the IPv6 packet in an IPv4 packet, where the IPv4
packet has a destination IPv4 address being the IPv4 address of the first
gateway. Further, the second gateway sets a protocol type value of the
IPv4 packet to a specific value, so that the first gateway parses the
received IPv4 packet to obtain the IPv6 packet.

[0058] In this embodiment, by using an IPv4 address of a gateway as a
destination IPv4 address