Click here to monitor SSC
Av rating:
Total votes: 50
Total comments: 0


Nirmal Sharma
Microsoft Hyper-V Networking and Configuration - Part 1
11 December 2009


In the first of a series of articles on Hyper-V Networking,  Nirmal explains Hyper-V networking and VLAN tagging, and shows how to set up a Virtual Network switch. Once this is done, the Hyper-V Virtual Network Switches can be used to connect unlimited no. of Virtual Machines.

Most of the article talks about Hyper-V Networking. It doesn’t really elaborate on basics of Networking. Instead the article focuses more on the Hyper-V Networking and VLAN Tagging with examples.

The first article in this series explains the following topics:

  • Virtual Networking Overview
  • Hyper-V Virtual Network Switch Overview
  • Microsoft Hyper-V Virtual Network Switch Types
  • Microsoft Hyper-V Virtual Network Maximum configuration
  • What happens when you create a Virtual Network Switch?

Terms Used Throughout This Article:


Parent Partition
A Windows Server 2008 running Hyper-V Role is called the Parent Partition or Root Partition. The Operating System (Windows Server 2008) running on the Root is the “Management Operating System”. Parent Partition is responsible to create Child Partition and also controls the communications between all the Virtual Machines.
Child Partition
A Virtual Machine running on Hyper-V Server is called the Child Partition. The Parent Partition creates the Child Partition.
Virtual Switch or
Virtual Network
Switch
A Virtual Switch is a software component of Virtualization Software. Virtual Machines are connected to Virtual Switch in order to allow communications between Virtual Machines. A Virtual Switch, just like Physical Switch, does more than communications.
VLAN
A VLAN is a Virtual LAN. A VLAN is a method of creating independent logical networks. VLAN is a broadcast domain created by the physical or virtual switches.
VLAN ID
A unique number called the VLAN ID identifies the each VLAN. Each VLAN is separated by assigning unique VLAN ID.
VLAN Trunk
and
Access Modes
There are two modes a particular port on a Virtual or Physical Switch can operate in; Access Mode and Trunk Mode. Access Mode is used for end devices that will not require access to multiple VLANs. Trunk Mode is used for passing multiple VLANs to other network devices that need to have communication to multiple VLANs on one occasion.
Integration
Services
Component
A Hyper-V component used to enhance the performance of Virtual Machines running on Hyper-V. The Integration Services component is similar to the VM Additions of Virtual PC but it’s more than that in the functionality.
VMBUS
VMBUS is a logical inter-partition communication channel. VMBUS allows Virtual Machines to access hardware resources faster. VMBUS is available only when you install the Integration Service Components on the Virtual Machines running on Hyper-V

Virtual Networking Overview

Virtualization has been in the market for a long time. Every vendor has to design the Virtualization software in such a way that it dictates the physical environment. This includes physical networking as well.

Virtual Networking operates at Layer 2. Layer 2 cannot perform IP Routing which is basically done by the Layer 3 switches. Microsoft Hyper-V and VMWare both implement Virtual Networking. Virtual Networking is designed to meet the requirement to move from the physical to the virtual environment. Microsoft Hyper-V Virtual Networking has been designed as part of its Virtualization Software; Hyper-V. Microsoft entered into the Virtualization market recently. The way that the underlying components of Microsoft Hyper-V Networking behaves are completely different from VMWare. This series of articles does not compare Virtual Networking within Hyper-V and VMWare: Instead, it focuses only on Microsoft Hyper-V Virtual Networking technology.

In the Virtual World, there are no fundamental limitations. It is the responsibility of the vendor  to improve the way that Virtual networking works in the implementation of the Virtual component. Microsoft Hyper-V has been designed to improve Virtual Networking by introducing new Networking Technologies. I'll elaborate on this later on in this series of articles.

Hyper-V Virtual Network Switch Overview

