home lab

VMware Networking: 5 Concepts to Master

Master VMware networking with 5 concepts: vSphere switches, uplink utilization, failovers, VLAN tagging strategies, and VMkernel ports.

One of the challenges when getting into virtualization using VMware ESXi and vSphere with vCenter Server is understanding the many different networking concepts. There are a few foundational concepts in the VMware networking layer that you need to understand and master that will provide a basis for building your environment connected to the virtual network in your VMware environment.

1. vSphere Standard vs vSphere Distributed virtual switches

Let’s first look at the difference between the vSphere Standard Switch and the vSphere Distributed Switch.

vSphere Standard Switch

A vSphere Standard Switch (vSS) is the foundation of VMware networking when you install ESXi. It is the type of virtual switch installed out of the box, enabling virtual machines connected to the standard virtual switch via a virtual network adapter to communicate with one another and with physical networks and other hosts on the network.

Standard virtual switches are connected to the physical network via physical network adapters in each ESXi host that backs the virtual switch. Each vSS is isolated to a single ESXi host, which can sometimes limit its functionality and scalability in larger, more complex environments with dozens or even hundreds of hosts.

Below, you see the virtual machines connected to vSphere Standard Switches via virtual network adapters connected to the standard port on the VSS. It allows the virtual machine to communicate with other machines using standard TCP/IP networking utilizing an IP address.

Read more about the vSphere Standard Switch here: vSphere Standard Switches.

Vsphere standard switch architecture
Vsphere standard switch architecture

The vSphere Distributed Switch

The vSphere Distributed Switch (vDS) operates across multiple ESXi hosts, providing a centralized management approach for network configuration across all hosts, managing distributed port groups and configuration at the vCenter Server level.

It provides a robust and scalable solution for larger VMware environments as it allows configuring and managing the virtual networking on each ESXi host consistently and streamlined.

Note the architecture of the vSphere Distributed Switch below:

Vsphere distributed switch architecture
Vsphere distributed switch architecture

vSphere Distributed Switches are a bit more complex and important to care for their configuration. If you are using vSphere Distributed Switches, it becomes even more important to back up your vCenter Server configuration and also there is a way to backup your vDS configuration as well. Since it is held at the vCenter Server level, disaster recovery needs to include thinking about your distributed switches.

Learn more about the vSphere Distributed Switch here: vSphere Distributed Switch Architecture.

vSS or vDS: Making the Informed Choice

Choosing between vSS and vDS often depends on the scale and complexity of your virtual environment and use cases. While vSS might be suitable for smaller setups, vDS offers advanced features and centralized management, making it a preferable choice for larger, dynamic infrastructures.

vDS is also a great fit for environments using VMware vSAN as you can set up network I/O control for things like vSAN traffic, vMotion, and other network traffic types.

Licensing may also drive the decision as vSphere Distributed Switch is part of the vSphere Enterprise Plus license. So, you will need this license for the vDS. However, as we mentioned vSAN above, you actually get a license for vDS with your vSAN license for free.

Let’s now look at network uplinks and why this is important.

The Role of Uplinks in Physical and Virtual Networks

Uplinks in VMware networking serve as bridges between the virtual network and the physical network connected to physical switches, ensuring that virtual machines can communicate with external networks and physical machines.

When configuring multiple uplinks, it is best practice to use the same types of connections with the same available bandwidth. So, you would use multiple 1 Gbps connections or multiple 10 Gbps.

This helps to protect you from potential failures and provides load balancing across the network adapters.

Take a look at the uplinks configured for the virtual switch below:

Multiple uplinks backing a vmware vswitch
Multiple uplinks backing a vmware vswitch

3. Understand Failovers and Load Balancing

Ensuring Continuous Communication with Failover Capabilities

Failover capabilities are paramount in maintaining network availability. In the context of VMware networking, failover refers to the automatic redirection of network traffic in the event of a network failure, ensuring that VMs can still communicate with one another and with external networks.

Load Balancing: Distributing Network Traffic Efficiently

Load balancing distributes network traffic across multiple servers or paths to optimize resource utilization and prevent any single resource from being overwhelmed. In VMware networking, effective load balancing ensures that network traffic is evenly distributed across physical network adapters and uplinks, enhancing performance and reliability.

By utilizing multiple uplinks, you enhance the redundancy and availability of the network, ensuring that if one path fails, another can take over, maintaining the network’s integrity and functionality. By adding multiple uplinks, you automatically take advantage of the Route based on originating virtual port default configuration.

For each VM you spin up, it will be automatically placed on a particular backing connection on your ESXi host. So, all the uplinks will be utilized for connectivity. Also, if one of the uplinks goes down, all VMs will be automatically moved to the other uplink. This includes your management VMkernel connection so that management of the host is also resilient.

Vmware networking load balancing algorithms
Vmware networking load balancing algorithms

4. Use Virtual Guest Tagging & Virtual Switch Tagging

Using VLANs in your VMware virtual environment allows you to effectively segment your network and use existing segmentation you already have in place. VMware virtual switches and networking has many options to configure your VLAN. Let’s discuss a couple of concepts.

Virtual Guest Tagging (VGT)

