VMware Communities
Avagadro
Contributor
Contributor
Jump to solution

Configure host and VM on two separate wireless networks

Hello community, I've been a long time browser but this will be my first post.

I'd like to start out by saying I've always found the answer I was looking for by browsing these forums, and that I have browsed discussions related to this topic and consulted the chapters concerning virtual networking in the Workstation 7.1 manual, but at this point still have been unable to solve my problem.

The scenario:

I am a small business owner working out of a home(upstairs)/hookah lounge (downstairs). We recently got a second internet connection (WORK), in addition to my family's home internet (HOME), to provide our customers with free wi-fi. I would like to utilize the WORK connection (during our off hours) in an Ubuntu VM for folding and seeding torrents. I want to set this up to where the traffic on one network will not affect the other.

The network:

Host OS: Windows 7 Pro 64bit

Network adapter (host): Intel PRO/Wireless 3945ABG (Mini PCI)

VM: Ubuntu 10.04 on VMWare Workstation 7.0.0 build-203739

Network adapter (VM): Alfa awus036h (USB)


The current configuration:

Network connection is bridged, Replicate physical physical network state is unchecked.

The Alfa is connected to the virtual machine and no longer shows up on the Windows list of network adapters.

It seems I have to manually disable the "auto eth 1" interface or the VM uses the host internet connection instead of the desired network that the Alfa connects to in VMWorkstation. The internet speed with auto eth 1 is connected is fast and consistent, but using it defeats the purpose. Strangely, when I go the the network connections, under "last used" for "auto eth 1," it says "never."

When "auto eth 1" is disconnected, it seems the VM is using the wireless network that the Alfa is connected to. But, the internet speed is quite slow and inconsistent. On downloads, the speed fluctuates drastically; Also it stays at 0kb/s for a while before going to 80kb/s and then works its way back down to 0kb/s again.

Possible solutions:

1. Has this been a driver issue for the Alfa inside the VM environment this whole time?

2. Have I just misunderstood how to configure this kind of virtual network?

3. Is it possible to achieve the desired configuration by bridging WORK and VMnet0/1/8?

*Note: Only VMnet1 and VMnet8 show up on the Windows Network Connections, however isn't VMnet0 the one responsible for bridged networking?

4. Would upgrading to current version of Workstation prove useful?

5. Is this problem originating because of some router settings?

*Note: The AP is close enough to provide a 85-90% signal strength

Sorry for being so verbose, I just wanted to be as clear as possible because I am still a beginner learning about virtualization.

Thank you in advance, as always, your help is greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

First I need to say that when I made that last reply I was on my Mac and I was thinking about the configuration from a Windows XP Host however aside from the nomenclature of the Host Network Settings dialog box names the rest stands as is on a Windows 7 Host as both described below including an attached image.

On a Windows 7 x 64 Host with two Network Adapters, each one on a different Subnet and VMware Workstation 7.1.3 installed with the Virtual Machine Network Editor configured to have VMnet0 and VMnet2 bridged separately to one of the Host's NIC's and I have not modified the Windows 7 Host NIC-1 settings and have Internet/Network Connectivity for the Host from this NIC as shown in the image Google in IE on the Host.  In VMware Workstation 7.1.3 I have a Linux Guest configured to use VMnet2 which is bridged to the Windows 7 Host NIC-2 and in the settings have everything except for VMware Bridge Protocol unchecked and have Internet/Network Connectivity in the Guest as shown by Google in a Browser.

From the perspective of Network Connectivity between the Host and Guest via NIC-2 on the Host when everything except for VMware Bridge Protocol unchecked there is no connectivity between the two on this Subnet as there are no Protocols in play to allow that conversation to take place.

So conceptually and in practice what I previously said, albeit not originally stated explicitly with a Windows 7 Host in mind, nonetheless what I've said is true and correct as proven by real world testing/use per what I've said herein and with attached image.

FWIW Windows 7 was configured with all default settings and the only modifications to the Host's Network were those made when installing VMware Workstation 7.1.3 so with the configuration I've discussed along with the attached image there is no reason why the Host and Guest cannot be on separate Physical Networks and each having Internet/Network Connectivity based on the information I've provided and they be isolated from each other by being on separate Physical Networks.

That said, while they may be isolated by being on separate Physical Networks there can still can be connectivity between the 2 via VMware Shared Folders  it it's enabled and of course Drag & Drop and other services so if absolute isolation is needed to the point in which it can be and the Guest OS still be running in a Virtual Machine in the Host you would need to disable the Backdoor so VMware Tools cannot provide VMware Shared Folders, Drag & Drop and other services.  So if you need that level of isolation let me know and I'll provide additional information to accomplish it.

