Patent ID: 9723521
Date: 2017-08-01
CPC Classifications: H04L,H04W

Claim:
1. A network handover method, implemented by a terminal comprising a first physical network adapter, a second physical network adapter, and a virtual network adapter operably disposed in the terminal and coupled to the first physical network adapter and the second physical network adapter, wherein the method comprises: establishing, by the terminal, a Transmission Control Protocol (TCP) connection between the terminal and a target device using an Internet protocol (IP) address of the virtual network adapter as a source IP address and an IP address of the target device as a destination address; converting, by the terminal, a source IP address of a first data packet from the IP address of the virtual network adapter into an IP address of the first physical network adapter when the terminal accesses a first network, wherein a destination address of the first data packet is the IP address of the target device; sending the converted first data packet of which the source IP address is the IP address of the first physical network adapter to a gateway, wherein the gateway forwards the converted first data packet to the target device according to first forward mapping information sent by a controller, wherein the first forward mapping information comprises a mapping relationship between a first TCP four-tuple and a destination TCP four-tuple corresponding to the target device, wherein the source IP address is the IP address of the first physical network adapter in the first TCP four-tuple, wherein a destination IP address is the IP address of the target device in the first TCP four-tuple, wherein the source IP address is an IP address of the gateway in the destination TCP four-tuple, and wherein the destination IP address is the IP address of the target device in the destination TCP four-tuple; sending, by the terminal, a network handover notification to the controller when the terminal hands over from the first network to a second network, wherein the controller generates second forward mapping information according to the network handover notification and sends the second forward mapping information to the gateway, wherein the second forward mapping information comprises a mapping relationship between a second TCP four-tuple and the destination TCP four-tuple, wherein the source IP address is the IP address of the second physical network adapter in the second TCP four-tuple, and wherein the destination IP address is the IP address of the target device; converting, by the terminal, a source IP address of a second data packet from the IP address of the virtual network adapter into the IP address of the second physical network adapter when the terminal accesses the second network; and sending the converted second data packet of which the source IP address is the IP address of the second physical network adapter to the gateway, wherein the gateway forwards the second data packet to the target device according to the second forward mapping information.