Understanding Networking in VMware Fusion

Version 9

    How does networking inside a virtual machine work?


    Your VMware Fusion virtual machines talk to your network using a virtual network adapter.  Inside your virtual machine, the guest operating system (Windows, Linux, etc.) believes that it is equipped with an ordinary (wired) Ethernet card.  But Fusion patches this card to your Mac's regular network connection, regardless of whether it is wireless or wired.


    What choices do I have for how my virtual machine connects?


    Using Fusion's Virtual Machine menu, you can choose among bridged mode, NAT mode, and host-only mode.  NAT mode is the default.



    What do these choices mean, and how do I choose the right one for me?


    We'll examine each of these network modes in turn.


    What is bridged mode?


    Your home or office network is probably equipped with a router for talking to the Internet.  Bridging is a network term that describes extending a network without using a router.  When you place your virtual machine's virtual network adapter into bridged mode, your local wired or wireless network is effectively extended to your virtual machine.  Your virtual machine becomes a peer of all the other computers on that network.



    Although your virtual machine will connect to your local network using the same hardware your Mac uses, the virtual machine will retain its own fully independent network identity.  Mac OS's networking features cannot tell the difference between your virtual machine and a PC on your local network; Mac OS  interacts with them over the network in exactly the same way.


    Many users' Macs get their IP address from their wireless base station or router, using a piece of software built into those devices called a DHCP server.   In bridged mode, if the operating system inside your virtual machine (Windows, Linux, etc.) is configured to request an IP address from a DHCP server, your virtual machine will get its IP address from the same DHCP server your Mac uses. 


    What is NAT mode?


    NAT is a network technology that protects one network from another.  For example, your router probably also acts as a firewall: it protects your Mac by preventing unknown computers on the Internet from connecting directly to it.  The term "NAT" is an abbreviation for "Network Address Translation"; the protection afforded by a firewall works (in part) by the router representing your Mac on the Internet.  Your router substitutes its own address for your Mac's.



    VMware Fusion's NAT mode is the same technology, but one layer closer to you.  NAT mode protects your virtual machine from the other computers around it by placing the virtual machine on an isolated virtual network.  Whenever your virtual machine wants to communicate with your office network or the Internet, it does so through a software firewall.  This firewall is a component of VMware Fusion that runs inside Mac OS.


    Notice that, in this situation, your virtual machine is not on the same network as your Mac and your router.  Compare this to the diagram of bridged mode, in which your virtual machine is a peer of your Mac and your router.


    In NAT mode, your virtual machine will get its IP address from a DHCP server supplied by VMware Fusion that runs in Mac OS, just as the firewall does.  But this IP address will only be used for relaying communication between your virtual machine and the software firewall; that firewall will represent your virtual machine for its network communication with the outside world.  Another way to think about this: from the Internet's perspective, your virtual machine is sharing your Mac's IP address.


    What is host-only mode?


    In host-only mode, your virtual machine is not only protected from your local network and the Internet, but also locked out of them.  The virtual machine's network world is wholly within your Mac.



    Just as in NAT mode, your virtual machine will get its IP address from a DHCP server supplied by VMware Fusion that runs in Mac OS.


    How do I choose the right network mode for me?


    The right network mode for your virtual machine depends on how you plan to use it.  In an office or home-office environment, with network printers and file sharing, bridged mode is probably best, particularly because bridged mode allows your virtual machine to use Apple's Bonjour technology for finding printers.  Windows's workgroup features need bridged mode; only in bridged mode will a Windows virtual machine's Network Neighborhood show the other PCs on your local network.


    NAT mode is ideal when you want your virtual machine to be protected from other computers on your local network, such as when you are using a public wireless connection.  Because, in NAT mode, your virtual machine shares your Mac's IP address for purposes of external communication, it's especially ideal for use when you are using a paid wireless service, such as in a coffeehouse or hotel.  The use of bridged mode would require you to pay twice: once for your Mac and once for your virtual machine.


    Host-only mode is useful for environments where your Mac has no network connection at all, or when you wish your virtual machine to be completely isolated from the rest of the Internet.


    That's a lot of choices.  How do I keep them all straight in my head?


    Here's a way to think about the network choices:





    Home-office mode


    Starbucks mode


    Airplane mode


    Can I change from one mode to another?


    Yes!  But, unless you have configured your virtual machine to use fixed IP addresses, you must tell the operating system inside your virtual machine to release and renew its IP address.  Renewing your IP address after you change network modes will automatically contact the correct DHCP server: the one on your local network if you changed to bridged mode, and the one provided by VMware Fusion if you changed to NAT or host-only mode.


    To release and renew IP addresses within Windows, open a command prompt using Start -> Run -> cmd .  Then, in the command-prompt window, give first this command:




    then this command:




    Rebooting the virtual machine will also cause it to obtain a fresh IP address.


    Can you give me some troubleshooting tips?


    Versions of VMware Fusion earlier than 1.1.1 may give an unreliable network connection to virtual machines in bridged mode when their host Mac connects wirelessly to the local network.  Version 2 is a free upgrade for all 1.x customers.  Download it from http://www.vmware.com/download/fusion/


    If your virtual machine cannot use the network, make sure its virtual network adapter is connected.  Check Fusion's Virtual Machine -> Network submenu, and ensure that Connected is selected.


    If your virtual network adapter is in NAT or host-only mode, be sure that the operating system is configured to use dynamically assigned IP addresses (that is, from a DHCP server).  For Windows, use Start -> Control Panel -> Network Connections, and open the Properties dialogue of your network connection.  Edit the Internet protocol properties to ensure that it gets a dynamically assigned IP address and DNS server.


    Click on this image to zoom in: