Patent ID: 8909812

Claim:
A method for data communication for a host device with an IPv4 application, comprising: generating, by the IPv4 application, an IPv4 data packet to be sent to a communication opposite end; and converting, by the host device, when determining that the type of a network the host device lies in is an IPv6 network, an IPv4 packet header of the IPv4 data packet into an IPv6 packet header, and sending the converted data packet to the communication opposite end via the IPv6 network, wherein, converting the IPv4 packet header of the IPv4 data packet into the IPv6 packet header by the host device comprises: combining, by the host device, an IPv4 source address in the IPv4 packet header of the IPv4 data packet with a pre-allocated IPv6 prefix to generate an IPv6 source address in the IPv6 packet header; and combining an IPv4 destination address in the IPv4 packet header of the IPv4 data packet with a prestored well-known prefix to generate an IPv6 destination address in the IPv6 packet header.