VMware Cloud Community
SangramKRath
Contributor
Contributor

Connecting two vms in separate portgroups with separate subnets

I have one free esxi installation. It has two vms in separate portgroups but same vswitch. The vswitch has 4 vmnics. The subnets in each of these portgroups are different (for example: portgroup1 has 192.168.1.x and portgroup2 has 192.168.2.x). Is it obvious that the vms can't talk to each other (because subnets are different)?

If I use same VLAN ID (for example 100) I loose network connectivity to VMs (can't rdp)

If I use VLAN 0 or ALL, I can connect to vms, but the two VMs can't communicate with each other.

There are machines that connect to one of the VM and I want these machines to be able to see the other VM (in a separate portgroup). And I also want them to be in different subnets. Is this possible?

(Currently I use two different vswitches, two nics in the VMs, each nic connected to one vswitch and they can talk to each other. But when outside machines connect to one of the VMs, they can't see the other VM).

0 Kudos
1 Reply
RyanH84
Expert
Expert

Hi,

What are the 4 vmnics connected to outside of the ESXi host?

You will need the default gateway to be able to route between the subnets, depending on what that is. Setting the VLAN ID will not work unless the traffic coming in is tagged with that ID.

What is the mask and the DG that you are using in both of your subnets? If your router allows it, you could create one big LAN such as:

IP Range:  10.10.x.x

Subnet Mask: 255.255.0.0

Default Gateway:  10.10.x.x

That is one hell of a SM though with 1000's of addresses, I'd probably try and reduce the number of addresses on it by setting the SM to 255.255.248.0 for example. Depends on your network devices and your configuration. I'm also not great with networking and no way near anything like CCNA, just trying to help!

Cheers,

Ryan

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos