Connexion entre 2 hosts with same vlan tab

Problem: Client bought one host that what add some VM machine  to vlan 10 and vlan 20 , but the vmware Vsphere has diff way to connect 2 vswitch

process: I create new vswitch in new VM exsi center , then tag same vlan tag

but 2 VM can’t ping

analyse :  you can understand that Vcenter use vswitch which like physical switch and group all the VM network in a virtual group like below image so switch to switch in your physical switch must have trunk setting

so the configuration cisco switch is below

!
interface FastEthernet0/17
 switchport trunk encapsulation dot1q
 switchport mode trunk
!

vlan 10

vlan 20

test ping

It’s work

for configuration vswitch 

Setting Up VLANs in VMware ESXi 6.5

VMware ESXi 6.5 will handle all traffic routing for any VMs on its host. Therefore, we first need to configure networking in ESXi to route traffic over the VLAN(s) we choose. To do this, log in to your ESXi host and then select Networking on the left-hand sidebar. By default, you will be taken to the Port groups tab.

networking_tab.jpg

From this tab, click the Add port group button. Choose a name for your port group and a valid VLAN ID over which you want to route traffic.

Note: A valid VLAN ID must be between 2 and 4000.

add_pg.jpg

Click the Add button when you are done and your new port group will be selected. This concludes all of the networking necessary for ESXi to route VM traffic over VLANs. However, we still need to change certain settings in our VMs to ensure that they have NICs assigned to our new port groups.

Note: In this example, we assume that we are changing settings on a preexisting VM. However, these same settings can be changed during the creation of a VM in ESXi.

First, click the Virtual Machines tab on the left-hand sidebar.

virtual_machines.jpg