Virtual Network Switch implementation in Hyper-V provides the following functionality:

  • Virtual Network Switch operates at Layer 2.
  • Switch maintains a table called MAC Table. This MAC Table contains the MAC Addresses of Virtual Machines connected and the Virtual Machine names.
  • Hyper-V Virtual Network Switch has a learning algorithm in which it learns the MAC address of a Virtual Machine. This MAC Address, once learned, is stored in the MAC Table of the switch.
  • Unlimited Virtual Machines can be connected to a Virtual Network Switch.

Microsoft Hyper-V Virtual Network Switch Types

Microsoft Hyper-V implements three types of Virtual Switches or Networking Types as shown in figure 1.1.

FIGURE 1.1 – Hyper-V Virtual Network Types

As you can see in Figure 1.1, there are four networking types or Virtual Switches in Hyper-V. There is one more type called Dedicated. This is either not visible or not available in Hyper-V Virtual Network Manager. You see only three types. We will discuss the Dedicated type later in this article series.

Before I get into more details, let me explain you the default configuration of Hyper-V Networking. In a default Hyper-V implementation:

  • There are no virtual Network Switches created.
  • Virtual Machines created on Hyper-V Networking are not associated with any of the Virtual Network Switch types shown in Figure 1.1.
  • There is no Network Adaptors configured in Virtual Machines (depending on the guest Operating Systems).

The default Hyper-V Implementation looks like as shown below in Figure 1.2:

FIGURE 1.2 – Hyper-V Default Implementation and Network Configuration

As you can see in Figure 1.2, there are three VMs created on Hyper-V Server; VM1, VM2 and VM3. By default, these VMs are not associated with the Virtual Network Switch and cannot have any communication with each other. If any of the VMs running on Hyper-V (VM1, VM2 and VM3) need to have communication with Server1 on physical LAN then they can’t because Virtual Network Switch is not created by default.

Coming back to Virtual Network Switch types; you create Virtual Switches using the Virtual Network Manager found in the Action Pane on the right-hand side of the Hyper-V Manager.

As shown in figure 1.1, the “External” Virtual Network Switch allows you to have communication with Parent Partition of Hyper-V, Virtual Machines running on same Hyper-V Server, Virtual Machines running on Remote Hyper-V Server, and physical servers on the LAN. The External Network Switch requires that you have at least one Physical NIC (e.g. not associated with any other Virtual Network Switch). You can have one External Virtual Network Switch per Physical NIC.

One thing you notice is the remark column for “External” Virtual Network Switch. It says “Conn. Lost Temporarily”, that means, connection is lost temporarily if you create an External Virtual Network Switch. Why so? The External Virtual Network Switch is mapped to a physical NIC on the Hyper-V Server. This is basically a binding of Virtual Network Services to a Physical NIC.

The “Internal” Virtual Network Switch allows you to have communication between Parent Partition of Hyper-V and the Virtual Machines running on the same Hyper-V Server. You cannot have communication with any other VMs which are associated with a different Virtual Network Switch or physical servers. Internal Virtual Network Switch does not require the availability of Physical NIC as communication happens internally or on the same Hyper-V Server. You can create Internal Virtual Network Switch without the Physical NIC also.

The “Private” Virtual Network Switch allows you to have communication between only the Virtual Machines running on the same Hyper-V Server. Communications are allowed only between the Virtual Machines which are connected to that Internal Virtual Network Switch.

Hyper-V Virtual Networking Maximum Configuration

FIGURE 1.3 – Virtual Network Types and Maximum Configuration

As you can see in figure 1.3, Hyper-V Virtual Machine supports two types of Networking Cards; Legacy and VMBus NICs. The support for Legacy Network Card is included for Guest Operating Systems which are not supported by Hyper-V. There can be 4 Legacy Network Adaptors. You install a Legacy Network Adapter from the property of Virtual Machine and then selecting “Add New Hardware”. Legacy Network Adapters use Device Emulation architecture to have communication with Parent Partition and to access Network resources. Please check the  MSDN Article that lists all the Guest Operating Systems which are supported on Hyper-V: Guest operating systems that are supported on a Hyper-V virtual machine

