Q. What's the relationship between a virtual switch and a physical NIC? Should each virtual machine (VM) have its own virtual switch?

A. A network adapter is the physical network card in the Hyper-V host that connects to physical networks. A virtual switch is a network you create within Hyper-V. The virtual switch connects to virtual NICs that you add to VMs. A virtual switch can be bound to a physical NIC, allowing VMs that have their virtual NICs connected to the virtual switch to access physical networks through the NIC. The network formed by the virtual switch and physical NICs is called an external virtual network.

It's also possible to have virtual switches that don't bind to physical network cards. This type of switch can only be used by VMs to communicate with one another (and possibly the Hyper-V host, depending on the type of switch). This is an internal or private virtual network, depending on if the host has access to the switch.

The different types of virtual networks are illustrated here.

Click to expand.

So should each VM have its own virtual switch? The answer depends on the network load and security requirements of the guest. For example, if I had a VM that was creating a huge amount of network traffic, I would probably create a separate virtual switch for that VM that is bound to a physical NIC of its own on the Hyper-V host. Giving it a NIC of its own would ensure that the VM had dedicated network bandwidth.

You can tag virtual switches with Virtual LAN (VLAN) tags, so you may want to create separate virtual switches for the purposes of VLAN. You can also create multiple virtual switches that don't bind to a physical NIC for different guest-to-guest and guest-to-host communication purposes.

Generally, you won't create a separate virtual switch for each guest. Instead, you'll allow them to share a virtual switch, and therefore share a physical NIC. Your exact requirements and load may dictate a different arrangement.

Related Reading:

Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.