VMware Communities
Jake1042
Enthusiast
Enthusiast
Jump to solution

How do I link two VMwares through their Network cards?

I have a VMware running an HMI-software. It picks up input from a PLC based on an IP-address. The VMware is bridged to a physical network card on the host-PC.

On the host-PC I run a PLC-simulation where the output is sent to the physical network card on the host PC.

Now I would like to run the PLC-simulation in another VMware.

So the question is: Can I connect a network card in one VMware to the network card in another VMware...?

If so - how is it then done?

0 Kudos
1 Solution

Accepted Solutions
Jake1042
Enthusiast
Enthusiast
Jump to solution

Turns out the two VMwares had same MAC-ID on the network card.

In trying to set this up, I just copied one but then answered "I moved it" when opening it. With two different MAC-IDs it works as described above - i.e. IP-addresses in the same mask and both VMs on e.g. VMnet2. Then I can ping one from the other and vice-versa.

View solution in original post

0 Kudos
16 Replies
RDPetruska
Leadership
Leadership
Jump to solution

Sure - just configure both VMs to use Bridged mode, and they will both be seen by the host as well as the outside world.

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

Both are bridged - but how do I "patch" them together..?

And it looks like they both bridge to the same network card on the host PC - as the "Virtual Machine Setting" for one VMware equals the setting for the other. I run the VMwares in a Workstation Player-14.

I would like to be able to ping the IP-address of the network card in one VMware from the other VMware.

0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

Just do it.  If the VMs are bridged, they will both use the host's NIC via software, and be seen as distinct separate computers on the LAN.

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

But I cant ping one from the other.

I assume that is the first step in establishing a working connection?

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

Just to clarify: Both VMwares are running on the same host-PC.

They seem to share the same network card on the host.

BUt I can not ping from one VMware to the other.

0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

If you can't ping them, check any firewalls in the guests.  Yes, if they both are on the same subnet (and since they are running through the same card they are connected to the same real world network switch, they should be), and can connect out, then they should be able to connect to each other, exactly as if they were 2 separate real physical computers on the network.

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

"in the guests" - does that mean the two VMwares?

I assume so. They have only Windows10 Firewall.

I have just tried turning off the firewall in both VMwares. But I still cant ping.

But how does it work: VMware1 bridges to a network card on the host PC. VMware2 bridges to the same network card on the host PC - as the Virtual Machine Setting appears to be for both VMwares.

Somehow I am not quite sure how the IP-address in one VMware transfers through to the bridged card and so on to the other VMware.

0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

You can have as many VMs using bridged mode as you want (unless the switch/router your NIC connects to has settings for the port to only allow a certain number of mac addresses).  Every PC should get its own unique DHCP IP address, in the same subnet range.

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

VMware1 has an internal NIC (Ethernet0 connection..) with the address 99.99.99.104 (submask 255.255.255.0)

It Bridges to a Microsoft Loop Back Adapter on the host PC. This NIC has 99.99.99.124 on the host-PC

WMware2 has an internal NIC (ETH1..) with the address 99.99.99.112 (submask 255.255.255.0)

(I believe..) it Bridges to the same Microsoft Loop Back Adapter on the host PC. This NIC has 99.99.99.124 on the host-PC

I can not specify a separate network card for the bridging - it takes what's has been set for VMware1.

From the host-PC I can ping 99.99.99.104.

From the host-PC I can NOT ping 99.99.99.112

0 Kudos
continuum
Immortal
Immortal
Jump to solution

Why do you use such obscure settings ???
Using a Microsoft Loop Back Device is not necessary at all.
Simply use the virtual network editor to bridge vmnet0 to the device that is also used by the host to connect to the internet.
Then use vmnet0 for both of your VMs.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

The reason for the loopback is that I used to have the PLC-simulator on the host PC - and then Siemens has a utility that can link a simulated IP-address to a NIC - for the purpose of simulating a PLC on a PC and allow an HMI on another PC to access that simulation through the NIC...

I Have the HMI in a VMware and then I need a NIC on the host-PC to bridge to from the VMware - and the loopback can do that. I could also use a physical (real) network adapter - but instead of using one for that - I created a loopback-adapter.

But then again - what do you mean by "Virtual network editor"? Is that where I can select which network card on the host-PC to bridge to?

Now I actually have both VMs bridge to the same loopback adapter - which I believe works in this sense just like the real network card (that my host used to connect to the internet).

Anyway - I want VMware2 to be able to ping the NIC in WMware1. How is that done?

0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

If you don't need LAN or internet access in either guest, you don't need any host NIC.  You can set each VM to use "Custom" network connection, and select one of the unused VMnet switches (2-7, 9) - make sure it's the same one used in both.  This will create a "guest-only" network connection - just like using a cross-cable to directly connect both physical PCs.  Set static IP addresses on each guest on the same subnet, and they should be able to communicate with each other.

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

now that looks like something for my use.

On VMware2 (the one from where I want to Ping VMware1) I can chose VMnet2 (and all from VMnet0 to VMnet19).

But on VMware1 I can only chose

- VMnet0 (Auto-Bridging)

- VMnet1 (Host-only)

- VMnet8 (NAT)

so where does that leave me..?

It does not work if I select 0, 1 or 8 on both.

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

Now I have both VMwares using "Network Adapter: Custom (VMnet2)"

Both have only one entry in the "Network Connections" in the Control Panel - with the description "Intel

(R) 82574L Gigabit Network Connection".

In VMware1 it is set to 99.99.99.104 (subnet 255.255.255.0)

In VMware2 it is set to 99.99.99.112 (subnet 255.255.255.0)

But I still can't ping 99.99.99.104 from VMware2.

What am I missing??

0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

I honestly don't know... if both computers are on the same physical network (which they are, as both set to VMnet2 virtual switch (hub), and have IP addresses on the same subnet/mask (which it appears they do), then the only way they would not communicate is firewall preventing traffic.

0 Kudos
Jake1042
Enthusiast
Enthusiast
Jump to solution

Turns out the two VMwares had same MAC-ID on the network card.

In trying to set this up, I just copied one but then answered "I moved it" when opening it. With two different MAC-IDs it works as described above - i.e. IP-addresses in the same mask and both VMs on e.g. VMnet2. Then I can ping one from the other and vice-versa.

0 Kudos