How to configure VLANs with a network design diagram

Even though Hyper-V lacks a network visualization tool, there are other ways to create a network design diagram to help you configure VLANs and add virtual switches.

Since VMware ESX's inception, one of its key features was its graphical representation of network connections....

At a glance, it was fairly obvious how all the physical cards, virtual switches and port groups connected. Visually aggregating multiple virtual local area networks (VLANs) through a set of network interface cards (NICs) was also well-designed.

Microsoft's Hyper-V has an entirely different mechanism for managing virtual networks. Those familiar with Microsoft products realize that their management interfaces are not the most functional initially. And, that same complexity is present in Hyper-V.

Hyper-V's network management interface has plenty of options and features, but its lacks a network visualization tool. When working on a server with multiple NICs, for example, Hyper-V's Virtual Network Manager displays only the NIC interface names. Therefore, if your server has eight Intel NICs, they are labeled Intel NICs 1 through 8 in the configuration pane. Yuck.

How to diagram a network effectively
Microsoft Visio is the best way to combat Hyper-V's visualization limitations. This tool allows you draw and label network connections and interfaces. It also creates an invaluable document for troubleshooting your environment.

A useful Visio diagram should include the network name, VLAN number and adapter name.

Figure 1:
an example of a clustered server diagram depicting connections to production and test/development networks (Click image for an enlarged view.)

Teamed connections aside, this figure creates an effective network visualization that will help you configure Hyper-V server connections.

When installing physical Hyper-V servers into racked locations, work with your network team to connect each VLAN to the proper interface. Each VLAN will trunk to the Hyper-V server interface. Later on, the Hyper-V server will create a virtual switch that uplinks through the trunk. All interfaces -- as well as network equipment -- require IEEE 802.1Q support for VLAN tagging.

Because of the numerous connections, be sure the VLANs and cabling accurately reflect the same information on your diagram. Being able to quickly identify which physical interface and cable corresponds to which logical Hyper-V interface will make troubleshooting easier.

How to configure VLANs and add virtual switches
Next, launch the Virtual Network Manager in the Hyper-V Manager console. In this interface, create the virtual switches and connect the physical NICs to each. To set up a virtual switch for the production network, for example, create a New virtual network of type External. In the drop-down box, select the physical NIC named Intel #4.

At this point, the first virtual switch has been created. Once completed, note that the properties for the interface have changed. The Microsoft Virtual Network Switch Protocol is now the only protocol used. There is no need to create IP addresses for these connections because network interfaces that serve as virtual switch trunks do not use IP addresses.

Once the virtual switch and uplink have been established, the next step is to connect a VM to the virtual switch and assign the appropriate VLAN through the VM's configuration wizard. Click on Network Adapter to view its properties. Then enter the correct virtual switch as the VM's network name.

A Hyper-V virtual switch can have multiple VLANs trunked to it. This allows a single virtual switch uplink (or pair of teamed uplinks) to support multiple VLANs at once.

The final step is to correctly identify the VLAN ID in the VM configuration panel. In this example, enter 44 into the VLAN ID box to connect the VM to the production network.

While navigating Hyper-V's networking configuration screens can be challenging, they are flexible when you need to rapidly relocate VMs in a different network. In the VM's settings screen, simply change the assigned network (corresponding to the virtual switches) or alter its VLAN ID.

VLANs have the reputation for making a virtualization administrator's job easy or difficult. Prior to starting a Hyper-V implementation, consider mapping the interfaces and potential VLANs to see how many NICs you'll need and where they should connect. A bit of pen-and-paperwork at the start makes the process much easier.

Greg Shields

Greg Shields is an independent author, instructor, Microsoft MVP and IT consultant based in Denver. He is a co-founder of Concentrated Technology LLC and has nearly 15 years of experience in IT architecture and enterprise administration. Shields specializes in Microsoft administration, systems management and monitoring, and virtualization. He is the author of several books, including Windows Server 2008: What's New/What's Changed, available from Sapien Press.


Dig Deeper on Network virtualization