VMWare Network issue

Nebul0us

Lifetime Supporting Member
Join Date
Dec 2015
Location
Spokane, WA
Posts
125
Hi all,

I know this is more of a networking or VMWare issue rather than a PLC issue. But this forum has been very helpful to me and am hoping for similar results.

Windows 10 host, windows 7 pro guest....both 64-bit. Using VMWare Workstation 12.

The problem I am having, is that I will be connected to a PLC and when I turn my WiFi on, I lose connection. I can still ping the PLC from my host, but I can no longer ping it from my guest. I have 3 adapters setup in the VM. Bridged, NAT, and Host-only.

Can anyone shed some light on this for me?
 
In VMware go to the Edit menu and select Virtual Network Editor. In the upper portion of the window select your Bridged VMnet. Below that is where you specify which host network adapter will act as the bridge device. If you want it to use your wired connection, select the wired adapter. Do not leave it on the auto option as that tries to use all host network adapters and it gets confused.

VMware supports those three types: NAT, Bridged, Host-Only. But which one is your VM using? Typically I use Bridged. For the specific VM you are using go into the settings and verify that the Network Adapter is set to Bridged.

So there are two different places to configure settings. The first one is VMware-wide. Affecting all VMs. The second is specific to that one particular VM.

Now it is also possible to have more than one bridged adapter and it is possible for a VM to have more than one network adapter. That gets a little more advanced. If your VM has more than one adapter (you said it had three) then you need to specific for each adapter whether they are Bridged, NAT, or Host only. Typically you should not need more than one adapter per VM unless you require the use of different physical networks.

OG

** EDIT **
The more I read your post the more confusing it gets. You should not need a NAT and a bridged adapter on the same VM. I think that is screwing things up. My guess is that you are talking with the PLC using the bridged connection and then when you switch on your WiFi that is being used as a NAT connection. I suspect the traffic to your PLC is getting rerouted through the NAT connection and getting lost. When you have a NAT connection you are essentially inserting a router onto your Host/VM communications.

Perhaps try a TRACERT command to the IP address of the PLC. From a command prompt type "Tracert 192.168.1.101" without the quotes with your PLC IP address is. See if it gets lost. If it returns with one hop and then gets lost on the second hop it is the NAT that is the issue.
 
Last edited:
The problem I have with WiFi is when it connects you now have another gateway. I found if I hard code my IP in the local adapter with no gateway then all is fine.
 
So I have been doing some troubleshooting this morning. It seems the VM has nothing to do with my problem. Fact is, with the VM off, I can only ping my PLC from my HOST with WiFi disabled. My laptop for whatever reason will not talk to devices via ethernet IF my WiFi is enabled. Does anyone have a solution?
 
Just to be clear, I have an Ethernet cable plugged in to my laptop. I can ping my PLC at 10.10.10.50 no problem, up until I turn the WiFi on to access my company LAN. Once I enable my WiFi, I can no longer ping my PLC. This is on my HOST with VMWare completely shut down.
 
Do a route print w/ just the ethernet plugged in and then do another w/ the wifi turned on. Make sure there's still a route to your PLC subnet..
 
Do a route print w/ just the ethernet plugged in and then do another w/ the wifi turned on. Make sure there's still a route to your PLC subnet..

Ok I did. Not sure what I am looking at. Could use some help, please see links for pics.

My ethernet adapter in laptop has a static IP of 10.10.10.250
PLC static IP is 10.10.10.50

WiFi Disabled: http://imgur.com/uPMiw4m

WiFi Enabled: http://imgur.com/SyzSF0d
 
Ok, so the pertinent bit is that with your wireless enabled there's a route to the 10.10.10.0 subnet for both the wired and wireless cards. And the metric for the wired card is a higher number(which means lower priority).

So, it is trying to hit 10.10.10.x through your wireless card first.

Couple of ways to deal w/ this -
You can change the route metric for the wired connection to 10.10.10.0 , You'll need to open an elevated command prompt for that and it will use the same route.exe you used to print the routes.

You can change the metric for the wired interface entirely, You do this from the Connection properties for the wired interface. Hit the advanced button below where you can set the IP and you should see a box w/ a checkmark labeled "Automatic Metric".
Uncheck that, set the metric to 10 or so. And do a reboot.

There's also some GUI tools to do this sort of thing, Try NetRouteView for that.
 
Ok, so the pertinent bit is that with your wireless enabled there's a route to the 10.10.10.0 subnet for both the wired and wireless cards. And the metric for the wired card is a higher number(which means lower priority).

So, it is trying to hit 10.10.10.x through your wireless card first.

