One of the hardest concepts to understand if you’re new to the virtualization world is networking configuration. Even seasoned professionals still face some difficulty using Hyper-V for the first time since networking differs in Hyper-V from other hypervisors. This article will give a simplistic explanation of concepts like Hyper-V networking, virtual switch, and the types of Hyper-V virtual network switches.
What is a Hyper-V Virtual Switch?
A virtual switch is a switch made on Hyper-V that gives the network access to the virtual adapters on virtual machines. Access to the network varies depending on the type of virtual switch. The Hyper-V server’s physical network card (ethernet, wi-fi, or teaming) may be connected to a virtual switch. When this is done, the physical card is rendered ‘inoperable’ by the host because it is being used instead as a switch. However, to maintain network access with the host, a virtual network card may be created and attached to the Hyper-V host and connected to the virtual switch.
Hyper-V manager simplifies the virtualization implementation process. A virtual machine and a Hyper-V server are the two components of the Hyper-V implementation (VM). These two components must communicate with one another across a network. Even though they are both running on the same machine, these two components are connected via a switch due to Hyper-V rules. This does not always refer to a physical switch on your network.
The Hyper-V virtual switch is simply a virtual switch. This implies that the Hyper-V host’s active memory serves as the operating environment for the virtual switch, which controls Ethernet frame switching. Network adapters can be used by the virtual switch manager both when they are paired up and when they are working alone. They can be used as uplinks to connect the virtual switch to a physical switch, making communication with the physical network simpler.
It is important to note that Hyper-V network virtualization offers servers numerous benefits, capabilities, and functionality. Depending on the types of switch in Hyper-V networking you choose to use, they allow for flexible workload replacement (network isolation and IP address re-use without VLANs) and easier moves for workloads to a shared IaaS cloud on your windows server.
Hyper-V networking enables live migration across subnets, easier management of decoupled server and network administration, simplifies the network and improves server/network resource utilization, provides for interoperability and ecosystem readiness, policy-based setup, and comparable with existing infrastructure and emerging technology.
To put it simply, a virtual switch on Hyper-V is a virtual network device (switch) that permits virtual cards to access the network. The Hyper-V switch can operate in three modes: internal, private, or public. However, the Hyper-V virtual switches are not the same as the IP address systems or other virtual networking settings used in other technologies.
Nevertheless, you can choose a new virtual switch option by selecting the type of virtual switch you want to create, and clicking on ‘create virtual switch’ button under the virtual switch manager wizard. You should note the following:
- Each VM uses a virtual NIC to connect to a virtual switch.
- One virtual switch can support several virtual NIC connections.
- Virtual switches are required for VM-to-VM communication.
- A virtual and physical switch must be used for VM-to-server connectivity in the basic configuration.
Types of Hyper-V Networking
Hyper-V networking operates in three modes. These modes are:
1. External Hyper-V Switch
The primary characteristic of an external type switch is that it is connected to a physical network card on the Hyper-V host. In an external switch, the physical network will be accessible to the virtual network cards connected to the device (switch) if the physical network card is linked to it. A physical adapter must be attached to the external switch as it enables communication between the virtual adapters on virtual machines, the management operating system, and the physical network.
This switch type should not be confused with public IP addressing systems or given the impression that it must be connected to an Internet-facing system by its designation. You can use the same private IP address range for the adapters connected to an external virtual switch connected to a physical network.
When we use the word ‘external,’ we mean that it can communicate with devices that are not connected to the Hyper-V host. If a DHCP server is present, the virtual machines will receive an allocated IP address connected to the same network as the Hyper-V host through the external switch.
When a physical card is assigned to an external switch, the host is unable to use it. When constructing the external switch, it is possible to create a virtual network card attached to this switch if the Hyper-V host only has one physical card accessible or if you have built a ‘teaming’ with all of the physical cards of the host.
The operating system must be given permission to share this network card when constructing the external switch, which will create a virtual network card for the Hyper-V host. Virtual machines that share an external switch with the host and a virtual network adapter can communicate with one another because they can access the same network. However, connecting a physical network adapter to more than one external switch is impossible.
2. Internal Virtual Switch
The internal switch and external switch are very similar, with the key distinction being that the internal switch is not connected to a physical adapter on the Hyper-V host, limiting the network space available to virtual machines. When building an internal switch, the connected Hyper-V host creates a virtual card that enables the Hyper-V server to access the network and, for example, take control of virtual machines. If you want to build isolated labs that can take over the Hyper-V host, the internal switch is preferable to other kinds of switches.
The separate network cards must be configured with an IP address from the same network to communicate with the Hyper-V host and the virtual machines linked to the internal switch. This enables direct communication between the management operating system and virtual machines that share the same internal switch with virtual adapters.
The internal virtual switch is also similar to the private virtual switch, with the difference that the management operating system cannot have a virtual adapter on a private switch. However, the internal switch cannot uplink to any other switch because it lacks any connection to a physical adapter, just like the private switch.
3. Private Virtual Switch
A private switch is a virtual switch that entirely isolates the virtual machines, with no network switching between the Hyper-V host and the virtual machines. This kind of switch allows restoration testing to be performed in a safe, isolated environment.
The private switch permits only communications between the virtual machines on its host. Even the management operating system is prevented from taking part. This switch is entirely logical and does not use any physical adaptor. In this context, the word ‘private’ has nothing to do with a private IP address. This can be compared to a switch incapable of up-linking to other switches.
The isolation capabilities of private virtual switches are one of the benefits of using them for your server cluster. Certainly, no traffic on a private switch will ever escape the host. However, you can partially isolate your guests by connecting an external switch and a virtual machine with routing capabilities to the isolation network or networks.
After considering the different types of Hyper-V networking, you can choose any operational model of Hyper-V Virtual Switch properties for a new virtual switch for your server. At ServerMania, we also offer advanced networking hardware solutions, including server cluster hosting services that can help optimize high-performance workloads and scale your business easily. We choose servers that perfectly meet your needs. Visit our website to start your journey to excellence.