hamza13
Contributor
Contributor

Esxi 6.7 Vlan Trunking not working

Hello Everyone,

I Hope that you all doing well.

I have a problem configuring Trunk between cisco switch and Esxi 6.7 host. 

i create vlans 100 and 200 in my physical switch then i configure the port go to host as trunk and in my Esxi i create a vswitch with the vmnic connected to the trunk and i allow the two vlan's with vlan 1 as native. the thing is when i create two port groups in that vswitch with vlanid 100 and 200 and i put my vms in those ports i can't ping my switch. but when i create a port group with no vlan id and i put a vm on it i can ping the vlan 1 ip in my switch.

Can Anyone help Please.

Hope The Pictures Help.

Thanks

Config.pngvmnic1.pngVswitch.png 

0 Kudos
5 Replies
a_p_
Leadership
Leadership

Some thoughts/questions:

  • the switch port configuration that you've posted doesn't show the allowed VLANs
  • do the ports show up as tagged on this port when you run the show vlan command?
  • where/how is the routing for the VLANs configured?

André

0 Kudos
hamza13
Contributor
Contributor

Thanks for your reply.

First The command switchport mode trunk by default allow all vlans in my case i have only vlan 100 and 200.

why we need to route vlans?

i only want each portgroup to communicate with the proper vlan.

Thanks

Hamza.

 

trunked.png

0 Kudos
a_p_
Leadership
Leadership

I asked for the routing, because you said that you are not able to ping the switch from the VMs. Assuming that you are using different subnets for the different VLANs, there's got to be some routing in place so that you can reach the switch, which I further assume has its IP address on VLAN 1. Please correct me, if you've created LAN interfaces with IP addresses in the respective VLANs, and these are the ones which you cannot ping

André

hamza13
Contributor
Contributor

there is no ip in vlan 1

I create ip for each vlan and i also configured DHCP on the switch when i put my VM on portgroup vlan100 it can't get an ip same for vlan200. i tried to fix an ip in my machine but no luck.

I don't know what  i am missing here?

vlans.png

0 Kudos
hamza13
Contributor
Contributor

Can Anyone Please tell  me if my configuration is right to create a trunk between a cisco switch and an Esxi host.

If i am missing something please correct me

Thanks.

0 Kudos