VMware Communities
johninbklyn
Contributor
Contributor
Jump to solution

How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1)

Running Fusion 1.1 (62573) on Mac OS X 10.5.1.

I have a Blackberry that, for reasons that are too boring to get into, is not supported as a dial-up USB modem by Verizon Wireless on Mac OS X. They do, however, support it on Windows machines using their native VZAccess desktop client.

I am able to connect with the Blackberry using my Windows XP virtual machine. What I would like to do us use the virtual machine as a gateway through which the Mac OS will get its internet connection.

In short, I want to use the Windows XP virtual machine solely as a means of getting access to the tethered (and, most likely faster -- that is, relative to what I can get through the Bluetooth tethered dial-up connection on the Mac side) connection.

I'm guessing that if this is possible it entails using Bridged networking and a particular set of networking configurations on the Windows VM, but this is beyond the scope of my knowledge, and I would appreciate any help offered.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
nospamboz
Enthusiast
Enthusiast
Jump to solution

those "en2" and "en3" connections were Parallels connections, I believe.

In any event, I removed them.

Aside: Now you know why I decided on VMware instead of Parallels.

Imagine, littering my system with pseudo-interfaces! If you look around

a bit, you'll find that's not all the clutter they leave around. The VMware

implementation is much cleaner.

VMWare is set to host-only networking.

I think you need to use bridge mode to do what you're planning on doing.

192.168.86.129 (vmnet1) appears to be the common denominator here.

Is it a matter of adding this address as the default gateway on the Mac side?

Basically, yes, although it's whatever the VM IP address turns out to be when

you switch to bridge mode. Also, on the Windows side, you need to setup

internet connection sharing between your Ethernet adapter (VM-host) and

PPP adapter (Verizon). I'm not sure what kind of nomenclature that system uses,

but basically you're going to be sharing your VM's internet connection with your

host (Mac OS), as if you were sharing your internet connection with the rest of your

home LAN.

You'll notice that none of the Internet destinations in the "netstat -nr" output have the

G flag indicating a gateway. That's good, because it means adding a gateway shouldn't

break anything.

Before adding the gateway, make sure your bridged host-VM connection works

with a command like:

ping -n 192.168.86.129

The gateway command I gave you before was more Linux-ish. The BSD-ish command

will be more like:

route add default 192.168.86.129

Of course, you need to do that as root, so "sudo" it, if required. If successful, it should

add a line to the "netstat -nr" output that looks like:

default 192.168.86.129 UGSc

That way, your VM will be the Mac host's internet gateway, and the VM's internet

connection sharing will route the packets properly.

To test the Windows internet sharing from the Mac, see if you can ping your Verizon gateway.

ping -n 72.119.31.129

Last (I think) you need to tell your Mac what to use for DNS. Just edit the file

"/etc/resolv.conf" to reference the same name servers the Verizon modem uses

as indicated by the Windows "ipconfig /all" output. Using your sample, the

file needs to contain the lines:

nameserver 66.174.95.44

nameserver 69.78.96.14

