Background
Probably one of the most misunderstood topics when dealing with virtual machines is how networking virtual machines works. I admit I was confused until I had to configure customs networks in vmware, because I had always bridged my virtual interface to the "real" network. In reality virtual networking is pretty simple if you understand bridging and network address translation. So this article will talk about configuring the three kinds of networking for virtual machine (the types of networking applies not only to VMware, but other virtual machine software like qemu, which is excellent). I am assuming you already have a working vmware 2.0 server install.
When I say "vmware host" I am referring to server hosting the virtual machines, where the virtual machines running on the host are the "vmware guests".
Prerequisites
VMware server 2.0 - any buildLinux - you can use any distro, most likely Fedora, Centos or RedHat Linux Enterprise will work the best since it seems WMware is sort of Redhat centric. VMware does provide a non-rpm based installer, so it should not be too hard to get it work on other distros. I would try and stick with a recent release.
Running vmware-config.pl
From your linux host running VMware server 2.0 run
vmware-config.pl
You will see a series of prompts, accept the defaults for all until you arrive to "Would you like to skip networking setup and keep your old settings as they are?
(yes/no) [yes]"
Type "no" here and press enter.
For "Do you want networking for your virtual machines? (yes/no/help) [yes]" type yes
For "Would you prefer to modify your existing networking configuration using the
wizard or the editor? (wizard/editor/help) [wizard]" type wizard
You will now be prompted to configure bridge networks.
Configuring VMware to talk to a "real" network (Bridging)
This is very useful. You can bridge your virtual interface in your vmware guest to any physical adapter on your vmware host. The virtual adapter then can be configured to have an ip address on the real network, setting it manually or via dhcp, just as if it was a physical device on the network.Just tell vmware that you want to set up a bridged network, vmware will automatically associate it with a vmnet. You must tell vmware what the network will be called and which host network interface you want to associate with the virtual network. In the example below I am created a virtual network called Bridged1 that will be bridged to eth0 on the host. I can assign my guest virtual machine's virtual interface with this Bridged1 network and the virtual interface will then be bridged to eth0, just as if it were on the real network.
Configuring VMware NAT
I have not found this type of virtual networking as useful. Basically this allows the virtual interface's ip on the vmware guest to be natted as the primary ip on primary interface of the host. This is useful if you do want to burn up ip addresses on your real network, but still want your virtual machines to be able to talk to your "real network" and any network your real network has access to.
You can either set your ip on your virtual interface manually or set it to dhcp and it will acquire a ip within the sunbet assigned to your vmnet assoicated with the NAT network. You can view these settings in /etv/vmware/vmnetX/dhcpd and /etc/vmware/vmnetX/nat, where vmnetX is the index assigned to your nat network.
Configuring VMware Host-only/Custom networks (internal)
First off this is very useful, you can basically create mock ups of real networks all on a single vmware host or in conjunction with real network equipment (non virtual machines) using bridging or even bridge another vmware server that has many host-only/custom networks.VMware Host-only/Custom networking is a virtual network, virutal in that the network resides within the vmware host itself, each virtual machine can have a virtual interface which is bound to a custom network.
Example Configurations with host-only/Customs networks
For example you could have this set up.
![]() |
| Diagram 2 |
Or this, a combination of host-only and bridging, bridging a physical real-world network to two virtual machines running on separate vmware hosts. In this case virtualmachine4 on host 1 could talk to virtualmachine2 on host 2.
![]() |
| Diagram 3 |
Adding Host-only/Customs networks with vmware-config.pl
After you have been aked whether or not you want to add a NAT network, you will be asked about host-only networks.
You will asked "Do you want to be able to use host-only networking in your virtual machines?
[yes]" type yes
If you already have a host-only/custom network defined vmware-config will ask if you want to set up another, answer yes.
Give the network a name, here I called mine vmnet2, probably should be named hostonly2 or something more appropriate. I only have one bridged interface and one nat, so I call all of my host-only networks by the name of their vmware device. Notice that it says "Configuring a host-only network for vmnet2", this is the linux device that vmware creates for this virtual network.
Vmware-config will then ask to probe for an unused subnet, you let it do this or supply your own unused subnet, i do this for the next host-only network I create vmnet3.
![]() |
| Diagram 4 |
Now these subnets are not subnets that are required on a virtual interface inside your virutal machine. You enable dhcp on the interface inside your vm and vmware will provide you with an ip within the subnet that is configured for that host-only network. You can configure your virtual interface within your virtual machine for any subnet you want, it does not necessarily have to be the subnet you assigned for that host-only network.
So in my example I have two virtual machines, I bind the first virtual interface of fedora1 to vmnet1 and bind the first virtual interface of fedora2 to vmnet1. This will essentialy put both of these ethernet interfaces on the same network. This assumes you ahve already added a virtual interface to your virtual machine, in the event you have not done this, refer to the following documentation Add ethernet interface to vm
![]() |
| Diagram 5 |
So I assign eth0 of fedora1 an ip of 192.168.1.1/24 and eth0 of fedora2 an ip of 192.168.1.2/24.
And I can ping!
References
- From virtualtopia
WMware Server 2.0 Essentials












Comments
Write New Comment ▼
Write New Comment
Sorry! This knol's owner(s) have blocked you from editing, making suggestions, or commenting here.