Hyper-V Networking – Virtual Switches

There are three types of virtual switches that may be created in the Virtual Switch Manager. They are External, Internal, and Private. Let’s briefly take a look at the differences between these types of switches.

Types of Virtual Switches

External – This type of switch is bound to the physical network cards located in the host. As you would imagine, they provide VMs located on these switches with access to the physical network the Hyper-V host is connected to. The External switch can also share management traffic as well as VM traffic on the same switch and this is one of the options that can be set when creating the external switch.

Internal – This switch is not bound to a physical network card so only allows traffic between VMs and the host itself. However, a new addition to the Internal switch functionality in 2016 is the addition of the NAT forwarding internal switch which does allow external connectivity via NAT from the Hyper-V host.

Private – This type of switch is only used for virtual machines to communicate with each other. This type of switch might be useful for certain specific types of traffic such as cluster network if only using one host as it can’t be utilized between hosts.

How to create Virtual Switches in Hyper-V?

Click Create Virtual Switch. We will first create an External switch as this type of switch is required to allow connectivity to our guest VMs to the physical network.

Choose a meaningful name for the Virtual Switch. Also, creating External switches require that we choose the physical network adapter to use for connectivity. Additionally, you can choose to allow management operating system to share this network adapter which means management connectivity to your Hyper-V host will also use this adapter. You can uncheck this box if you have a separate management network adapter or if you will create one manually at a later time. Unchecking will yield the warning that you may lose access to the host unless you have another network adapter used for management communication.

Applying the changes will result in a lost ping or two, but no major disruptions.

After the switch is created, we now have a virtual switch that we can use when creating a virtual machine for network communication to the outside world.

Thoughts

In this post, we looked at the differences between the various virtual network switches in Hyper-V and what each can be used for along with creating our first external network switch to allow VM connectivity. In the next post, we will take a look at copying over installation media and creating our first virtual machine on the Hyper-V host along with the various settings and options to be configured.