User Tools

Site Tools


Interfaces, VSwitches and Port Groups

Jul 2017


If you are like me, and used earlier versions of VMWare (ver4) then version 6 might be a little confusing when it comes to the networking architecture. When I used to use older versions of VMWare (never used vCenter) you just as signed a physical interface to a VM. While you can still do this, it's not as obvious how to do it.


When considering how networking functions in VMWare (6.5.0 is what i am using) it can seem very confusing, however once you have configured it once it makes a lot of sense, it's just a little confusing at first. Before we look at configuration, lets consider some common terms that we will be using.

vSwitch - This is a virtual switch, this just allows a user to assign virtual ports (called port groups) to a virtual switch. A vSwitch contains one or more port groups and is associated with a physical interface.

Port Groups - Port Groups are a bit like Cisco VLANs. You create a Port Group, and in each Virtual Machine you can assign each of your VM interfaces to a Port Group.

vmnic - This is the name VMWare has assigned to each of your physical interfaces. So on my server I have vmnic0 to vmnic11 (vmnic0 is my connected to my management switch, vmnic7 is connected to my data switch).

Graphical Overview

As a picture paints a thousand words, let us look at what we are dealing with graphically.

Imagine for simplicity, you wanted each Physical Interface to map to an interface in your VM. Lets say you have 3 Interfaces in your VM, you would have something like this.

Now while this is valid, consider that I am passing data from VM1 to VM2, I would need, with 2 data ports per VM, four data ports. What would be better is if I put the data out of VM1 and data in of VM 2 in a port group, that shared a single interface.

In the example below we can see that the third physical interface is connected to both VMs (the yellow lines) and both of these interfaces are in the same Port Group. This means we shared data between the two VMs using only a single port.

Three Server Example

Consider my example below, I three servers, all connected to a switch, and I am passing multicast traffice between them, that is being processed in a particular way at each stage. Basically I want an input, two processing stages, a storage device and an output.

Each server (VM) has three interfaces, Management, Data In and Data Out. The reality is that for this example, on my physical server I will be using only two physical interfaces, one for management and one for data.

However, to be able to share and manage these interfaces, we need to create some Virtual Switches, and Port Groups. Now we could just create one port group and assign that group to all of the data interfaces, but this is not a real world use case, and it limits our flexibility.

Look at the diagram below.

Above we can see that there are four port groups (in Orange) and they are in a virtual switch, and there are three management interfaces in vSwitch0.

From the ESXi application (not the Web UI) we can see the following (you can get this in the Web UI, i prefer this layout).

Above we can see the following:

There are two virtual switches (vSwitch0 is created by default)

vSwitch0 is associated with the physical interface vmnic0
vSwitch DATA SW is associated with the physical interface vmnic7

vSwitch0 contains a Port Group called VM Network (created by default) and has the following interfaces from the VMs.

vSwitch DATA SW contains the following Port Groups

Each of these Port Groups contains a data interface from each VM.

Below we can see the page in VMWare that is used to configure the VM options.

There are three Network Adapters that have been added to each VM (this is for the MFEL VM). Each network has then been assigned to a Port Group (so you need to create your Port Groups and Switches before your VMs).

For example Network Adapter 2 is assigned to Port Group MFEL2PKG. We know the Port Group MFEL2PGK is assigned to vSwitch DATA SW, and that vSwitch DATA SW is assigned to physical interface vmnic7. So any traffic to or from this port will be via the vmnic7 physical port.

Below is a visualisation of the relationship between Physical Interfaces, vSwitches, Port Groups and Virtual Machines.

interfaces_vswitches_and_port_groups.txt · Last modified: 2017/07/18 11:33 by walkeradmin