(Actually, I only suspect that DNS trick will work, as I'm no expert at Mac DNS.

Better "ping -n" those addresses first from the Mac to make sure they're accessible.)

To test DNS, try the command "host www.vmware.com". If that works, try going there in

your Mac browser.

View solution in original post

0 Kudos
16 Replies
nospamboz
Enthusiast
Enthusiast
Jump to solution

I think this all boils down to routing and gateways. I assume your Verizon modem

will be assigned an IP address when it connects to Verizon, and your VZaccess

sets up Windows networking to use Verizon's routing as an internet gateway.

It looks like you'll need two things. First, regardless of whether you use NAT

or bridged networking in Fusion, your Windows VM is going to need to route

packets between the two network "cards" it will have: one for the modem

and one to the VM's host system. I'm not quite sure how to do that, but a

good place to start searching will be along the lines of "How to use Windows

as a router between two network cards?". There's probably free software that

does it, if Windows doesn't do it natively already. It will probably be known as

something like Windows Internet Sharing.

Second, you'll need to tell Mac OS X to use the VM network interface as

its default gateway. I don't have access to my Mac at the moment, but

Mac OS is very BSD-ish, so the command will probably be something like:

route add default gw IP-address-of-Windows-VM-via-NAT-or-bridged

Your question implies that there is no other networking on your Mac OS system,

so there shouldn't be an already existing default gateway to cause problems.

I hope that's enough information to get you started.

johninbklyn
Contributor
Contributor
Jump to solution

Ok. I give. I gave it my best shot but, not being a Windows or BSD person, I kept running around in circles. I got as far as using the Windows Internet Connection sharing interfaces, but beyond that I had no success. I don't even know how to get the Windows machine's IP address. The two ethernet connections appear on the Mac side as en2 with an IP of 10.37.129.2 and en3 with and IP address of 10.211.55.2. I assume that one of these is the VMWare's ethernet connection.

Any chance you could provide further instructions?

0 Kudos
nospamboz
Enthusiast
Enthusiast
Jump to solution

Can you post the output of the following command in a Terminal window on your Mac?

netstat -nr

You need to do it twice: once without the VM running, once with.

That will provide some useful information regarding your current networking setup.

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

Virtual Machine Off

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

Virtual Machine On

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

My Network Preferences (screens for en2 and en3)

0 Kudos
nospamboz
Enthusiast
Enthusiast
Jump to solution

It looks to me like your Mac thinks that it already has internet connectivity.

These are all the important network interfaces I see:

192.168.1.x I think it must be Airport?

192.168.86.x vmnet1 (bridged VM network)

192.168.235.x vmnet8 (NAT VM network)

10.37.129.x en2

10.211.55.x en3

This sure is complicated. What are en2 and en3, and why do they only appear when your VM is started?

They've been given IP addresses (10.37.129.2 and 10.211.55.2, repectively), so something is using them.

Was your VM migrated from Parallels, by any chance?

I don't think they're associated with Fusion. The Fusion ones are vmnet1 and vmnet8, bridged and NAT,

respectively. It looks like neither one is being used, as your VM and host haven't assigned IP addresses.

I'm guessing that your Airport wireless network is active. Your Mac is 192.168.1.4, and your wireless

router is 192.168.1.1. Right now, your system thinks your wireless router is connected to the Internet,

and is routing packets that way. That's what the default gateway reference means.

Can you run this command on your Windows VM in a command prompt window, and post the output?

ipconfig /all

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

Sorry about the last posting. I think I can simplify the screenshots.

I downloaded and installed the trial version of Parallels but I haven't even gotten around to making a VM for it. So, no -- the VMWare Windows XP installation I'm running was not migrated from Parallels. Now that you mention it, those "en2" and "en3" connections were Parallels connections, I believe. In any event, I removed them.

I disabled Airport and took the following screenshots:

netstat_with_vmware_off

This is netstat -nr in a stock configuration. No Airport connected.

netstat_with_vmware_on

This is netstat -nr once I booted WIndows XP in VMWare, and connected with my Blackberry using the Window's Verizon software. At this point I'm able reach websites on the Windows side. VMWare is set to host-only networking.

ipconfig_all

This is the output from ipconfig /all run from the WIndows command prompt.

192.168.86.129 (vmnet1) appears to be the common denominator here. Is it a matter of adding this address as the default gateway on the Mac side?

Thanks for your help.

0 Kudos
nospamboz
Enthusiast
Enthusiast
Jump to solution

those "en2" and "en3" connections were Parallels connections, I believe.

In any event, I removed them.

Aside: Now you know why I decided on VMware instead of Parallels.

Imagine, littering my system with pseudo-interfaces! If you look around

a bit, you'll find that's not all the clutter they leave around. The VMware

implementation is much cleaner.

VMWare is set to host-only networking.

I think you need to use bridge mode to do what you're planning on doing.

192.168.86.129 (vmnet1) appears to be the common denominator here.

Is it a matter of adding this address as the default gateway on the Mac side?

Basically, yes, although it's whatever the VM IP address turns out to be when

you switch to bridge mode. Also, on the Windows side, you need to setup

internet connection sharing between your Ethernet adapter (VM-host) and

PPP adapter (Verizon). I'm not sure what kind of nomenclature that system uses,

but basically you're going to be sharing your VM's internet connection with your

host (Mac OS), as if you were sharing your internet connection with the rest of your

home LAN.

You'll notice that none of the Internet destinations in the "netstat -nr" output have the

G flag indicating a gateway. That's good, because it means adding a gateway shouldn't

break anything.

Before adding the gateway, make sure your bridged host-VM connection works

with a command like:

ping -n 192.168.86.129

The gateway command I gave you before was more Linux-ish. The BSD-ish command

will be more like:

route add default 192.168.86.129

Of course, you need to do that as root, so "sudo" it, if required. If successful, it should

add a line to the "netstat -nr" output that looks like:

default 192.168.86.129 UGSc

That way, your VM will be the Mac host's internet gateway, and the VM's internet

connection sharing will route the packets properly.

To test the Windows internet sharing from the Mac, see if you can ping your Verizon gateway.

ping -n 72.119.31.129

Last (I think) you need to tell your Mac what to use for DNS. Just edit the file

"/etc/resolv.conf" to reference the same name servers the Verizon modem uses

as indicated by the Windows "ipconfig /all" output. Using your sample, the

file needs to contain the lines:

nameserver 66.174.95.44

nameserver 69.78.96.14

(Actually, I only suspect that DNS trick will work, as I'm no expert at Mac DNS.

Better "ping -n" those addresses first from the Mac to make sure they're accessible.)

To test DNS, try the command "host www.vmware.com". If that works, try going there in

your Mac browser.

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

Wow. Very thorough. Thank you so much for taking the time to write.

Lots of progress, and I think I'm almost there.

One issue is that I'm unable to start VMWare in bridged mode. I get the "/dev/vmnet0 not running" error. (I'm running the latest 1.1 version of Fusion on OS X 10.5.1.) Not quite sure what's causing this. I started in "host-only" mode just to see how far I could get.

1. Started VM with Windows XP. Connected with my Blackberry.

2. Added the default gateway 192.168.86.129

3. Added the Verizon nameservers to resolv.conf

4. Reloaded the DNS cache on the Mac with sudo dscacheutil -flushcache

At this point things are going well. I can ping to the outside world, and host www.vmware.com (and so on) resolves the names successfuly. And, obviously, I can call up websites in my web browser by IP address and clearly see the difference in speed. Tethered USB is a *much* better deal than Bluetooth dial-up, and I know this effort is worth it.

The rub is this -- although I can resolve names from the command prompt, none of my web browsers are able to do so. I can't get to http://www.vmware.com/ in Safari, in other words.

So, with that, I'm off to do some more creative Googling for the answer. You say you're not a Mac person per se so I don't expect you to have the answer to this current issue, but I'm grateful for all the help you given my so far. Thanks again.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

One issue is that I'm unable to start VMWare in bridged mode. I get the "/dev/vmnet0 not running" error. (I'm running the latest 1.1 version of Fusion on OS X 10.5.1.) Not quite sure what's causing this. I started in "host-only" mode just to see how far I could get.

