摘要 |
The present invention provides a network communication method and device. The method includes: receiving, by a VNC on a physical host, a network communication packet sent by a first virtual machine of which a host machine is the physical host and which has a mapping relationship with the VNC, where a source address carried in the network communication packet is an address of the first virtual machine, a destination address carried in the network communication packet is an address of a second virtual machine or an address of another physical host; selecting, by the physical host, a VPN network corresponding to the VNC on the physical host according to preset correspondence between the VPN network and the VNC; and sending, by the physical host, the network communication packet through the selected VPN network. The present invention lowers the restriction on setting an IP address of a virtual machine in a VPN.
|