Hyper-V Switch Types – (External vs Internal vs Private Virtual Switch)

Hyper-V Switch Types – (External vs Internal vs Private Virtual Switch). In this post, we will introduce Hyper-V virtual switch then explain about different types of Hyper-V switches.

Networking using Hyper-V can confuse new individuals in the virtualization world. Even if you have experience in other hypervisors, the Hyper-V virtual switch is a difficult concept to understand.

But once you invest time and understand the concept, it can become simple. This article about Hyper-V virtual switches and their types can help simplify your learning curve and minimize difficulties using Hyper-V.

With a detailed explanation of different concepts, you’ll find networking configuration one of the easiest concepts in the virtualization world.

So, without further delay, let’s start with Hyper-V Switch Types – (External vs Internal vs Private Virtual Switch).

What is a Hyper-V Virtual Switch?

You must first know that Hyper-V’s virtual switch is truly a virtual switch. Moreover, it is a software construct operating in the active memory of a Hyper-V host performing ethernet frame switching functionality.

Additionally, a virtual switch gives the network access to the virtual adapters on virtual machines. The access to the network varies on the type of virtual switch.

Albeit, Hyper-V virtual switches can use teamed or single physical network adapters to serve as uplinks to a physical switch. This helps to communicate with other computers on the physical network. Also, you need to know that Hyper-V network virtualization offers numerous capabilities, benefits, and functionality. 

Depending on the type of virtual switch in Hyper-V networking, they allow flexible workload replacement. All in all, it also simplifies moving workloads to a shared IaaS cloud on your windows server.

Basically, Hyper-V networking assists in easier managing decoupled servers, live migration across subnets, and network administration. Another key point, is that, it also simplifies the network, improves network/server resource utilization, and provides interoperability and ecosystem readiness.

You can use the policy based setup and comparability with existing infrastructure and emerging technology. Let’s dive further into understanding the uses of Hyper-V virtual switches.

Using Hyper-V Virtual Switches

A virtual switch on Hyper-V is a virtual network device that permits virtual cards to access the network. Besides, the Hyper-V virtual switch can operate in three modes: 

  • Private.
  • Internal.
  • Public.

However, the Hyper-V virtual switches are not similar to the IP address systems or other virtual networking settings.

You can use a virtual switch by creating it under the virtual switch manager wizard. Select the type of virtual switch you want to create by clicking on the ‘create virtual switch’ button.

Here’s what you should remember:

  • Only one virtual switch can support multiple virtual NIC connections.
  • Each virtual machine uses a virtual NIC to connect to a virtual switch.
  • A virtual and physical switch is a must for VM to server connectivity in the basic configuration.

Now let’s focus on the features offered by Hyper-V virtual switch in our article Hyper-V Switch Types – (External vs Internal vs Private Virtual Switch).

Features of the Hyper-V Virtual Switch

Look at multiple features offered by Hyper-V virtual switch.

1. Ethernet frame switching

Firstly, the Hyper-V virtual switch reads the MAC addresses in an Ethernet packet and delivers them to the correct destination. Also, it is also aware of the MAC addresses of virtual network adapters.

An external virtual switch also knows the MAC addresses on layer 2 networks that it has visibility to.

But the Hyper-V virtual switch doesn’t offer native routing (layer 3) capability. You need to provide a hardware or software router for that functionality.

2. 802.1q VLAN, Access Mode

You can assign virtual adapters for the management OS and virtual machines to a VLAN. It will deliver Ethernet frames to virtual adapters in the same VLAN, like a physical switch.

Certainly, if you configure trunking on the connected physical switch port, VLAN traffic can extend to the physical network. You don’t need to configure multiple virtual switches; every Hyper-V virtual switch allows untagged frames and all VLANs from 1 to 4096.

3. 802.1q VLAN, Trunk Mode

First, over 90% of the people who want to configure Hyper-V in trunk mode don’t need trunk mode. The setting applies only to individual network adapters.

While configuring a virtual adapter in trunk mode, Hyper-V passes allowed frames with the 802.1q tag intact.

As noted, if the software in the VM doesn’t know how to process frames, the VM’s OS will drop the frames. Few software applications can interact with the network adapters where they see the tag.

Consequently, it’s not possible even with Microsoft’s Routing and Remote Access Service. If you want a VM to have a layer three endpoint presence, you can use individual adapters in access mode.

4. SR-IOV (Single Root I/O Virtualization)