VMBus Network Card Adapters are available only when you install the Integration Services Component. The Integration Services component of Hyper-V leverages the VMBus architecture for best networking performance. There can be a maximum of 8 VMBus Network Cards.

A Virtual Machine running on Hyper-V can support a maximum of 12 Network Cards (4 Legacy and 8 VMBUS NICs).

VLAN Support is also included in Virtual Machines. A Virtual Machine running on Hyper-V can be configured with a VLAN ID. You can create unlimited number of VLANs in Hyper-V. You can have unlimited number of Virtual Machines per VLAN.

As shown in Figure 1.3, you can have one External Virtual Network Switch per Physical NIC on Hyper-V Server. This type of Network Virtual Network Switch allows Virtual Machines to have communication with LAN Servers also. The External Virtual Network Switch is mapped to Physical NIC in order to allow communication with Physical Devices.

There is no limitation for Internal and Private Network Virtual Switch. The reason is that Internal and Private operate internally and the communication is restricted to the Virtual Machines running on the Hyper-V. So you can create unlimited number of Private and Internal Virtual Network Switches.

Unlimited Virtual Machines can be connected to a Virtual Network Switch. This can be External, Private or Internal Network Virtual Switch.

In figure 1.3, you'll also notice the support for VLAN IDs on Virtual Switches. VLAN IDs can be specified on each Virtual Network Virtual Switch except Private Network Virtual Switch. These VLAN IDs can be used to create VLANs.

Similarly, VLAN ID support is also available for Virtual Machines. You can have one VLAN ID per Virtual Machine.

Note: There is no support for Direct Wireless for Virtual Machines running on Hyper-V. Instead you need to create a bridge between Wireless NIC and a Virtual Machine NIC.

What happens when you create a Virtual Network Switch?

You create Virtual Network Switch by selecting “Virtual Network Manager” located on the right pane of the Hyper-V Manager and then select the Network Virtual Switch Type you want to create. You need to select “Virtual Network Manager” to create any Virtual Network Switch Type. However, creation of External Virtual Network Switch is different from Private and Internal Network Switches.

When you create External Virtual Network Switch, you need to select a Physical NIC to which Virtual Switch will be mapped. This process involves modification of Physical NIC components.

Before creating External Network Virtual Switch, the network connection folder has only one network connection. The property of the Physical Network Connection looks like as shown below: (I assume you have only one Physical NIC attached to the Hyper-V Server).

<>

FIGURE 1.4 – Property of Physical NIC

When you create the External Network Virtual Switch using Virtual Network Manager, Hyper-V Components or VMMS.EXE process makes the following changes:

  1. Unbinds the following services, protocols, clients from the Physical NIC:

    1. Client for Microsoft Networks
    2. File and Print Sharing for Microsoft Networks
    3. TCP/IP Protocol IPv4
    4. TCP/IP Protocol IPv6
    5. Any other Service, client or protocol


  2. Bind the “Microsoft Virtual Network Switch Protocol

  3. Create a new network connection in the Network Connections folder with the name you had specified when creating the External Virtual Network Switch. Let’s say the name while creating the Virtual Switch you gave is “EXT NET Switch”.


  4. Bind the following Services, protocols, clients to the External Virtual Network Switch (EXT NET Switch):

    1. Client for Microsoft Networks
    2. File and Print Sharing for Microsoft Networks
    3. TCP/IP Protocol IPv4
    4. TCP/IP Protocol IPv6

  5. Unbind the following protocol from the External Virtual Network Switch; EXT NET Switch:

    1. “Microsoft Virtual Network Switch Protocol”

When you open the Network Connections folder you will see two Network Connections created; one Local Area Connection for physical NIC and other one is “EXT NET Switch” for External Virtual Network Switch as shown in figure 1.5:

