ESXi

 View Only
Expand all | Collapse all

ESXI vlan tagging issue

MikeStoica

MikeStoicaMar 15, 2019 07:41 AM

  • 1.  ESXI vlan tagging issue

    Posted Mar 15, 2019 04:02 AM

    Hi,

    i apologize in advance as im  rather new to ESXI and virtualization.

    i have a Server and a few vms and I’m trying to do Vlan tagging. I have set up the port groups and assigned them to individual vlans and the nic from my pc is connected to my Cisco switch that is trunking with all Vlans allowed on it (this is a homelab for playing around and learning).

    problem is whenever I enable trubking my host losses connectivity but I can see the macs of the host and vms on the switch all with the same Vlan that comes from the physical nic. I feel like I’m missing something very simple.

    any suggestions are appreciated and let me know what details/configs would help.

    thanks in advance!



  • 2.  RE: ESXI vlan tagging issue

    Posted Mar 15, 2019 07:41 AM

    Do you have VLAN set for the physical nics?



  • 3.  RE: ESXI vlan tagging issue

    Posted Mar 15, 2019 01:13 PM

    i Tried both ways.

    if I set vlan on physical nic the VMs show up on my switched MAC table as tagged with whatever vlan I set on the nic.

    if I set no vlan they get tagged with the native vlan.



  • 4.  RE: ESXI vlan tagging issue

    Posted Mar 15, 2019 09:32 AM

    I haven't done a setup for Cisco for a Looooong time, and then it was vSphere 5!

    From recollection it was sometimes tricky.

    Have you looked at something like this : Sample configuration of EtherChannel / Link Aggregation Control Protocol (LACP) with ESXi/ESX and Cisco/HP switches (1004048)



  • 5.  RE: ESXI vlan tagging issue

    Posted Mar 15, 2019 11:10 AM

    When you say you are enabling the VLAN are you enabling for the management portgroup as well?.

    Did you have the switch-port in the phy switch to allow the VLAN?.



  • 6.  RE: ESXI vlan tagging issue

    Posted Mar 15, 2019 11:33 AM

    That is a very good point. Easily checked and fixed from the DCUI too.

    F2 > Login > "Configure Management Network" > "VLAN (Optional)"

    If it is "Not set", it will need to be.



  • 7.  RE: ESXI vlan tagging issue

    Posted Mar 15, 2019 01:16 PM

    I’ll check all the above suggestions during the day and come back with whatever I find

    thanks so much for the help!



  • 8.  RE: ESXI vlan tagging issue

    Posted Mar 15, 2019 04:07 PM

    I've been going through this learning experience using Mikrotik hardware.  I'm very experienced with virtualization but brand new to setting up VLANs.  I've become very acquainted with the F2 interface as each time I enable/disable the trunk it's easiest to hop on the host console and configure the management network from there and see in real-time when it pulls the (static-assigned) IP from DHCP.

    One trick I've started using because I'm new to the configuration and I keep enabling/disabling the trunk: I've added a port group to the vswitch that's VLAN tagged, and one that isn't.  Then I put two NICs in each VM, one on the tagged port group and one on the untagged one.  This has saved me a bit of time reconfiguring things in the VMs for testing what I've screwed up in the VLAN setup.  I wonder if the same methodology might work for the management interface; potentially having one vmkernel port group tagged and one untagged?



  • 9.  RE: ESXI vlan tagging issue

    Posted Mar 19, 2019 04:41 AM

    Can you share a screenshot of the virtual switch?



  • 10.  RE: ESXI vlan tagging issue

    Posted Mar 19, 2019 12:54 PM

    Based on your post, can I assume you only have one connection from the switch to the host?  If so, your management interface is losing connectivity due to not having the proper VLAN tag.  Again, assuming you have one physical connection between the host and the switch (configured as a trunk), you will need to set the management VLAN on the ESXi console

    You should end up with Switch (trunk port) -> ESXi Host -> vSwitch0

    vSwitch0 should have the Management VMkernel with the appropriate VLAN tag, and any port groups with the correct tags as well.



  • 11.  RE: ESXI vlan tagging issue

    Posted Mar 19, 2019 06:50 PM

    Hey,

    So i imagine it should look something like the below?

    Where the VMkernel should have it's own Vlan ID?

    The "DuckMaster in the VM network is a currently a disabled interface it's just there for testing purposes.

    And yes my host has a vlan assigned to the NIC currently.

    I apologize if im missing any questions as i'm at work.

    Let me know if you need any other details!



  • 12.  RE: ESXI vlan tagging issue

    Posted Mar 20, 2019 07:24 AM

    What's your management VLAN id? I see in DCUI you have VLAN set to 4095 so you need to change it to your management VLAN, either from DCUI or from the vSphere console.



  • 13.  RE: ESXI vlan tagging issue

    Posted Mar 20, 2019 01:38 PM

    Hi Mike,

    so just confirm the DCUI and vmkernel have to be on the same VLAN?



  • 14.  RE: ESXI vlan tagging issue

    Posted Mar 20, 2019 01:54 PM

    Yes, the vmkernel for management traffic.



  • 15.  RE: ESXI vlan tagging issue

    Posted Mar 20, 2019 08:26 AM

    If you have VLAN 0 defined in ESXi and trunking configured on the Cisco swicth, you'll need to define a native VLAN on this switch.

    Example if your management VLAN is VLAN 5, then do a "switchport trunk native vlan 5" on the switchport where the ESXi host is connected... this will make the switch send traffic from VLAN 5 to your ESXi untagged,

    /Rubeck



  • 16.  RE: ESXI vlan tagging issue

    Posted Mar 20, 2019 03:18 PM

    You need to set the actual VLAN ID on the VMkernel. You can do this either the vSphere web client or on the ESXi console. On your screenshot of the console, you have the management VLAN set to 4095 which to VMware means trunk/all VLANs.  You need to set it to the VLAN of the actual management network.