Virtual Switch: Configuration and Functions

Last update: January 25, 2026
Author Dr369
  • The virtual switch (VS) is a software-based NIC that connects virtual machines and physical networks on a VMM host.
  • Types: gateway switch and distributed virtual switch, for small and scalable environments respectively.
  • Distributed CV avoids single points of failure and improves scalability in large infrastructures.
  • Key functions: traffic isolation between VMs, connection to VLANs, and security and routing policies.
Virtual switch

The virtual switch is a software-based network interface card (NIC) that presents and routes packets for the VMM host. A virtual switch consists of a set of ports, or interfaces, that are connected to a physical NIC on the VMM host. You can create multiple virtual switches with different types, such as internal and external, to isolate traffic between virtual machines on the same host server or to provide access to other networks.

Virtual Switch: Configuration and Functions

Introduction

Virtual Switch (VS) is a virtual network device that provides connectivity between virtual machines (VMs) and physical hosts in the same data center.

Virtual switches are created on each host that has a virtual machine or other virtualized workloads running on it. Each virtual machine can be connected directly to another VM, or indirectly through an uplink port on its local host's physical NIC, which connects it to the distributed virtual switch in that particular data center.

network switch

A VM is a network switch that is created on a virtual machine. The VM is not a physical network switch, but can be connected to the physical network and to other virtual switches. It can also be used by other virtual machines on the same host, or as an isolated channel for guest-host communication (for example, when you want to use RDP from the host computer).

The most common type of virtual machine (VM) is the internal VM: it allows communication between other virtual machines on the same host computer. You can also create external VMs to connect your virtual machine directly to an external network using bridging or routing protocols, but these are not covered here because they require more advanced configuration knowledge than is covered in this course.

  Copper-free data centers: energy, fiber and the future of digital infrastructure

Types of virtual switch

The two types of CVs are virtual gateway switch and distributed virtual switch.

The virtual gateway switch is a single point of failure, so it is best used only for testing purposes or for small environments with no more than 10 hosts. Distributed CV can be used in larger environments because it is designed to prevent a physical host from becoming a bottleneck in the system.

Virtual gateway switch

The virtual gateway CV is a software-based virtual switch that provides the same functionality as a physical network switch. The VMM platform provides two types of virtual switches:

  • A distributed VM, which uses remote VMs to provide failover capabilities and can scale to thousands of hosts. This type of solution is best for large-scale deployments where many servers need to be connected over long distances.
  • A host-based gateway switch, which resides on each host machine and can connect directly to other hosts on the same subnet or remotely through an uplink port (for example, connecting two separate clusters).

CV distributed

Distributed CV is a software-based network switch that runs on the hypervisor. It provides the same functionality as a physical network switch, but with more flexibility and scalability. Distributed CV is supported on VMware ESXi 6.5, 6.0, and 5.5 hosts running vSphere 6.5 or newer versions of vCloud Director 9.x or 10 (with Patch 1).

  Enterprise VPN Setup: A Complete Guide for Businesses

The VMM platform provides two types of CVs

The VMM platform provides two types of virtual switches:

  • Virtual gateway switch, used to connect virtual machines to physical networks.
  • Distributed CVS (DVS), which is used to connect virtual machines to other virtual machines.

Configuration

Setting up a virtual switch involves several steps. Here I explain in detail how to do it.

Virtual Switch Connection

  • Make sure you have a computer with enough capacity and resources to run the virtual switch.
  • Download and install the CV software on your computer. Popular examples include VirtualBox, VMware Workstation, and GNS3.
  • Open the CVy software and create a new instance of the virtual switch.

Basic CV Setup

  • Once the virtual switch instance is created, configure its name and IP address. This is done through the virtual switch management interface.
  • You can also set other basic configuration parameters, such as the administration password, virtual network interface size and type, and security policies.

VLAN Configuration

VLANs (Virtual LANs) are logical groups of devices that communicate as if they were on the same physical network. To set them up, you will need to define VLAN numbers and assign physical ports or virtual network interfaces to them. This can be done through the CV management interface.

Port configuration

CV ports are used to connect physical devices or virtual machines. You can configure different parameters for each port, such as speed, duplex mode, and security settings. These settings will depend on your needs and the type of device that is connected to the port.

  Bluetooth: Why not everything connects to everything and how to avoid problems

Routing and Security Configuration

  • If you want the CV to function as a router, you will need to configure the routing tables to allow traffic between different VLANs or subnets.
  • Additionally, it is important to configure security measures to protect the virtual switch and the devices connected to it. This can include packet filtering, port-based access control, and device authentication.

Configuration verification

Once you've finished configuring the virtual switch, perform tests to ensure everything is working properly. Connect devices and virtual machines to the ports, make test calls, verify connectivity, and check that security policies are being applied correctly.

Please note that specific steps may vary depending on the software and CV platform you are using. It is recommended that you consult the vendor's documentation or search for specific tutorials for more detailed instructions on setting up a CV.

Conclusion

In conclusion, the VMM platform provides two types of virtual switches. They are the virtual switch and the gateway switch. The former is used to connect different networks to each other, while the latter connects them to external resources such as the Internet or public cloud services. These switches are very important in the virtualization process because they allow users to easily manage their IT infrastructure without having any experience in networking technology.