VMware Cloud Community
bibou65
Contributor
Contributor
Jump to solution

ESXi 7 trunk and vlans on single port

Hello all,

 

Since days, I want to configure an ESXi 7 server with a single trunk port to be able to host VMs on several vlans within the same ESXi server.

As of today, I struggle gettings the trunk and vlans to  work.

 

Here is my setup:

I have an Intel NUC with only 1 network card. This NUC got ESXi 7.0 update 1 installed and running.

I have created the portgroups for each of my vlans to match by Ubiquiti  switch vlans

I have 2 VMs linked to each of my vlans to test

On the switch side, the port is in Trunk mode with all vlan as tagged (no native vlan)

 

As I understand, I can have only 1 vswitch because I got only 1 physical nic and you cannot use the uplink port on several vswitch. So in my case, all the portgroups are part of the same vswitch:

4be732bb-1f48-4504-ac63-ec21709a0f7c.png

 

If needed, here is my switch port configuration

140ad36b-fc5c-4c3c-ad71-95b93adfad6c.png1b385c81-e7d6-4b45-8afb-4461cf136b1f.png

 

I have checked several post/links/videos and it appears to be straight forward to create vlan and easy but in the end, I cannot make things works 😕

I don't get it because I access the ESXi server on the management port with vlan 1 which is tagged on my switch and it works, so for the rest it should be okay.

On one of my VM, I have set a static IP and when I try to ping the gateway ofthe vlan where the VM is set, it doesn't work, like if there is no outgoing route.

 

Another point is that on several videos, the presenter was on an interface that just don't look like mine, seems like they are using vSphere client or vSphere server or something like that and it provides a lots of settings that I don't have on the web interface of my ESXi 7 server.

I try to download it but a 7Gb of ISO looks like a full server and not an application, I feel a bit lost in all these software names and what is really needed.

 

It drives me crazy as from the KB and videos, it looks like it takes only 3 minutes to create the vlan.

Labels (4)
0 Kudos
1 Solution

Accepted Solutions
bibou65
Contributor
Contributor
Jump to solution

I could finally found my issue.

 

I have created 1 VKernel for each of my vlan and I could see that all my VKernel was receiving IPs from my DHCP but not for the Server VLAN which I was trying to create my VM on....

 

After playing with VM and the other VLAN, everything works like a charm and it seems that for no reason my VLAN 10 isn't propagated to my switch even by having a trunks on uplinks when it is needed.

By the way, the VMware "issue" looks solved 🙂

 

I still not get why some users have more network option with the Vsphere client that I cannot have or why I cannot set a static IP under the VKernel settings.

View solution in original post

0 Kudos
7 Replies
pwolf
Enthusiast
Enthusiast
Jump to solution

Your ESXi configuration seems okay. Did you try to ping your VMs from the switch and does that work?

How did you setup your VMs ? These need to be configured without VLAN.

Are your default gateways accessible, if you ping them from the switch?

For testing puposes you could create additional vmkernel adapters for each VLAN, so you could test, if connectivity issues exist with those adapters or not.

0 Kudos
bibou65
Contributor
Contributor
Jump to solution

Hello pwolf,

 

I cannot ping the VM from my phisical switch

For the VMs, I don't get, how did you "configure without VLAN" ? I just create the VM from scratch, install ubuntu server, set statis IP config in the OS and assign the VLAN in the network card:

Capture d’écran 2021-03-27 081938.png

From the ESXi SSH host, I can ping all gateways, but not the VMs. Yep I confirm that the physical switch do have these VLAN gateway accessible as it has several ports with physical stuff connected on these vlans.

 

I already try to create a VM kernel but I cannot set a static IP to test. Looks like it force me to set it but the field are not available, strange:

Capture d’écran 2021-03-27 082614.png

By the way, If I create it with DHCP, seems that the Vkernel is then pingable from by computer to the ESXi host

Capture d’écran 2021-03-27 082546.png

But in the end, my test VM in this subnet 192.168.100.X in DHCP doesn't received any IP from DHCP. Looks like the VMs cannot get to the vswitch or something like that 😕

0 Kudos
bibou65
Contributor
Contributor
Jump to solution

I see also that in my physical nic, it only discover one of my vlan and not the others:

Capture d’écran 2021-03-27 083959.png

0 Kudos
bibou65
Contributor
Contributor
Jump to solution

I could finally found my issue.

 

I have created 1 VKernel for each of my vlan and I could see that all my VKernel was receiving IPs from my DHCP but not for the Server VLAN which I was trying to create my VM on....

 

After playing with VM and the other VLAN, everything works like a charm and it seems that for no reason my VLAN 10 isn't propagated to my switch even by having a trunks on uplinks when it is needed.

By the way, the VMware "issue" looks solved 🙂

 

I still not get why some users have more network option with the Vsphere client that I cannot have or why I cannot set a static IP under the VKernel settings.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Two quick notes:

>>>" ... or why I cannot set a static IP under the VKernel settings."
You actually can. Click on the small triangle left to "IPv4 settings, to open the options.

Regarding the VLAN 10 issue. What I could think of it that it might be set as the "Default VLAN" on your switch. What you may try is to create a virtual port group with no VLAN-ID configured to test this.

André

0 Kudos
bibou65
Contributor
Contributor
Jump to solution

Hello a_p_

 

Wow I feel so dumb >_> I didn't saw this little triangle appearing when activating the IPv4 checkbox.

 

My vlan 10 cannot be set as native and on my switch, I tagged all vlan on the trunk and leave native vlan as blank to avoid any untagging issue.

In the end it was my vlan 10 not getting to the switch port.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

I'm not talking about the "Native VLAN" for that specific port configuration, but the "Default LAN" on the switch. It's usually VLAN 1 by default, but may be reconfigured for several (e.g. security) reasons.

André

0 Kudos