I have configured my esxi host vSwitch1 to use the secondary NIC on my VMware host.
On vSwitch1 configuration I have set the VLAN to 4095 which specifies to allow all VLANs.
If my cisco switch port configuration is set to an access port my server can ping the vlan interface on the switch.
If my cisco switch port configuration is set to a trunk, whilst it stays UP UP and CDP information is available, I lose my ping from VMware VM server to the local vlan interface on the switch and I lose any server connectivity to my network.
Switch NIC teaming policy to Route based on originating virtual port ID
Configuration based on: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006628
interface GigabitEthernet0/42
description Host Port
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 18,220
switchport mode trunk
switchport nonegotiate
spanning-tree portfast trunk
end
Output from ESXI CLI esxcfg-vswitch -l:
~ # esxcfg-vswitch -l
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 128 5 128 1500 vmnic0
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 4095 1 vmnic0
Management Network 4095 1 vmnic0
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch1 128 4 128 1500 vmnic1
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 2 4095 1 vmnic1
Any tips welcome!!!
Instead of allowing all VLANs across you could setup a
Port Group
on your vSwitch for each VLAN, specifying the actual VLAN id in each. Then set your VMs NIC(s) to use the Port Group for it's subnet. You can do this by adding aVirtual Machine Network
under the properties of your vSwitch.Or You can set the VLAN ID in the NIC settings of your VM.
The problem you have in your current config, is that you are trunking two VLAN IDs (18 & 220) over to the vSwitch, and telling the vSwitch to pass all VLANs. However, your vSwitch is leaving the 802.1q tag on the traffic. In this config your VM would be expected to be aware of what VLAN id it's traffic is using.