Hyper-V Networking and Virtual Switches Overview

0

Microsoft Hyper-V, which is a very common virtualization platform for Windows based servers especially with the Windows Server 2008 R2 role, utilizes a different method of networking virtual machines than Microsoft’s VirtualPC (or XP mode on Windows 7 operating systems.) With VirtualPC the VMs hardware calls are sent to the host operating system, and then to the underlying hardware. With Hyper-V, virtual machines can communicate directly with the hardware.

Managing Physical NICs Using the Hyper-V Virtual Switch

In today’s world of a $1,000 Xeon DP setup capable of handling 192GB of RAM for eight physical and sixteen logical cores, one issue clearly exists, the number of virtual machines running on a system can simply overwhelm onboard NICs with requests. Microsoft uses the Virtual Switch concept to get around this limitation by creating an abstraction layer between the host operating system and its TCP/IP stack (for example Windows Server 2008 R2) and the physical NIC(s). Here is a quick illustration:

Hyper-V External Virtual Network Illustration
Hyper-V External Virtual Network Illustration

By inserting the Hyper-V networking abstraction layer and utilizing the Virtual Network Switch Protocol, Microsoft is able to manage requests to a physical NIC through vNICs and Virtual Switches.

Using Different Virtual Network Types

The simple virtual network example shown above has a few variations in the Hyper-V context. This is called an external virtual network which has access to the physical NIC and can send data to the external network and Internet. There are a few limitations of the external virtual network, namely that the virtual network needs to be bound to a physical NIC and that each physical NIC can only be bound to one external virtual network.

A second virtual switch and network example is the internal network virtual network. This virtual network is not bound to a physical NIC and cannot connect to the Internet or the local area network outside of the virtual machine. This internal switch type is basically a way to create a private network between virtual machines and also between the virtual machines and the host operating system.

Hyper-V Internal Virtual Network
Hyper-V Internal Virtual Network

A third virtual network is a virtual private network for the virtual machines. The virtual private network in Hyper-V allows virtual machines to communicate with each other, but they cannot communicate with the external network. One differentiator between the internal virtual network and the virtual private network is that in the virtual private network setting, the virtual machines cannot access the host operating system through the virtual network.

Hyper-V Virtual Private Network
Hyper-V Virtual Private Network

One very important caveat should be mentioned before this piece concludes. While Hyper-V virtual networks are a very simple concept, and simple to implement, one needs to be careful about CPU utilization with virtual private networks. In Hyper-V virtual networks, the CPU emulates both the vNICs and the virtual switches. The effect is that high CPU utilization can cause significantly lower network performance. In some applications, using external networking can actually be beneficial from a performance standpoint.

Conclusion

Overall, Microsoft Hyper-V virtual networks are a simple concept and very simple to setup. If one has a Hyper-V server, it is worth taking a few minutes to test various virtual network configurations. Hopefully this article helped explain some of the differences between the different virtual network types.

Feel free to discuss this in the ServeTheHome.com Forums!

LEAVE A REPLY

Please enter your comment!
Please enter your name here