Couple of ways to deal w/ this -
You can change the route metric for the wired connection to 10.10.10.0 , You'll need to open an elevated command prompt for that and it will use the same route.exe you used to print the routes.

You can change the metric for the wired interface entirely, You do this from the Connection properties for the wired interface. Hit the advanced button below where you can set the IP and you should see a box w/ a checkmark labeled "Automatic Metric".
Uncheck that, set the metric to 10 or so. And do a reboot.

There's also some GUI tools to do this sort of thing, Try NetRouteView for that.

Makes sense. So I believe I changed the metric for my ethernet adapter to a higher priority than WiFi, but it did not solve my problem. Route print still shows a metric of 55 for WiFi and 266 for Ethernet. I have pasted a link to a screenshot of how I changed the metric...

http://imgur.com/a/insk5
 
Huh, ok, yes that should have worked. Hrmm, alright you can try a more involved change..

Code:
route change 10.10.10.0 mask 255.255.255.0 10.10.10.250 metric 5 IF 20

Run that, then do a route print and see if the metric for the 10.10.10.0 addy using 10.10.10.250 has changed

If THAT works, and you can then connect to your PLC, you can save that route permently using
Code:
 route -p add 10.10.10.0 mask 255.255.255.0 10.10.10.250 metric 5 if 20
 
Huh, ok, yes that should have worked. Hrmm, alright you can try a more involved change..

Code:
route change 10.10.10.0 mask 255.255.255.0 10.10.10.250 metric 5 IF 20

Run that, then do a route print and see if the metric for the 10.10.10.0 addy using 10.10.10.250 has changed

If THAT works, and you can then connect to your PLC, you can save that route permently using
Code:
 route -p add 10.10.10.0 mask 255.255.255.0 10.10.10.250 metric 5 if 20

Ok I will try that in the morning. I get a little more time in the AM to do stuff like this before I have to start being productive. I appreciate the help, thank you.
 
Huh, ok, yes that should have worked. Hrmm, alright you can try a more involved change..

Code:
route change 10.10.10.0 mask 255.255.255.0 10.10.10.250 metric 5 IF 20

Run that, then do a route print and see if the metric for the 10.10.10.0 addy using 10.10.10.250 has changed

If THAT works, and you can then connect to your PLC, you can save that route permently using
Code:
 route -p add 10.10.10.0 mask 255.255.255.0 10.10.10.250 metric 5 if 20

This worked great. I now look like a hero at my new job they couldn't figure this out for the last year. I really appreciate it, thanks so much!
 
Happy to help!

Okay, so we did the same thing with my coworkers laptop and it wont connect at all with ethernet now. Ethernet adapter set to 10.10.10.250 and PLC is 10.10.10.10 and it wont connect. We had to do a route -f to clear the routes. It will now only connect with WiFi off again. After clearing the routes we did the route add command again with the same results, it would no longer connect or ping 10.10.10.10 from 10.10.10.250 at all regardless of wifi being on or off. Any ideas?
 
Okay, so we did the same thing with my coworkers laptop and it wont connect at all with ethernet now. Ethernet adapter set to 10.10.10.250 and PLC is 10.10.10.10 and it wont connect. We had to do a route -f to clear the routes. It will now only connect with WiFi off again. After clearing the routes we did the route add command again with the same results, it would no longer connect or ping 10.10.10.10 from 10.10.10.250 at all regardless of wifi being on or off. Any ideas?

The interface # for his wired card is probably different than yours.

So in the format of this command
route change 10.10.10.0 mask 255.255.255.0 10.10.10.250 metric 5 IF 20
IF 20, is specifying interface 20 for the route.

Do a route print on his machine, look for the Interface list at the top, find the wired card and I bet it isn't 20. Try the command again(don't use -p until you know it works, that way you can just restart the computer to clear it) using the correct interface number.
 

Similar Topics

I've built a vmhost (ESXI 7) to host the control's engineers W7 machines used to connect to the PLCs. I'm using a Stratix 5700 to NAT the PLCs...
Replies
9
Views
2,366
Greetings all. I am having a new problem with my VM. Host OS is 11 and VM OS is 10. I have two smaller monitors that connect to my laptop which...
Replies
6
Views
550
So, I have a little dillemma I am trying to work through but I feel there is probably a better way. I've always liked the idea of using a VM in...
Replies
5
Views
1,958
*VMWare vCenter Converter Standalone version 6.3 & 6.4 Hello Experts I want to convert my current physical hardware machine to a virtual...
Replies
2
Views
1,533
Hello Hivemind My wife has a legacy machine at her work which uses (or I should used) an XP desktop with a serial port to communicate with a...
Replies
5
Views
1,033
Back
Top Bottom