FIGURE 1.5 – Network Connections with External Virtual Network Switch

The bindings will also be changed. When you look at the property of Physical NIC and virtual Network Switch, the resulting image will look like as shown in Figure 1.6.

Property of EXT NET Virtual Switch

Property of Local Area Connection 

FIGURE 1.6 – Property of Virtual Network Switch and Physical Connection

In step 3, the Virtual Network Manager unloads and loads the Network Driver for the Physical NIC from the memory. That’s the reason the network connection is lost temporarily when you create External Virtual Network Switch. Any connected device to Hyper-V Server has to retry to reconnect. As an example; if you had connected to a Virtual Machine from a remote computer using VMConnect.exe, the connection is lost and you need to reconnect using VMConnect.exe.

A warning is shown to the user about temporary loss of network connection when you create External Virtual Network Switch.

The creation of Private and Internal Network Virtual Switches is same as shown above. However, you don’t have to have the physical NIC to create these switches.

Conclusion

In this article we saw how Hyper-V Networking is different and the networking types introduced in the RTM version of Hyper-V. There are three networking types available; External, Internal and Private. We also saw the default configuration of Hyper-V Networking in which no network communication is possible unless a Virtual Network Switch is created. The Hyper-V Virtual Network Switches can be used to connect unlimited no. of Virtual Machines.

In the next series of this article, we will primarily focus on the following topics:

  • Hyper-V Networking and Packet Flow
  • Hyper-V Networking Examples (including VLAN Configuration)
  • Hyper-V Networking using SCVMM
  • Configuring Hyper-V Networking using SCVMM
  • Three Ways to configure VLAN Trunking for Hyper-V Virtual Machines


This article has been viewed 16226 times.
Nirmal Sharma

Author profile: Nirmal Sharma

Nirmal is a MCSEx3, MCITP and was awarded Microsoft MVP award in Directory Services four times. He is specialized in Directory Services, Microsoft Clustering, Hyper-V, SQL and Exchange. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating System and software. He is specialised in Microsoft technologies. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles. He can be reached at nirmal_sharma@mvps.org

Search for other articles by Nirmal Sharma

Rate this article:   Avg rating: from a total of 50 votes.


Poor

OK

Good

Great

Must read
 
Have Your Say
Do you have an opinion on this article? Then add your comment below:
You must be logged in to post to this forum

Click here to log in.
 





How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. Wesley David... Read more...

Migrating to Microsoft BPOS - Part II
 In his last article, Johan gave us a crystal clear guide to preparing to migrate from an on-premises... Read more...

Monitoring Mailbox Moves
 Mailboxes moves happen all the time, and given how precious the data in mailboxes can be, you should... Read more...

Emulating the Exchange 2003 RUS for Out-of-Band Mailbox Provisioning in Exchange 2007
 Exchange's Recipient Update Service was important in Exchange 2000 or 2003 in order to complete the... Read more...

The Postmasters
 The Exchange Team introduces themselves, and keeps you up-to-date Read more...

Upgrade Exchange 2003 to Exchange 2010
  In this article, the first of two in which Jaap describes how to move from Exchange Server 2003... Read more...

Upgrade Exchange 2003 to Exchange 2010 - Part II
 In Jaap's second article on upgrading straight from Exchange Server 2003 to 2010, he explains how to... Read more...

Goodbye Exchange ExMerge, Hello Export-Mailbox
 ExMerge was a great way of exporting a mailbox to an Exchange PST file, or for removing all occurences... Read more...

Using Exchange 2007 for Resource Booking
 The process of booking various resources to go with a meeting room just got a whole lot easier with... Read more...

Managing Exchange 2007 Mailbox Quotas with Windows PowerShell
 The use of PowerShell with Exchange Server 2007 can do a great deal to ease the task of managing... Read more...

Over 400,000 Microsoft professionals subscribe to the Simple-Talk technical journal. Join today, it's fast, simple, free and secure.

Join Simple Talk