VMware

This Question is Answered

6 Replies Last post: Jan 25, 2008 4:55 PM by rcardona2k  

Sharing internet connection from guest to host posted: Jan 5, 2008 6:30 AM

Click to view pedroavarela's profile Novice 2 posts since
Jan 5, 2008

I am using VMware Fusion 1.1 under Mac OS X Leopard 10.5.1. I have a Windows XP Home Edition virtual machine runnning inside Fusion.
This Windows XP is accessing the internet through a USB modem which has no drivers for Leopard.

I would like to know how can I share this internet connection that Windows is using to he host system, Leopard, so that I can use specific Mac OS X native software, which I need.

Thank you so much.

Pedro Varela

Click to view rcardona2k's profile Champion 5,197 posts since
Oct 20, 2005
Create a bridged network connection to the host and turn on Internet Connection Sharing (ICS) in the Guest. That will assign a DHCP address to your guest on the bridged NIC and your Mac should be able to get a shared connection IP from the guest, i.e. another address in the DHCP address range, e.g.

1. Guest will have an ICS Bridged NIC address of 192.168.0.1
a public IP address on USB modem.
Enabled IP forwarding between bridged NIC and the USB modem.

2. Host will have a ICS DHCP-assigned or compatible address of 192.168.0.2, etc. and you should be able to share the connection.

Note: the above requires being connected to a wired hub or a working private wireless network so the guest and host can communicate over a bridged connection supported by VMware.
Click to view rcardona2k's profile Champion 5,197 posts since
Oct 20, 2005
pedroavarela wrote:
I don't know how to bridge the windows_guest to the mac_host. What connection should I bridge? The Dial-up or the LAN?

In VMware Fusion you should use Virtual Machine > Network > Bridged

What is a NIC?
Network Interface Card (NIC) or network adapter. What i mean is this: your connection will be shared as:

USB modem <-> USB <-> VMware Fusion guest OS <-> usb modem driver <-> Local Area Connection (virtual NIC set to Bridged mode) <-> OS X Built-in Ethernet or Airport (attached via private access point)

I just tested this with XP-SP2, a Palm Centro USB modem, two MacBook Pros (both shared the USB modem), so I know it works.

1. In order for the guest OS to bridge to OS X, you have to have an active OS X network connection that Fusion bridges, right now that's wired Ethernet or wireless Airport. It's not enough for these to be "on" you must have "link status", e.g. Ethernet must be plugged into something like a hub or another computer. For Airport, this means it's attached to a working access point like an Airport Express or Extreme. If the hub or wireless access point had Internet access you would normally be done, but they don't.

2. Next step is connect your USB modem and connect to the Internet. This is specific to your usb modem. I have a Palm Centro so I connected it to the Internet using a usb modem app that i own. Test your connection to make sure it's working.

3. Following step is to turn on Internet connection sharing, in XP that's done with the Network Setup wizard, which is in Control Panel > Network Connections > Network Tasks > Setup a home or small office network. Click through the Welcome screen and "Before you continue..." then select "This computer connects directly to the Internet. The other computers on my network connect to the Internet through this computer.", click Next, then pick your USB modem, e.g.
Pick.jpg

Turn off your Windows Firewall or DHCP requests from other machines may be blocked. After that's done you're sharing your USB modem connection to Local Area Connection which is bridged to Ethernet or Airport and your OS X box can now share this connection.

4. In OS X, I didn't immediately get a connection, so I set my Ethernet address manually to 192.168.0.2, net mask to 255.255.255.0 and gateway to 192.168.0.1 (these come from the settings in Local Area Connection in XP with the exception of changing the IP address from 192.168.0.1 to .2). My other MacBook connected by an Ethernet cable to the machine running Fusion got it's DHCP address from Fusion XP. After these steps both the MacBook running Fusion the second MacBook I used to make Ethernet active had Internet connectivity through the USB modem in Fusion.

I double-checked that no MacBooks were cheating (Airport was off in both), by visiting whatismyip.com and it showed they were connecting through the USB modem (over the 3G wwlan connection)
Click to view jbfryman's profile Novice 5 posts since
Nov 2, 2007

I'm actually interested in doing something a bit more elaborate. I
travel a lot, and it's somewhat cumbersome to deal with the problems
that come with that. My Mac always connects to local networks easily
(wireless or wired, it varies based on location), but I need to run VPN
software that is Windows-only. So I wind up with (Internet) -> Mac
-> Fusion VM -> VPN.


The VPN connection works fine, but I'd like to feed that back to the
Mac so my Mac apps can then use the VPN. So what I'd like to do is
define a second NIC in Fusion, do Windows ICS across that, and have the
Mac redirect my local apps through this virtual nic channel.


Has anyone tried this? I can't seem to make the Mac talk to the second
NIC I defined directly. For security purposes, I wanted to make it
Host-Only on the second NIC . . . but I'd settle for any solution at
this point. I need to point Entourage or Safari/Firefox at this second
virtual NIC. I can't trick the VM by re-using the wireless as I
sometimes need that to reach the Internet.


Thoughts? <!-- BEGIN attachments -->
<!-- END attachments -->
<!-- BEGIN content details -->

Re: Sharing internet connection from guest to host

6. Jan 25, 2008 4:55 PM in response to: jbfryman
Click to view rcardona2k's profile Champion 5,197 posts since
Oct 20, 2005
Don't use a host-only connection for your second NIC, your Mac can't share that connection for general Internet access unless you specificaly run a proxy in the guest VM. Use a Bridged connection for your NIC. When ICS asks which connection you want to share (as in the picture above) choose VPN. Not all VPN software will work with ICS. I have not tested mine for instance. On the Mac side, you'll need to set your IP to a static address of 192.168.0.2 and TCP/IP gateway of 192.168.0.1 (per ICS manual settings instructions). For travelling I recommend using OpenDNS's servers as your DNS or use your company's DNS via the VPN connection.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities