VMware Workstation 2.0 (for Linux)
Networking Support
Each virtual machine can have its own independent network configuration. There are four choices for configuring networking:
No networking simply means a virtual machine is run in isolation; it will not be able to communicate with the host operating system or any other virtual machine running on the host. This option is useful if you desire complete isolation for testing or security purposes. To set up your virtual machine in this way, simply do not install a network interface adapter when configuring the virtual machine. Host-only networking means a virtual machine can communicate with the host operating system and any other virtual machines set up to use host-only networking, but the virtual machine cannot communicate with any systems off the host machine without the use of a proxy server. If you chose to install Samba when you installed Workstation -- or if you already had Samba configured appropriately on your host -- the guest operating system can share files with the host using the facilities of the host-only network. Host-only networking is most useful when the host is itself isolated or when you want to isolate your virtual machines from systems outside the host computer. This configuration is analogous to the way corporations often connect their internal networks to the Internet with a firewall and proxy services. To set up a virtual machine in this way you need to install a network interface adapter and mark it as "hostOnly" . Once the guest operating system is installed you may then need to do some additional configuration work that is described below. Bridged networking means a virtual machine runs on a virtual network that is "bridged" to an existing physical network. This permits a virtual machine to appear as a full-fledged host on an existing physical network. A bridged virtual machine may transparently use any of the services available on the network that it is bridged to: printers, file servers, gateways, etc. Likewise, when a virtual machine is bridged, any physical host -- or other virtual machine configured with bridged networking -- can use resources on that virtual machine. This is the most commonly used networking configuration. To manually configure bridged networking you need to install a network interface adapter and mark it as "bridged". Once the guest operating system is installed, you may then need to do some additional configuration work that is described below. Custom networking refers to any network configuration other than described above. For example, a collection of virtual machines, possibly on multiple physical hosts, might be configured on a private virtual network. This might be done for setting up a private file-sharing environment or for testing a group of virtual machines in an isolated network environment. Configuration of custom networking requires a thorough understanding of networking concepts and potentially the implementation of some simple user-level applications. Setting up custom networking is not described in this document. If you want to set up your own custom network environment and have trouble doing so, please file an incident report. Workstation networking support is done on the host machine through a virtual network device driver that implements four network interfaces: vmnet0, vmnet1, vmnet2, and vmnet3. Each interface is associated with a virtual Ethernet hub through which any number of virtual machines and the host may communicate. By convention vmnet0 is used for bridged networking, vmnet1 is used for host-only networking, and the other two interfaces are available for custom network configurations. In addition to the network interfaces there are two applications: vmnet-bridge and vmnet-dhcpd. The vmnet-bridge application is used by the bridged networking support to effect transparent communication between vmnet0 and another network interface, typically eth0. vmnet-dhcpd is an optional process that runs only when host-only networking is configured; it implements the DHCP protocol for virtual machines running on vmnet1.
What You Will See on the Guest Operating System
More Details about Host-Only Networking
Setting up host-only networking on the guest operating system Selecting IP addresses for virtual machines on a host-only network If, however, you want your virtual machines to communicate with each other using names instead of IP addresses, then you need to set up a naming convention, a name server on the host machine, or both. In this case it may be simpler just to use static IP addresses. VMware recommends that if you have virtual machines you intend to use frequently or for extended periods of time, you assign them static IP addresses or configure the host-only DHCP server to always assign the same IP address to the virtual machine. For virtual machines that you do not expect to keep for long, use DHCP and let it allocate an IP address. Note that for each host-only network, the available IP addresses are split up using the following conventions. (Workstation always uses a Class C address for host-only networks.)
(where <net> is the network number assigned to your host-only network.) Avoiding IP packet leakage in a host-only network
Systems that support the TCP/IP protocols are usually capable of
forwarding IP packets they receive but which are not addressed to them.
By default, however, these systems come with IP packet forwarding
disabled. If you find packets leaking out of a host-only network, check
if forwarding has mistakenly been enabled on the host machine, and if it is
enabled, disable it. For Linux systems this is done by writing a
"0" to the special file /proc/sys/net/ipv4/ip_forward.
For example, If the host has multiple network adapters, then it is likely intentionally configured to do IP forwarding and you do not want to disable it. In this case the only way to avoid packet-leakage is to enable a "packet filtering" facility and specify that packets from the host-only network should not be sent off-machine. An explanation of how to do this is beyond the scope of this document; consult you system documentation. Finally, be aware that virtual machines may leak packets as well. For example, if you use Dial-Up Networking support in a virtual machine and packet forwarding is enabled, host-only network traffic may leak out through the dial-up connection. Controlling routing information for a host-only network Unfortunately, the version of routed that comes with many distributions of Linux has no support for specifying that an interface should not be advertised. Consult the routed(8) manual page for your system in case you have a more contemporary version of the software. For gated, configuration is involved. You need to explicitly exclude the vmnet1 interface from any protocol activity. If you need to run virtual machines on a host-only network on a multi-homed system where gated is used and have problems doing so, please file an incident report.
Using Samba for file sharing on a host-only network For details, read this tech note. Other potential issues with host-only networking
Setting up bridged networking on the guest operating system
When a virtual machine is powered on, Workstation automatically assigns it a MAC address. The software guarantees that virtual machines will be assigned unique MAC addresses within a given host system. However, the software does not guarantee that a given virtual machine will be assigned the same MAC address every time it is powered on. In addition, Workstation does its best, but cannot guarantee, to automatically assign unique MAC addresses for virtual machines running across multiple host systems.
If you want to guarantee that the same MAC address is assigned to a given
virtual machine every time, or want to guarantee a unique MAC
address for each virtual machine within a networked environment, you can
assign it manually instead of allowing Workstation to assign it automatically.
It is possible to manually assign the same, unique MAC address to any
virtual machine by adding the following line to its configuration file: Note: As long as you choose XX:YY:ZZ so it is unique among your hard-coded addresses (where XX is a valid hex number between 00h and 3Fh, and YY and ZZ are valid hex numbers between 00h and FFh), conflicts between the automatically assigned MAC addresses and the manually assigned ones should never occur. |