Virtual Switch and its impact

A communication channel for virtual machines to communicate with each other is defined via a virtual switch. So, a virtual switch can be defined as a program that enables the virtual machines to communicate. It actually binds the physical machine network adapter with a virtual host.

How do we create a Virtual Switch?

Creating a virtual switch is a very easy procedure. First of all, we will be opening Hyper-V Manager. On the right pane, you can see that there is an option for VIRTUAL SWITCH MANAGER.

Operating Systems

Clicking on Virtual Switch Manager will open the Virtual Switch Manager window for your machine. There are three types of switches in a virtual environment - External, Internal, and Private. These switches are basically the virtual networks that can be established. There is another type that can be created via WMI but officially it has no name. I would say it is the dedicated virtual switch.

Let us walk through each type of switch and get a clear concept on when to use which virtual switch.

Operating Systems

External Virtual Switch

When it is required to form a communication in such a way, we use an external virtual switch:

Internal Virtual Switch

When communication is required in such a way within the network, we can use an internal switch for this -

Private Virtual Switch

Operating Systems

The private switch makes the machine isolate itself. It is used to establish a network of nested virtual machines.

Let's create a Switch, for instance, an external switch. To create one, click "Create Virtual Switch".

Operating Systems

Once you click, it will open a window as shown below.

Operating Systems

In the name field, name the switch whatever you like. The "Notes" section is used to add any description if one wants to add it. Connection type is used to create and choose an external network. The drop-down below specifies a list of adapters for your physical machine. Select the adapter from which you are connected to the internet. Once chosen, click Okay.

Congrats, you have successfully created an external switch.

Operating Systems

For Internal Switch, there is only data communication, hence no internet is provided to the virtual environment. So, we will just click "Create Virtual Switch" and choose "internal switch" in connection type followed by clicking on "OK".

For Private Switch, you will choose Private Switch instead of Internal Switch; the rest is the same as that of Internal Switch. Private is also used only for data communication.

Continue to article,