How do you configure a trunk port on a cisco switch for ESXi Server..
 
 
Why would you want to do this...
To segregate traffic on different VLANs for improved security (802.1q). Meaning you will be able to put virtual machines onto different VLANs (Maybe you have dev, test and production VLANs).
 
Before you configure the port as a trunk port, ensure that you set the correct VLAN ID on the port groups, especially the management network. Otherwise you will be unable to connect and manage the server via vSphere client. If you cannot connect afterwards you can connect to the service console via the server terminal pressing ALT+F1 and then using the esxcfg-vswitch commands set the correct VLAN ID or remove it.
 
 
 
Configure a single port a trunk port and allow all VLANs on the trunk


interface GigabitEthernet1/0/1
description esxi-01
switchport mode trunk
switchport trunk
switchport nonegotiate
spanning-tree portfast trunk
spanning-tree bpduguard enable
 
 
Comfigure a range of ports a trunk port and only allow specific VLANs on the trunk
 
interface range GigabitEthernet1/0/1-4
description esxi-01
switchport mode trunk
switchport trunk allowed vlan 101,120-130
switchport nonegotiate
spanning-tree portfast trunk
spanning-tree bpduguard enable
 
 
 
NOTE: You cannot use VLAN 1 in virtual switches with trunking because the traffic is not tagged.
 
 
 
 
 

Share this blog post on social media:

Social Links

Disclaimer

All advice, installation/configuration how to guides, troubleshooting and other information on this website are provided as-is with no warranty or guarantee. Whilst the information provided is correct to the best of my knowledge, I am not reponsible for any issues that may arise using this information, and you do so at your own risk. As always before performing anything; check, double check, test and always ensure you have a backup.

Copyright ©2008-2021 Andy Barnes - Please do not copy any content including images without prior consent!

Designed and Hosted by Andy Barnes

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.