View solution in original post

0 Kudos
10 Replies
continuum
Immortal
Immortal
Jump to solution

I believe you want to use the WLAN inside the VM - correct ?
Then you must connect the Alfa as a USB-device to the VM

Do not configure the Alfa on the host at all

Start the VM - give it focus and then plug in the Alfa


about the update:

do not upgrade if everything works for you - wait for 7.5 or 7.1.4 before changing


________________________________________________
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
WoodyZ
Immortal
Immortal
Jump to solution

Well you've tried connecting the (WORK) WiFi Network Adapter directly to the VM and you're not happy with the results so another option would be to keep the (WORK) WiFi Network Adapter connected to the Host and then in the Virtual Network Editor set VMnet2 to be bridged to the (WORK) WiFi Network Adapter and then in the VM's Network Adapter Settings set the Network Adapter to Custom using VMnet2.  Then to isolate the (WORK) WiFi Network from the Host yet have it available for the Guest then on the General tab of the (WORK) WiFi Network Adapter Properties on the Host uncheck everything except for the VMware Bridged Protocol.

Also I see you're using the first release of VMware Workstation 7 and I'd never keep running the initial release when there have been 5 updates since so you should consider upgrading.

As far as continuum's suggestion not to upgrade I have to strongly disagree since there are some security issues that have been resolved and only use a lesser version if the latest is problematic on your system, as you can always uninstall/reinstall if necessary and this does not remove your Virtual Machines.  That said, while some Users have experienced issues with any given release I can only speak to my usage and I'm using VMware Workstation 7.1.3 on Windows XP SP3 and have no issues in the manner in which I'm using it.  I'm also running the same on Windows 7 x64 without SP1 and have SP1 blocked from being installed due to issues with SP1 and VMware Workstation and again have no issues in the manner in which I'm using it however YMMV.

Message was edited by: WoodyZ

WoodyZ
Immortal
Immortal
Jump to solution

I believe you want to use the WLAN inside the VM - correct ?
Then you must connect the Alfa as a USB-device to the VM

The OP said "The Alfa is connected to the virtual machine and no longer shows up on the Windows list of network adapters." so it's already directly connected to the Guest and he's not happy with the performance hence the suggestion I offered.

0 Kudos
Avagadro
Contributor
Contributor
Jump to solution

WoodyZ,

Thank you for that suggestion, the host internet is running at a desirable performance. The main improvement I observed was minimal packet loss when pinging google.com. It used to be about 30-50% when the usb network adapter was connected to the guest, now it has been consistently 0% packet loss when bridged from the host.

I've run into 2 minor problems with your approach:

1. I'm guessing by default, VM Workstation changes the adapter settings in this configuration. In network adapter bridged to the guest, Internet Connection Sharing was activated, which caused any packets transmitted to the guest to be re-routed through the host before going to the router. This was easily addressed by going to Network Connections->Properties (bridged adapter)->Sharing, and disabling sharing. After this, internet speeds on the host nearly doubled.

2. In order to maintain exclusivity each network adapter on host and guest, you suggested I uncheck all all the items under Networking except VMware Bridge Protocol. This resulted no internet access to either the host or the guest. It makes sense that TCP/IPv4 protocol remain enabled for internet access. But, even with just VMware Bridge and IPv4 protocols enabled, the host is still able to access the internet through this adapter. I tried changing the priority of network adapters in Network Connections->(alt)Advanced->Advanced Settings, but it seems Windows still wants to use the adapter with the higher signal, which happens to be WORK Smiley Sad

If anyone knows how to configure a network adapter to work exclusively in Workstation when bridging an internet connection connected to the host, your help is greatly appreciated. Or, how to prioritize network adapters in Win7.

Also WoodyZ, thanks for the info on Win7 SP1. I've been looking more into it and it seems SP1 has many serious issues in addition to incompatibilities with Workstation. I'll be updating my Workstation and saving my Win7 update until some kind of SP1 revision.

0 Kudos
Avagadro
Contributor
Contributor
Jump to solution

There is a different way to prioritize network adapters:

In Win7:

1. command line: netstat -r, and note the Windows default priorities for the network adapters. Under "Interface List," make sure the desired host adapter has a lower interface metric (displayed to the left of the MAC address for each adapter)

2. You can use the method I explained in my previous post to change the priority. The change is confirmed by running "netstat -r" again, but for some reason this had no effect on which adapter the host would use

3. If the problem persists (as it did for me) Network and Sharing Center -> Change adapter settings -> right-click desired adapter -> Properties -> Do this for both Internet Protocol Version 4 and 6 -> Properties -> Advanced -> Change the interface metric to "3"

