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.
On the prompt screen, enter the administrative login information.
After a successful login, the Vmware dashboard will be displayed.
On the Vmware Dashboard, Access the Networking Menu.
Access the Port Groups tab.
Click on the Add port group option.
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.
If you need to add another VLAN, click again on the Ad port group option.
Perform the same configuration to the second VLAN.
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.
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.
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.