VGT is a VLAN configuration where the virtual machine’s network adapter tags network packets. This approach provides granular control over network traffic and allows VMs to be part of multiple VLANs. In this configuration you are doing similar to what we did in the physical world with something like the Intel Proset drivers where you could tag VLANs from your endpoint.

Similar to physical switches, you need to have your backing virtual switch configured as a trunk so it can pass along the VLAN tags passed along by the virtual guest.

Virtual Switch Tagging (VST) and VLAN Configurations

Compared to VGT, VST involves the virtual switch handling the VLAN tagging. Packets are tagged and untagged by the virtual switch, simplifying the configuration within the VMs and ensuring that they are unaware of the VLAN structures, thereby providing a level of abstraction and security.

This is generally the more common approach since it allows controlling large swaths of VMs and which VLAN they are connected to without any guest virtual machine configuration.

Virtual switch tagging in vmware networking
Virtual switch tagging in vmware networking

5. VMkernel Ports

VMkernel ports are essential in communication between ESXi hosts and physical networks. They manage traffic for vMotion, IP storage, NFS, and more, ensuring that the ESXi host can communicate with the external networks and other ESXi hosts.

When you install ESXi and the management IP is set, you are in effect setting the first VMkernel network adapter address for your ESXi host. However, after that, you can add additional VMkernel network adapters to add services like vMotion, vSAN, fault tolerance, and others.

Vmkernel ports in vmware networking
Vmkernel ports in vmware networking

Configuring VMkernel networking for Optimal Traffic Management

When configuring VMkernel ports, VIadmins must make sure that they are optimized for specific traffic types, such as vMotion or iSCSI, to ensure efficient network traffic management and to uphold the performance and reliability of the virtual environment.

Below is an example of a VMkernel adapter address that has vMotion as an enabled service.

Enabled services on a vmkernel adapter
Enabled services on a vmkernel adapter

Frequently Asked Questions

1. How Do Virtual Switches Impact Network Traffic in a VMware Environment?

Virtual switches, both standard and distributed virtual switches, are important and needed in managing network traffic within a VMware environment. They allow the virtual machine’s network interface to communicate with other VMs and external networks. The type and configuration of virtual switches, such as vSphere Standard Switches and vSphere Distributed Switches, can impact the efficiency and management of network traffic. Choosing the right one is key.

2. What is the Role of VMkernel in Network Configuration?

VMkernel is a fundamental type of network configuration in VMware networking, especially in managing network services such as vMotion, IP storage, and Fault Tolerance. VMkernel networking layer handles the host’s communication with virtual machines and physical network adapters, ensuring that network traffic is efficiently managed and the host can communicate with other hosts and external networks.

3. How Does VLAN Tagging Enhance Security in Virtual Networks?

VLAN tagging, including Virtual Guest Tagging (VGT) and Virtual Switch Tagging (VST), provides security within virtual networks by segregating network traffic. This segregation makes sure that data packets from different VLANs do not cross paths, maintaining the isolation of distinct network segments. This is particularly crucial in environments where network resources are shared across multiple users or departments, ensuring that sensitive data is not accessible to unauthorized persons or devices.

4. What should you consider with multiple uplinks?

When configuring multiple uplinks in VMware networking, ensure that network adapters are evenly distributed across physical switches to avoid bandwidth limitations and ensure optimal performance. Also, considering failover and load balancing strategies is important to maintain network availability and performance, ensuring that if one path fails, network traffic can be automatically failed over to maintain connectivity.

5. How Do Distributed Port Groups help with efficient virtual network management?

Distributed port groups are part of a distributed switch and provide a consistent network configuration across all associated ESXi hosts. They allow virtual machines to communicate with consistent network policies and configurations across multiple hosts. This consistency simplifies network management and enhances network performance making sure VMs can communicate efficiently, even across different hosts.

6. How can you configure your VMware networking to allow virtual and physical networks to communicate?

Allowing communication between virtual and physical networks involves configuring uplinks and network adapters to make sure that traffic can flow between the virtual environment and external networks.

Also, using VLAN tagging and configuring VMkernel ports helps manage virtual machine communication and make sure virtual resources can communicate with external networks and other VMs.

7. How can you consistently configure virtual networks across ESXi Hosts?

Utilizing vSphere Distributed Switches (vDS) allows managing network configurations across multiple ESXi hosts from a centralized interface in your vSphere Client. It makes sure that changes to the network configuration, such as VLAN settings or security policies, are consistently applied across all hosts, reducing the risk of misconfigurations and enhancing the stability and reliability of the network.

You can also consistently apply settings across multiple hosts with vSphere Standard Switches. However, it will involve using PowerCLI and other automation techniques.

8. When would you use standard virtual switches over distributed ones?

Standard virtual switches (vSS) may be the choice in smaller environments where centralized management and advanced distributed virtual switches (vDS) features are unnecessary and Enterprise Plus or vSAN licensing is not available. The vSS can be simpler to configure and manage in smaller environments, providing the necessary functionality without the additional complexity of vDS.

Wrapping up

Mastering these five concepts in VMware networking will help VI admins or home lab enthusiasts to configure, secure, and manage their virtual environments effectively. From choosing between vSS and vDS to understanding VLAN tagging and VMkernel port configuration, each concept is essential. It helps to set up and configure resilient and stable VMware virtual networks.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.