Сетевой мост VMware

Сетевой мост VMware

VMware bridged networking is a type of network connection which allows the virtual machine to act as a unique machine on the network in which other physical machines exist. A dedicated IP is allocated to the virtual machine connected in bridged mode. In this article I’ll show you how to configure your VMware machines to work in bridged networking mode and some common problems that you might encounter while doing this. Bridged network setup is the easiest way to give virtual machine access to other machines on the network. The advantage of this setup is all virtual machines can access the other physical computers on that network and the other machines can also access the virtual machines irrespective of the host computer’s firewall configurations. Before you continue reading this make sure you read the articles Components of VMware Network and Using VMware Network Editor (vmnetcfg.exe)

The Requirements for a bridged network

  • A provision for allocating a dedicated IP for all the virtual machines
  • The host (physical computer) network adapter should be connected
  • VMware bridge protocol enabled for the host adapter
  • DHCP server (optional)

Let me explain each of the requirements clearly. A dedicated IP in the requirement, because if you have the provision to allocate only 200 IP addresses to the machines on a network and you add a couple of Virtual Machines to the network you can’t expect it to share the IP address of the host network adapter. So if you can’t allocate a dedicated IP address the its better you opt for Network Address Translation (NAT) type of virtual network.

Even though the virtual machines act as a separate entity it communicates with the rest of the physical network through the host machine’s network adapter so the network card of your physical machine hosting the virtual machines should have its network card connected to the rest of the network.

The virtual machine communicates through the host computer’s network interface using a protocol named VMware Bridge protocol, so this option must be enabled for that particular host network adapter by editing the network connection’s properties

vmware bridge protocol
VMware bridge protocol must be enabled for bridging to work with a host network adpater

Finally the DHCP part, don’t expect the virtual machine to allocate an IP address for itself because it can’t. Unlike NAT or Host-Only configurations which have a virtual DHCP server this doesn’t and you’ll either have to manually specify the IP addresses or setup a DHCP server on your network.

Читайте также  A piece of Mac on your PC - Pokki

Bridged Networking setup

The diagram displayed below shows how physical and virtual machines are connected in the network.

vmware bridge network diagram
The network layout of both physical machines and virtual machines connected in a network of bridge type

The network layout shown is what I’ll be setting up in this tutorial. The IP addresses are assigned in the range 10.0.0.x so that it is easy to remember and type for newbies. The green box shown inside Host machine 1 is the network adapter, note that there are two lines the one on the left connects the virtual machines to the rest of the network via the host adapter using vmware bridge protocol. Do not get confused and think the machine has two network interfaces, it has only one.

Step 1:- Select the Network Connection Type on the VM

Select the virtual machine you want to configure, select “Edit virtual machine settings” if you already have a network adapter on this machine select the network connection as “Bridged” an option “Replicate physical network connection state” appears. If you select this option the IP address for this VM is automatically renewed whenever the network changes. Select this option if your setting up this VM on a mobile device connected to a Wi-Fi network which will be moved from network to network you can enable this else just leave it as it is.

Step 2:- Assign static IP addresses or setup a DHCP server

Assign a static IP address to each system on the network including the machine hosting the VMs. If you don’t want to manually enter the IP addresses you can setup a DHCP server. There is no need of setting up a full fledged computer as a DHCP server most routers and modems have DHCP built into them, so just connecting it with your network will do the job. Before powering on the virtual machine make sure the host network adapter has a valid IP address using which it can communicate in the network. If the host computer itself is unable to communicate with the rest of the network then its no use to power on the VM and check for its connectivity.

After ensuring the host adapter has a proper and valid IP address power on the Virtual Machine. After it boots into the Operating System check if the network adapter is connected, if not go to the VM menu -> Removable Devices -> Network Adapter click connect. Now if you have a DHCP server running on the network an IP will automatically be assigned else an Auto Private IP address will be assigned. You’ll have to open the network connetcion properties and assign a valid IP address for it.

Читайте также  Подключить виртуальную машину VMware в локальную сеть.

Step 3:- Test the Network and Troubleshoot it

After the VMs have been assigned an IP address test whether they can communicate with other computers on the network by pinging them. Similarly from other physical machines try pinging the virtual machines. If everything works you have a full fledged network consisting of both virtual and real machines. But sometimes you may encounter a few problems along the way and common errors are explained here.

The network bridge on device VMnet0 is temporarily down because the bridged network interface….

You might see this error on the bottom right corner when you try to connect the network adapter of the virtual machine. This occurs if no network cable is connected to the Ethernet port of the host machine. Even though the device is shown connected there is not actual connection and no communication will take place.

Everything is fine but virtual machines are not able to communicate

If everything seems fine, there are no errors displayed but the VMs are not able to communicate then the following things should be checked.

  • The network interface to which vmnet0 is bridged. If there are multiple network adapters on the host machine the virtual network might be bridged to the wrong network. To eliminate this problem disable the “VMware bridge protocol” option by going to the connection properties of the network interfaces which should not be used for bridging.
  • IP address for the virtual machine is set incorrectly. There is a possibility of mistyping the IP address if you entered it manually, check if this is correct and also check the subnet mask address.
  • Wrong option selected under network connection. While setting up the virtual machine you might have selected a network connection option other than “Bridged” check for this and change it to bridged if this is so.
  • Finally there might be a firewall running in the virtual machine which is blocking the network data transfer, check for this and create firewall rules appropriately.
Подключить виртуальную машину VMware в локальную с... VMware Workstation is a software that can be install on existing physical machine (generally PC) and can be used to emulate various operating systems....

Сохрани, чтобы не потерять