ESXI 5.1 - Unable to trunk to cisco switch

5,339

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 a Virtual 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.

Share:
5,339

Related videos on Youtube

Lance
Author by

Lance

Updated on September 18, 2022

Comments

  • Lance
    Lance over 1 year

    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.


    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!!!

  • Lance
    Lance almost 11 years
    AHA! I thought that setting it to 4095 was kind of like telling it it to trunk and let all things through, somewhat like telling to trunk without pruning... I have setup individual port groups for each vlan on my vSwitch0, cisco end set to trunk and it's working.
  • Lance
    Lance almost 11 years
    Are you able to tell me under what circumstances that you use the vlan 4095 option then? The KB is pretty unclear on this :|
  • HostBits
    HostBits almost 11 years
    You would do this if you wanted your Server's NIC to handle the VLAN ID instead of the switch. Also, if the answer helped, please select it as the accepted answer. Hope this helps.
  • Lance
    Lance almost 11 years
    Having another problem you might be able to help with also: serverfault.com/questions/518934/…