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 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.
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
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?