Hyper-V Network Types

 Feb 27, 2015

When working with Hyper-V, you’ll often need some form of connectivity between the world, the VMs, the host etc. You need a virtual switch. Each virtual switch can have an unlimited number of virtual machines connected to it.

There are three types of virtual switch available to you in Hyper-V.

External
External virtual switches allow communication between virtual machines running on the same Hyper-V host, Hyper-V parent partition and virtual machines running on a remote Hyper-V host. It requires a physical network adapter on the Hyper-V Host that is not mapped to any other External Virtual Network Switch. This means you can create External virtual switches as long as you have physical network adapters that are not mapped to any other external virtual switches.

Internal
Internal virtual switches can be used to allow communication between virtual machines connected to the same switch and also allow communication to the Hyper-V parent partition. You can create any number of internal virtual switches, irrespective of the number of physical NICs.

Private
Private virtual switches can be used to allow communication between virtual machines connected to the same virtual switch. Virtual Machines connected to this type of virtual switch cannot communicate with Hyper-V parent partition. You can create any number of Private virtual switches, irrespective of the number of physical NICs.

You can create virtual switches through the Hyper-V Manager or via PowerShell.

hyper-v-network-types

 

hyper-v-network-types

From PowerShell, you can use the New-VMSwitch cmdlet in a sense similar to the below: New-VMSwitch -Name "MySwitch" -NetAdapterName "Ethernet" -AllowManagementOS $true

It only has a few options but covering them all in detail is beyond the scope of this post.

You can review them all via Get-Help or on TechNet.

One note, when the Connection type of your new virtual switch is set to External network, you'll see that the computers physical NICs are shown in the drop down text box and that the Allow management operating system to share this network adapter check box is selected.

hyper-v-network-types

hyper-v-network-types

To understand what this check box selection means, think of it as saying Allow host machine and virtual machine to use the same network card. In order for both machines to use the same network card to access the physical network, the Virtual Switch Manager actually creates two virtual network cards, one for the host machine and one for the virtual machine, and then connects these to the virtual switch.

The virtual switch is then connected to the physical NIC selected, which is already connected to the physical network. Hopefully this post explains the types and enables you to get the virtual switches you need.

For more information, have a look at New Horizons' course: 20409 - Server Virtualisation with Windows Server Hyper-V and System Center.

Happy Switching!

 

How do your Excel skills stack up?   

Test Now  

About the Author:

Steve Wiggins  

Steve is a highly experienced technical trainer with over 10 years of specialisation in Software Application Development, Project Management, VBA Solutions and Desktop Applications training. His practical experience in .NET programming, advanced solution development and project management enables him to train clients at all levels of seniority and experience. Steve also currently manages the IT infrastructure for New Horizons of Brisbane, providing him with daily hands-on experience with SCCM, Windows Server 2012 and Windows 8.

Read full bio
top
Back to top