Would you like to learn how to configure a VLAN trunk between Vmware ESXi and a Cisco Switch? In this tutorial, we are going to show you all the steps required to create VLANs and configure a trunk.

This tutorial was tested on Vmware ESXi 6.5

This tutorial was tested on Vmware ESXi 6.7

This tutorial was tested on a Cisco Switch 2960.

The video above shows how to configure VLAN using older versions of Vmware ESXi 6, 5.5 and 5

Vmware ESXi Playlist:

On this page, we offer quick access to a list of videos related to Vmware ESXi.

Don't forget to subscribe to our youtube channel named FKIT.

Tutorial - Cisco Switch Trunk Configuration

First, you need to access the console of your Cisco Switch.

In our example, we are going to use an Opensource software named Putty and a computer running Windows.

The Putty software is available on the putty.org website.

After finishing the download, run the software and wait for the following screen.

Putty windows

To access the console of a Cisco Switch model 2960, you will need to select the Serial Connection category and use the following options:

• Connection type: Serial
• Serial line: COM1
• Speed: 9600

If COM1 does not work you will need to try to use COM2, COM3, COM4 or the next.

cisco switch terminal settings

Using either the console, telnet or ssh, connect to the command-line of your switch and log in with a user who has administrative privileges.

On the prompt screen, enter the administrative login information.

After a successful login, the console command-line will be displayed.

Copy to Clipboard

Use the enable command to enter the privilege mode.

Copy to Clipboard

Use the configure terminal command to enter the configuration mode.

Copy to Clipboard

Create a new vlan, select an identification number and add a brief description.

Copy to Clipboard

Access the interface configuration mode.

Set the Switch port as a trunk.

Add the list of authorized Vlans to use this trunk.

Copy to Clipboard

In our example, the Switch port 40 was configured as a trunk.

The following Vlans were allowed to use this port as a trunk: 1, 100 and 200.

Vlan 1 is the default native VLAN of Cisco Switches.

Don’t forget to save your Switch trunk configuration

Copy to Clipboard

You have successfully created new VLANs.

You have successfully configured a Switch port as a trunk.

Tutorial - Vmware ESXi Trunk Configuration

First, you need to access the Vmware web interface.

Open a browser software, enter the IP address of your Vmware ESXi server and access web interface.

vmware web interface

On the prompt screen, enter the administrative login information.

After a successful login, the Vmware dashboard will be displayed.

Vmware web export virtual machine

On the Vmware Dashboard, Access the Networking Menu.

Access the Port Groups tab.

Click on the Add port group option.

Vmware ESXi Vlan Add

On the next screen, you need to configure the following items:

• Name - Enter an identification to your Vlan.
• VLAN ID - Enter the VLAN identification number.

After finishing your configuration, click on the Add button.

Vmware Vlan Configuration

If you need to add another VLAN, click again on the Ad port group option.

Perform the same configuration to the second VLAN.

Vmware ESXi Vlan configuration

Don't forget to save your configuration.

To verify your configuration, access the Networking menu.

Access the Virtual Switches tab.

Click on the Virtual Switch.

Vmware trunk virtual switch

On the right part of the screen, you are able to see the trunk configuration.

In our example, we can see that VLANS 100, 200 and 0 are able to pass through the VMNIC1 interface.

Vmware Trunk native vlan

Keep in mind that the Vmware interface VMNIC1 needs to be connected to a switch port previously configured as a trunk.

In our example, the Vmware interface VMNIC1 needs to be connected to the Cisco Switch port 40.

The Cisco switch port 40 was configured to allow the traffic of VLANS 1, 100 and 200.

Any packet that arrives at the switch port without VLAN tags will be considered a member of the native VLAN.

In our example, The VLAN 1 was configured as the Cisco Switch Native VLAN.

Congratulations! You have successfully configured a VLAN trunk between Vmware ESXi and a Cisco Switch.

Tutorial - Vmware Virtual Machine VLAN Configuration

Now, we are going to teach you how to assign a virtual machine to a specific VLAN.

Access the Vmware Dashboard.

Vmware web export virtual machine

On the Vmware Dashboard, Access the Virtual Machines menu Menu.

Select the desired virtual machine.

Click on the Actions button and select the option named Edit settings.

Vmware Virtual Machine Settings

On the virtual machine properties screen, you need to perform the following configuration:

• Locate the desired network adapter
• Select the desired VLAN

After finishing your configuration, click on the Save button.

Vmware VM VLAN

In our example, the network interface of a virtual machine was assigned to the VLAN 100.

Don't forget to save your configuration.

Congratulations! You have successfully configured a virtual machine as a VLAN member using Vmware ESXi.