Is this the message you got? If the Host does not have an active network connection on either the NIC or WiFi NIC then this message is quite normal and nothing is necessarily wrong with Fusion because of this message.

The rub is this -- although I can resolve names from the command prompt, none of my web browsers are able to do so. I can't get to in Safari, in other words.

I know your goal is to use Windows as your Gateway via your Blackberry however are you able to browse by URL in Windows? Have you tried using the IP Address in the Safari Browser? Try the following to see if you can get to Microsoft in Safari:

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

Hi,

Yes, that is the message I got concerning /dev/vmnet0.

Yes, once connected with my Blackberry, I'm able to surf with no restrictions on the Windows side. And -- once I've done the steps mentioned above -- I can view web pages by IP address in Safari on the Mac side.

The only remaining issue seems to be that I cannot view web pages by URL on the Mac side.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

I can view web pages by IP address in Safari on the Mac side. The only remaining issue seems to be that I cannot view web pages by URL on the Mac side.

Then I'd suggest that the issue is with DNS. I would try setting DNS on the Mac to the IP Address(es) used by Windows and see if that make a differance.

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

OK -- so the issue was that I could resolve names from the command prompt but not from my desktop applications. It turns out that one of the network interfaces in System Preferences must be turned on.

There might be better ways to do this, but I simply did a computer-to-computer network with Airport. I added Verizon's nameservers from the System Preferences, clicked apply, and my desktop applications were able to connect. (312 kbps download, vs. ~150 I was getting on Bluetooth.)

Thanks everyone for your help.

0 Kudos
nospamboz
Enthusiast
Enthusiast
Jump to solution

It turns out that one of the network interfaces in System Preferences must be turned on.

That sort of forces it to work, but it's probably not an optimal solution.

What if there is no other computer available to "network" to? Will it

still work?

Mac OS is a sort of b*stard child of several operating systems, and it

shows in a few of its sub-systems, like DNS. As you've experienced,

it has more than one place where it gets DNS information. One of these

is /etc/resolv.conf, from its BSD heritage, which makes DNS resolution

a system-wide setting, the *nix norm. The other place is via Network

settings, where DNS is coupled to a particular network interface. It may

make some sense (why enable DNS if the interface is down), but it

sometimes forces strange requirements, as it forced you to enable

one interface when it's the second interface that's actually used. The

design flaw here is assuming that all interfaces are configured through

Network settings, when they obviously don't need to be.

I've looked around, but there doesn't seem to be any clear cut way of affecting

the Network settings short of brute force editting. There's a file:

/Library/Preferences/SystemConfiguration/preferences.plist

...that seems to contain the Network settings, but there are multiple references

to DNS and I am unsure which one(s) to actually change. It can be editted with

a standard text editor, or, if you installed Xcode (it's on the Leopard DVD), using

"/Developer/Applications/Utilities/Property List Editor.app". On my system,

that file contains some kind of sub-heirarchy labelled

"NetworkServices/0/DNS" (that's a zero)

...that looks promising, but it's really up to you to try it out (and report please).

Ideally, your setup should work without the need to enable a network interface

you don't really need.

0 Kudos
johninbklyn
Contributor
Contributor
Jump to solution

I agree -- it's not an optimal solution. But it's actually a decent workaround. It turns out that don't have to modify resolve.conf at all. What's entailed is simply switching my Airport (wi-fi) connection to share it's connection with itself. (I know... it's strange. Why would anyone ever have to do that, right?) There's no additional wiring, and not additional computer necessary. After that, I then I plug the DNS values into the appropriate spots in the Airport interface and click "Apply."

I'm now in search of a method to automate the whole process -- getting the gateway address from the VMWare side, adding the default route, switching my Airport connection, and adding the DNS. Whew! I've done it a few times already and I can get used to it, but at the very least it's be nice to have a brute keystroke macro to do most of the work for me.

0 Kudos