configuring VLANs through the command line interface

with thanks to Michael Brophy for documenting this.

Create a new switch called GuestVirtualSwitch

esxcfg-vswitch -a GuestVirtualSwitch 

Link the new switch with a NIC

esxcfg-vswitch –Lvmnic3 GuestVirtualSwitch 

Add a port group to the switch called VLANxx (repeat for each VLAN/Subnet assigned to you)

esxcfg-vswitch –v64 –pVLAN64 GuestVirtualSwitch                                                                       

Assign a VLAN ID to a port group

esxcfg-vswitch –v64 –pVLAN64 GuestVirtualSwitch 

On the Cisco Switch

ESXi server VMNIC3 is cabled to port 15 on the switch 
 description *** VMWare UCLAB-VMWare02 Lab Access *** 
 switchport trunk encapsulation dot1q 
 switchport mode trunk 
 switchport nonegotiate 

Create the VLANS, assign an IP address and no shut

interface Vlan64 
 ip address 
 no shut 
  • vendors/vmware/vlans.txt
  • Last modified: 2018/05/17 19:56
  • by gerardorourke