Editor's note: This is the second article in a two-part series on Hyper-V networking. The first article focuses...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
on the virtual switches in a Hyper-V network, while this piece examines the use of Hyper-V logical networks.
When it comes to networking Microsoft Hyper-V environments, Hyper-V Manager provides administrators with basic virtual networking capabilities, but it falls short in larger environments. When administrators need to scale connectivity for larger environments, they will need to build Hyper-V logical networks.
Where basic Hyper-V networks fall short
There are two main problems with legacy Hyper-V virtual networks. The first is scalability. Hyper-V Manager is designed to be a server-level management tool. When you create an external virtual switch for instance, that virtual switch is bound to a physical network adapter on that server. That causes problems for a live migration. If you move a virtual machine to another host, the secondary host will require an identical virtual switch. Otherwise, the virtual machine will lose connectivity.
Building matching virtual switches on each Hyper-V host is a tedious process if you have more than a handful of hosts. This can be especially true when you consider that a single Hyper-V cluster can consist of up to 63 servers.
The other problem with legacy Hyper-V virtual networks is that they do not work very well for multi-tenant environments. While it is possible to build secure, multi-tenant virtual networks through the use of virtual LANs, there are scalability issues that are compounded as the number of Hyper-V hosts increases.
How Hyper-V logical networks address scalability
Microsoft's next-generation solution to these problems involves the use of logical networks and logical switches. Logical networks are a mechanism for abstracting your physical network by grouping VLANs and subnets into named objects that can be assigned to host groups.
At its simplest, a logical network might contain the various subnets that exist on your physical network. In some cases, however, organizations will create multiple logical networks for a common set of physical infrastructure so that network traffic can be organized by type. For example, an organization might create a virtual machine logical network and a management logical network.
Logical networks are defined through the System Center Virtual Machine Manager. The "logical networks" container can be found beneath the "fabrics" workspace. You can create a logical network by right-clicking on the "logical networks" container and selecting the "create logical networks" command from the shortcut menu, as shown in Figure A.
Creating a VM network
After creating a logical network, you must create a VM network, which is a named resource that is bound to the logical network. The purpose of a VM network is to establish permissions that allow self-service users to access the VM network and the underlying logical network. You can create a VM network by going to the "VMs and services" workspace, right-clicking on the VM Networks container, and selecting the "create VM network" command from the shortcut menu.
As previously mentioned, Hyper-V virtual machines are normally connected to virtual switches, which in turn are bound to physical network adapters. System Center Virtual Machine Manager gives you the option of binding physical network adapters to logical switches, which are connected to logical networks.
How to define switches for logical networks
The next step in the process is therefore to define a logical switch. As the name implies, a logical switch is a network switch for your logical network. To create a logical switch, open the Virtual Machine Manager console, select the "fabric" workspace, right-click on the "logical switches" container. Then select the "create logical switch" command from the shortcut menu, as shown in Figure B.
Right-click on the "logical switches" container and select the "create logical switch" command from the shortcut menu.
The last step is to link a logical switch to the physical network adapter on a Hyper-V host. To do so, go to the "VMs and services" workspace within the System Center Virtual Machine Manager console. Then right-click on a host, and select the "properties" command from the shortcut menu. When the host's properties sheet appears, select the "virtual switches" tab and then click "new virtual switch."
Upon doing so, you will be given the choice of creating a new standard switch or a new logical switch, as shown in Figure C. Standard switches are identical to the virtual switches that can be created through the Hyper-V Manager. Choosing the logical switch option allows you to bind a physical network adapter to a previously defined logical switch.
Benefits of logical networks
Building a logical network and setting up logical switches involves a lot more work than using a standard Hyper-V switch. So why go through all of this effort?
Even though building logical networks and logical switches involves a bit of work upfront, it actually reduces work as the virtual infrastructure scales. Logical switches are reusable, so you don't have to build logical switches from scratch for each host. Furthermore, logical switches use reusable, modular components such as port classifications and port profiles.
More on networking for virtualization
Are NVGRE and VXLAN the answer to VLAN shortages in the cloud?
Understanding virtual overlay networks
Network overlays: Myth vs. reality
Because of the way that components are reused, it becomes possible to ensure that Hyper-V hosts use a standardized network configuration. There is even a way to detect host servers that have deviated from the approved networking configuration and to perform remediation.
The use of logical networks is also important for multi-tenant environments because it allows key components to be reused. You won't have to reinvent the wheel each time you have to create a new tenant network. You can simply reuse existing components.
About the author:
Brien Posey is a seven-time Microsoft MVP with two decades of IT experience. Before becoming a freelance technical writer, Brien worked as a CIO for a national chain of hospitals and healthcare facilities. He has also served as a network administrator for some of the nation's largest insurance companies and for the Department of Defense at Fort Knox.