SR-IOV requires compatible hardware on your motherboard and physical network adapter. You have the option to connect a few virtual adapters to virtual functions.

Equally, Hyper-V virtual switch has minimal participation in IOV functions. At least, it means you have access to the full speed of the hardware.

However, the performance boost has a cost. The SR-IOV network adapters cannot function without a connection between the virtual switch and the LBFO adapter team. But it will work with the new Switch Embedded Team.

5. Extensibilit

Microsoft publishes an API you can use to make filter drivers for the Hyper-V virtual switch. For instance, System Center VM Manager provides a driver enabling Hardware Network Virtualization (HNV). Other possibilities include network scanning tools.

After understanding the features, it’s time to understand the modes of Hyper-V networking.

Types of Hyper-V Networking

Hyper-V networking has three modes. These modes are:

1. External Hyper-V Switch

A Hyper-V virtual switch in external mode enables communications between virtual adapters connected to VMs and the management OS.

It uses teamed or single physical adapters to connect to a physical switch, ‌allowing communications with other systems. The external type switch links with the physical network card of the Hyper-V host.

Virtual NCs can access the “physical” network if the physical NC connects to a device. The external switch can connect the VMs to the same network as the Hyper-V host. VMs will have an assigned IP address if a DHCP server is present.

You should not confuse an external switch with public IP addressing systems. Just use the same private IP address range for the adapters connected to an external virtual switch.

The external switch can communicate with devices which don’t connect to the Hyper-V host. And DHCP ensures the VM will receive an allocated IP address connected to the Hyper-V host network.

Once you assign a physical card to an external switch, the host cannot use it. While you construct the external switch, you can create a virtual network card attached to the switch.

It is possible if the Hyper-V host has one physical card accessible. Or if you have built a ‘teaming’ with the physical cards of the host.

The OS must get permission to share the network card while constructing the external switch. It can create a virtual network card for the Hyper-V host.

VM sharing an external switch with the host and a virtual network adapter can communicate with one another. It is because they can access the same network.

However, connecting a physical network adapter to over one external switch is impossible.

2. Internal Hyper-V Switch

Here, the internal switch is like the external switch. But the key distinction is that the internal switch doesn’t connect to a physical adapter on the Hyper-V host. It limits the network space available to virtual machines.

When creating an internal switch, the connected Hyper-V host creates a virtual card enabling the Hyper-V server for network access.

The internal switch is useful to create isolated labs while taking control of the Hyper-V host. You must configure an IP address to communicate with the Hyper-V host and the VMs connected to the internal switch. But they must be on the same network on the different network cards.

It enables direct communication between the management OS and VMs that share the same internal switch with virtual adapters. The internal switch differs from the physical one because the management OS cannot have a virtual adapter on private switches.

However, the internal switch doesn’t uplink to the other switches because it lacks connection to a physical adapter.

3. Private Hyper-V Switch

A private Hyper-V switch is a virtual switch that isolates the virtual machines. You don’t have network switching between the Hyper-V host and the virtual machines. The private Hyper-V switch enables restoration testing in a safe, isolated environment.

Especially, it allows communications between the virtual machines on its host. Even the management OS doesn’t take part.

The switch is logical and doesn’t use any physical adaptor. Also, the word ‘private’ doesn’t associate with a private IP address. You can compare it with a switch incapable of up linking to other switches.

The isolation capabilities of private switches are excellent, which makes it ideal to use them for your server cluster.

No traffic on a private switch can escape the host. However, you can isolate your guests by connecting an external switch and a VM to the isolation network or networks.

Thank you for reading Hyper-V Switch Types – (External vs Internal vs Private Virtual Switch). We shall conclude. 

Hyper-V Switch Types - (External vs Internal vs Private Virtual Switch) Conclusion

If we  summarize the three modes of Hyper-V switches are capable for:

  • External switch: It links to a physical card of the Hyper-V host and enables network access.
  • Internal switch: The switch isolates the VM but enables network switching between the Hyper-V host and the VMs.
  • Private Switch: It completely isolates the network from VMs.

Now you understand different types of Hyper-V networking. Eventually, you can choose an operational model of Hyper-V Virtual Switch properties to suit your needs. At the same time, it can help you set up a new virtual switch for your server. You can ensure high performance for business scalability and transform your existing ecosystem.

Please take a look at more Hyper-V content here

Avatar for Hitesh Jethva
Hitesh Jethva

I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x