Our website use cookies to improve and personalize your experience and to display advertisements(if any). Our website may also include cookies from third parties like Google Adsense, Google Analytics, Youtube. By using the website, you consent to the use of cookies. .

Cisco and VMware vlans

I have recently had a requirement whereby I needed to allow multiple vlans on a single cisco switch port (as I was running out of available switch ports) because of a business need.  Our current Cisco environment was only setup to allow one vlan per switch port as it’s configured for “switchport access vlan” instead of trunking.

Note: – Before making any changes make sure you have the relevant underlining vlan’s setup on your Cisco switches.

This is a typical switch port config we have setup. As you can see the switchport will only have access to vlan 10

description Server Ports
 switchport access vlan 10
 switchport mode access
 speed 1000
 duplex full
 spanning-tree portfast
 spanning-tree bpduguard enable

Basically I needed to have an uplink in ESXi allow multiple vlans and have multiple port groups each with a different vlan id.

So how did I achieve this!!

First you need to get your networking team to modify the relevant switch ports (or if you’re lucky enough you will be the individual doing both as it was in my case ) with the new configuration. You may experience a small amount of downtime whilst you reconfigure the switch ports.

description ESXi Uplink Server Ports
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 10,90
 switchport mode trunk
 speed 1000
 duplex full
 spanning-tree portfast
 spanning-tree bpduguard enable

Once modified then use the vSphere client and connect to the ESXi server(s), go into the “Configuration” tab and select “Networking”. Create multiple port groups on your vSwitch and then assign the relevant vlan id to each port group based on your requirement.

As you can see from the above diagram I have a port group named “Corporate LAN” (used for virtual server communication) and “Management Network2” (used as a redundant management network for vCenter communications) again using vlan id 10 and finally “Exchange DAG” (used for Exchange database replication) using vlan id 90.

Now I’m using one switch port supporting multiple vlans instead of creating a new vSwitch with uplinks and using up more cisco ports.  One thing to keep an eye on is network utilisation and if need be use traffic shaping to limit the bandwidth used.

One Comment

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.

Related Posts