*note: Windows Loopback Adapter should have an interface metric of "1"

Although the change in interface metric isn't reflected by "netstat -r," the host now uses the correct network adapter.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

First I need to say that when I made that last reply I was on my Mac and I was thinking about the configuration from a Windows XP Host however aside from the nomenclature of the Host Network Settings dialog box names the rest stands as is on a Windows 7 Host as both described below including an attached image.

On a Windows 7 x 64 Host with two Network Adapters, each one on a different Subnet and VMware Workstation 7.1.3 installed with the Virtual Machine Network Editor configured to have VMnet0 and VMnet2 bridged separately to one of the Host's NIC's and I have not modified the Windows 7 Host NIC-1 settings and have Internet/Network Connectivity for the Host from this NIC as shown in the image Google in IE on the Host.  In VMware Workstation 7.1.3 I have a Linux Guest configured to use VMnet2 which is bridged to the Windows 7 Host NIC-2 and in the settings have everything except for VMware Bridge Protocol unchecked and have Internet/Network Connectivity in the Guest as shown by Google in a Browser.

From the perspective of Network Connectivity between the Host and Guest via NIC-2 on the Host when everything except for VMware Bridge Protocol unchecked there is no connectivity between the two on this Subnet as there are no Protocols in play to allow that conversation to take place.

So conceptually and in practice what I previously said, albeit not originally stated explicitly with a Windows 7 Host in mind, nonetheless what I've said is true and correct as proven by real world testing/use per what I've said herein and with attached image.

FWIW Windows 7 was configured with all default settings and the only modifications to the Host's Network were those made when installing VMware Workstation 7.1.3 so with the configuration I've discussed along with the attached image there is no reason why the Host and Guest cannot be on separate Physical Networks and each having Internet/Network Connectivity based on the information I've provided and they be isolated from each other by being on separate Physical Networks.

That said, while they may be isolated by being on separate Physical Networks there can still can be connectivity between the 2 via VMware Shared Folders  it it's enabled and of course Drag & Drop and other services so if absolute isolation is needed to the point in which it can be and the Guest OS still be running in a Virtual Machine in the Host you would need to disable the Backdoor so VMware Tools cannot provide VMware Shared Folders, Drag & Drop and other services.  So if you need that level of isolation let me know and I'll provide additional information to accomplish it.

0 Kudos
Avagadro
Contributor
Contributor
Jump to solution

It is clear from your attached picture that having only VMware Bridge Protocol enabled on NIC2 that your host has internet connectivity. I can't seem to find any difference between our two configurations with the exception of my prioritizing NICs. When I tried leaving only VMware Bridge Protocol enabled, the host Win7 machine shows limited connectivity to the network and the guest has no connectivity. Every other detail shown in your attached picture is identical to my configuration.

Maybe the discrepency lies in your using wired NICs while I'm using wireless NICs. Or perhaps there was some setting I've modified and am overlooking.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

It is clear from your attached picture that having only VMware Bridge Protocol enabled on NIC2 that your host has internet connectivity. I can't seem to find any difference between our two configurations with the exception of my prioritizing NICs. When I tried leaving only VMware Bridge Protocol enabled, the host Win7 machine shows limited connectivity to the network and the guest has no connectivity. Every other detail shown in your attached picture is identical to my configuration.

Maybe the discrepency lies in your using wired NICs while I'm using wireless NICs. Or perhaps there was some setting I've modified and am overlooking.

Some how I just knew you were going to say that so here is what I did.  I dug up an old Belkin Wireless G USB Network Adapter and downloaded the Drivers for Windows 7 x64 and installed it on the Host while keeping the default setting during the install.  This of course means until I modify its Properties the Host will have Internet/Network Connectivity to the WiFi Network as well and this while ultimately not wanted nonetheless I what to make sure both the Host and the Guest have Internet/Network Connectivity on the WiF Network before modify the Host's WiFi Adapters Properties.  I then changed VMnet2 in the Virtual Network Editor to use the Belkin Wireless G USB Network Adapter.  Next I temporarily disabled the Host's Wired Network Adapters to test the WiFi so I then joined the WiFi Network from the Windows 7 x64 Host and made sure it had Internet/Network Connectivity, and it did.  Next I started VMware Workstation 7.1.3 and booted the Linux Virtual Machine and confirmed it too had Internet/Network Connectivity, and it did.

At this point both the Host and the Guest have received valid IP Addresses however of course they are on the same Subnet and we want to isolate the Host from the Subnet the WiFi Network Adapter is connected to as well as the Virtual Machine so at this point with the exception of VMware Bridge Protocol I unchecked all other check boxes on the Networking tab of the Wireless Network Connection Properties dialog box.

