Step by step: Setting Up vSwitches in VMware ESXi

In VMware virtualization environments, a vSwitch (virtual switch) is a software-based networking component that connects virtual machines (VMs) to the physical network. It operates at the data link layer (Layer 2) of the OSI model and acts as a bridge between VMs and the physical network. vSwitches play a crucial role in network communication within the virtual infrastructure, enabling VMs to communicate with each other and the external network.

In this guide, we will walk you through the step-by-step process of setting up vSwitches in VMware ESXi. Understanding and configuring vSwitches properly is essential for building a robust and efficient virtual network.

What is a vSwitch, and why are they used?

A vSwitch is a software-based network switch that operates within the VMware ESXi hypervisor. It allows VMs to communicate with each other and the physical network through virtual network interfaces. Each vSwitch typically connects to one or more physical network interfaces (physical NICs) on the ESXi host.

Here are some key reasons why vSwitches are used:

  1. Isolation: vSwitches provide network isolation between VMs running on the same ESXi host, which enhances security and prevents data leakage between VMs.
  2. Performance: By using vSwitches, VM-to-VM communication can occur without leaving the ESXi host, resulting in improved network performance.
  3. Flexibility: vSwitches allow you to create multiple virtual networks and define network policies for each, providing flexibility in network configuration and management.
  4. Load Balancing: When multiple physical NICs are connected to a vSwitch, load balancing algorithms distribute network traffic among these NICs, optimizing network utilization.
  5. Virtual Machine Mobility: vSwitches enable virtual machine mobility, allowing VMs to be moved between ESXi hosts without changing their network configuration.

Step 1: Access ESXi Host Network Settings

To begin setting up vSwitches, access the network settings of the ESXi host:

  1. Log in to the vSphere Client or vCenter Server.
  2. Select the ESXi host you want to configure from the “Hosts and Clusters” view.
  3. Click on the “Configure” tab and select “Networking” under the “Hardware” section.
  4. Here, you can see the existing vSwitches and network adapters.

Step 2: Create a New vSwitch

Now, let’s create a new vSwitch to connect VMs to a specific network:

  1. Click the “Add Networking” button to start the “Add Network Wizard.”
  2. Choose “Virtual Machine” as the connection type and click “Next.”
  3. Select “Create a vSphere Standard Switch” and click “Next.”
  4. Assign a name to the new vSwitch and select the physical NIC(s) that will connect to the vSwitch. You can use multiple NICs for redundancy and load balancing.
  5. Click “Next” to review the settings and then click “Finish” to create the vSwitch.

Step 3: Configure vSwitch Policies and Security

Next, let’s configure vSwitch policies and security settings:

  1. Select the newly created vSwitch from the list and click the “Edit” button.
  2. Set the “Network Label” to identify the vSwitch.
  3. Under the “Security” tab, verify that the “Promiscuous Mode,” “MAC Address Changes,” and “Forged Transmits” settings meet your network security requirements.
  4. Under the “NIC Teaming” tab, configure load balancing policies and failover settings if multiple physical NICs are connected to the vSwitch.
  5. Review other settings, such as “Traffic Shaping,” “Failback,” and “Notify Switches,” as needed.
  6. Click “OK” to save the vSwitch configuration.

Step 4: Create and Manage Virtual Machine Port Groups

To enable VMs to connect to the vSwitch, create virtual machine port groups:

  1. From the “Networking” view, click the “Add Networking” button again.
  2. Choose “Virtual Machine” as the connection type and click “Next.”
  3. Select “Create a vSphere Standard Switch” and click “Next.”
  4. Choose the existing vSwitch from the drop-down list or select “Create a new vSwitch” if you want to create a separate vSwitch for this port group.
  5. Assign a name to the port group and set the VLAN ID if necessary.
  6. Click “Next” to review the settings and then click “Finish” to create the port group.

Step 5: Assign Virtual Machines to Port Groups

Finally, assign virtual machines to the appropriate port groups:

  1. Select the virtual machine in the vSphere Client.
  2. Click “Edit Settings” to modify the VM’s network adapter settings.
  3. Choose the appropriate port group from the drop-down list under the “Network Connection” section.
  4. Click “OK” to save the changes.


Setting up vSwitches in VMware ESXi is a fundamental task in creating and managing a virtual network. vSwitches act as virtual bridges that connect VMs to the physical network, providing isolation, performance, and flexibility. By following this comprehensive guide, you can successfully configure vSwitches, enabling efficient communication and networking between virtual machines in your VMware virtualized environment.

You may also like...

Leave a Reply