A method for processing a packet, comprising: mapping, a virtual network card of a virtual machine installed in a physical host onto one virtual bridge of the physical host, wherein one virtual network card corresponds to one virtual machine, wherein a security domain to which the virtual machine corresponds is the same as a security domain corresponding to the mapped virtual bridge, thereby establishing, by the physical host, correspondence between a virtual machine MAC address in the physical host and the security domain, wherein the security domain refers to a set of computers trusting each other and capable of communicating with each other; and wherein a communication isolator implemented as network isolation software is set in an operation system of the physical host where the virtual machine is installed, and wherein when the virtual machine is installed in the physical host, the network communication isolation software provides one option list for a user, wherein each option in the option list corresponds to a security domain, and the network communication isolation software receives a selection result of the user, so that the MAC address of the installed virtual machine is mapped onto a virtual bridge corresponding to a selected security domain; receiving, by the physical host through a virtual bridge in the physical host, a network packet sent by a source virtual machine in the physical host, wherein the network packet carries a source MAC address and a target MAC address; obtaining, by the physical host according to the source MAC address and the target MAC address by querying the correspondence between each virtual machine MAC address and a security domain, a security domain to which the source virtual machine corresponds and a security domain to which a target virtual machine corresponds; and controlling, by the physical host, the virtual bridge to discard the network packet, when the security domain to which the source virtual machine corresponds is different from a security domain corresponding to the virtual bridge. mapping, a virtual network card of a virtual machine installed in a physical host onto one virtual bridge of the physical host, wherein one virtual network card corresponds to one virtual machine, wherein a security domain to which the virtual machine corresponds is the same as a security domain corresponding to the mapped virtual bridge, thereby establishing, by the physical host, correspondence between a virtual machine MAC address in the physical host and the security domain, wherein the security domain refers to a set of computers trusting each other and capable of communicating with each other; and wherein a communication isolator implemented as network isolation software is set in an operation system of the physical host where the virtual machine is installed, and wherein when the virtual machine is installed in the physical host, the network communication isolation software provides one option list for a user, wherein each option in the option list corresponds to a security domain, and the network communication isolation software receives a selection result of the user, so that the MAC address of the installed virtual machine is mapped onto a virtual bridge corresponding to a selected security domain; receiving, by the physical host through a virtual bridge in the physical host, a network packet sent by a source virtual machine in the physical host, wherein the network packet carries a source MAC address and a target MAC address; obtaining, by the physical host according to the source MAC address and the target MAC address by querying the correspondence between each virtual machine MAC address and a security domain, a security domain to which the source virtual machine corresponds and a security domain to which a target virtual machine corresponds; and controlling, by the physical host, the virtual bridge to discard the network packet, when the security domain to which the source virtual machine corresponds is different from a security domain corresponding to the virtual bridge.