Described above for QEMU in the front-end network flow path of the establishment of a detailed description, the packet from the host's physical network card through the host Linux kernel Bridge, through the tap device to reach the QEMU user state space. And how does QEMU send the packet to guest, it is necessary to talk about the establishment of virtual network card.
When the command line passes in the NIC-related parameters, qemu resolves the network-related parameters and enters the virtual network card creation process. As mentioned above, all-net types of devices are treated as a net client. Before the net client is established, it is necessary to create a hub inside QEMU and a corresponding port to correlate each net client, and for each-net type of device created it can be configured with the VLAN number of its interface. This controls the forwarding of packets within the VLAN in which they are configured to switch between multiple virtual devices.
[Click to view the full text]
http://luoye.me/2014/07/20/netdev-virtual-2/
QEMU Network Device full virtual Solution II: Creation of virtual network card