I of course no longer had Internet/Network Connectivity on the Host via the WiFi Network Adapter at this point so next I checked to see if the Guest still had Internet/Network Connectivity and like you I too did not.

This is not the case on my Windows XP Host however you're using a Windows 7 Host so the only relevance is my state of mind in the original reply regarding this as a solution.  So now what changes need to be made to allow the Guest to have connectivity yet keep the Host off of the WiFi's Subnet.

After a very brief moment of thought about how to only enable one item in the list to give connectivity to the Guest while keeping the Host isolated from the WiFi's Subnet I did the following.

On the Networking tab of the Wireless Network Connection Properties dialog box in addition to the already, and at this point only, checked VMware Bridge Protocol I also checked the Internet Protocol Version 4 (TCP/IPv4) check box and then clicked the properties button to disable DHCP and isolate the the Host by using the following settings:

IP address: 169.254.1.1
Subnet mask: 255.255.0.0
Default gateway: [Left Blank]

Preferred DNS server: 192.168.2.1
Alternate DNS server: [Left Blank]

At this point the Guest has Internet/Network Connectivity and the Host does not as it is not able to communicate with the Guest or the WiFi Subnet the Guest is on as the Guest is using 192.168.2.157/24 with a Default Gateway and Preferred DNS Server using 192.168.2.1.  This was the minimum amount of setting changes to enable the Guest to have Internet/Network Connectivity while depriving the Host access to the WiFi's Subnet and Guest.

Next I enabled one of the Host's Wired Ethernet Adapters and it is configured via DHCP with the following relevant information:

IP address: 172.16.36.139
Subnet mask: 255.255.255.0
Default gateway: 172.16.36.1

Preferred DNS server: 172.16.36.1

Now both the Host and the Guest have Internet/Network Connectivity separate and apart from each other on separate Subnets and cannot directly communicate with each other.  So within this use case scenario this I believe achieves your goal does it not? Smiley Wink

0 Kudos
Avagadro
Contributor
Contributor
Jump to solution

Honestly, you're incredible.

I will edit the original post to direct future visitors to the relevant posts.

Consider this, since I am running this on a laptop, even though I don't really take it around with me much, if in the case I do require my laptop to connect to a foreign network, would the preset ip/dns server addresses restrict my internet connectivity? If that is the case, would unchecking the VMware Bridge Protocol for the host nic maintain isolation in the same way?

I really do want to learn more about virtualization and networking to find ways to use this configuration to its potential, could you recommend any reference material or websites to help me get started?

Again, Thanks!

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

Consider this, since I am running this on a laptop, even though I don't really take it around with me much, if in the case I do require my laptop to connect to a foreign network, would the preset ip/dns server addresses restrict my internet connectivity?

Yes most certainly as that was the purpose with that particular configuration.

If that is the case, would unchecking the VMware Bridge Protocol for the host nic maintain isolation in the same way?

The only thing unchecking the VMware Bridge Protocol will do by itself will stop the Guest from using a Bridged connection on that Interface.

Because of work I routinely have to be on different Networks on a regular basis much less when I travel and while there are programs available to control multiple configurations for a given Network Adapter to cover this very scenario nonetheless I have been using my own scripts to manage all the different Networks that require different settings when not using DHCP.  As an example in my office the Notebook is explicitly configured with static information and once I leave the office the next stop may require being on a different Subnet, etc., whether statically assign or using DHCP in either case a couple of mouse clicks and the rest is automated via scripting.  Quick, easy, effective and most of all free and not having had to pay for a program that does the same thing.

I really do want to learn more about virtualization and networking to find ways to use this configuration to its potential, could you recommend any reference material or websites to help me get started?

As I look to my bookshelves where there are literally a couple hundred books covering Computer Hardware, Software and IT Specialties and where there may be a half of dozen to a dozen for each language I used to program in or usually no less then three or four books on each given specific area or as an example sets of books used for different MCSE certifications or even just a program like Adobe Photoshop if there is one thing I found out early on is that there is no one book that covers any given area completely.  Also because of the writers style one will find one authors book on the same subject covering exactly the same topics easier or harder to comprehend compared to another.  Which in some cases is why I have more then a single copy on a even given subject that I've purchased.  Now to the long drawn out point... If there is one thing I've found better then the books I've read, and nowadays in many ways more practical, is the power of Google and having learned how to search the Internet effectively and is a skill may Users haven't mastered.

So, having been a veracious reader over the years and Google is my Home Page for a good reason, so my best suggestion is just read everything you can whether it be books or on the Internet, it's all out there. Smiley Wink

0 Kudos