Hello everybody!
Good afternoon!
I was using my VM to create my previous post (How to query information from a zip code in SQL Server) and had some problems accessing the internet.
The problem
I have always used my VMs with the NAT (Network Address Translation) connection mode, which is the simplest and easiest of all to configure, works well and I have never had any difficulty with it. NAT mode allows your virtual machine to connect to the internal network using your physical machine's IP. For this reason, you cannot have more than one VM connected to the internet using the NAT connection.
As I had another VM running before opening this one, I was no longer able to use the network and did not want to close the other VM.
The solution
The solution to this problem is simple: Using mode Bridge VMware Player, which allows your VM to connect directly to the internet using your physical network card and assigning a unique LAN address to the VM. If your internal network has DHCP service, it will be responsible for providing a valid IP address for your VM itself.
This makes your VM available to your network as if it were a physical machine and you still have the advantage of being able to access services that are on that VM as a database, for example through the physical machine or other machines. from the Web.
Complications for our solution
After identifying the problem and defining the solution, we will deploy it. A task that seems simple, but proven otherwise.
On my physical machine, I have several network adapters:
- TAP-9 Local Connection (VPN)
- Wi-Fi (Where I am connected to the Internet)
- Ethernet (Connection via Network Cable - Disconnected)
- VMWare adapters
Note that VMware Player has created 2 network adapters for it to connect to:
- VMware Network Adapter VMnet1 for connection in Host-Only mode
- VMware Network Adapter VMnet8 for connection in NAT mode
The interface used by Bridge mode is VMNet0, which is not physical but virtual, where it is a pointing to a physical network adapter. The problem is that in environments with multiple adapters, this VMnet0 virtual connection may end up pointing to a network adapter that does not have an Internet connection, so you will not be able to use your VM in Bridge mode.
To make our problem a little more difficult, the installation of VMware Player DOES NOT COME with the virtual network configuration utility (Virtual Network Editor - vmnetcfg.exe).
Resolving Complications and Using the Bridge Mode VM
The first step we must do is to copy the virtual network configuration utility to the VMware Player installation directory. Download file vmnetcfg to VMware Player 7 and extract it to your VMware Player installation folder.
Now open the extracted file (vmnetcfg.exe) with Administrator privileges and you will see a screen like this:
Because the settings are set to automatic, you are probably pointing to a connectionless adapter. Now, I will change the pointing to my physical machine's network adapter that is actually connected to the Internet:
After the changes are made, just restart the VM and it will have access to the network and the internet!
IP configuration on a VM in Bridge connection mode:
IP configuration on a VM in NAT connection mode:
That's it, everybody!
Hope you enjoyed the post and see you next time!
If you also want to use VMware Player (which is free), but don't know how or are having difficulty installing, visit the post. Creating a virtual machine with VMware Player
UPDATE 22 / 03 / 2016:
vmnetcfg for VMware Player 12.1.0
the Routers do not ping at all, both nat and brigde, on windows it runs normally, but on linux mint this happens
Thank you very much Dirceu. Thanks for the information.
Congratulations on 2019 solved my problem with this top tip.
Thank you, Hemerson! I hope you enjoyed this tip
About NAT mode NETWORK that only works on one VM at a time is a lie!
Print: (https://imagizer.imageshack.com/img921/891/BXBurG.png)
Hi Mark47,
Alright?
First of all, thanks for stopping by here on my blog, which is focused on DATABASE and eventually some other knowledge that I find useful to share.
I don't know if you noticed, but I use VMWare Player throughout my post, and you are using Oracle VirtualBox to prove your point. That would be as true as saying that a manual car doesn't have to change gears and use an automatic car to prove its theory .. kkkkkkkk
The second point is that you said I was lying when I said that VMware Player did not support two NAT mode connections. In that case, I ask you to review your way of speaking, because misconceptions and misinformation may occur when you have a blog with more than 370 articles published, especially when it is not your specialty and you want to create an article to help people. Your comment was totally unnecessary, because the focus of the article was not focused on NAT mode, but Bridge.
Since you shouldn't have a blog and no experience sharing knowledge with others, you may not know that these things can happen (which I still really think the article software has this limitation) and that's why it has such an aggressive attitude. who just wants to help.
A big hug and even more.
Hi Andre Andrade, I do not know for some time that you posted your question on the channel, and today I accessed this tutorial and it was all I needed man, everything worked out, in my case the server is web, I made for my agency for people to work on a local server and all customization is done on that server.
So in my case I edit the windos hosts file c: \\ windows \ system32 \ drivers \ etc \ hosts
See example - just like and example
192.168.2.134 siteteste.com.br
When I do the host file resolves the name (siteteste.com.br) for IP 192.168.2.134, if I type name browser siteteste.com.br I access the page in question, but in this case my server is web, and already has settings on the server as well.
hug.
Good night
Following all the steps above is all right, but when I go to my physical machine the FTP service through the browser does not work, but I can ping the IP of my virtual machine on my physical machine. The service is all ok on VM access she's all through her browser.
Note: VM is in bridge mode and firewall is disabled
But I still can't access my physical machine!
Thank you!
But the Avast firewall is blocking access, only works with it disabled!
Got any tips for this?
Did it work right here?
Good afternoon Dirceu
I have a question / problem, I need to create a lab on windows platform where I need a DNS server, this same DNS an AD and another server I will create a microfosot ac, how do I create the DNS in vmplayer with static IP? and not DHcp? thank you
I could not change the setting to bridged, it has this error: cannot change netword to bridged: there are no dridged host netword adapters
Rayna, take a look at this link here: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2005168
If you don't solve it, tell me that I try to help you.
Oops, I tried here and the following error appears: “It was not possible to find the entry point for the Unicode_Free procedure in the dynamic link library c: [folder where the vm is]. I've run with adm and tals and nothing. Do you know what it can be?
Thank you! VWP 12 🙂
Congratulations for the post!
I have a problem in a simulation using GNS3 with two virtual machines created in VMware.
The first one is configured as NAT (vmnet8) and with it I can have connection and send packets.
The other is set to Host-Only (Vmnet1) and I can't connect to it.
What can I do to have connection on both machines?
Thank you
Congratulations for the post!
I have a problem using two VMs by VMware with GNS3.
In one of them (vmnet8) NAT is used and in the simulation I can have connection and send packets. In the other (vmnet1) is used host-only and this virtual machine has no connection.
Do you have any solution for this case?
Thank you
That way I couldn't because I didn't know how to call this executable from inside my 10 vmware, but I found this https://www.youtube.com/watch?v=CWqZg25YUTY and I solved all my problems because going to the Edit menu, I found the virtual network editor which is this same program that comes with my VMware! In addition this video teaches how to install a bridge protocol on the host connection that I was unable to install until looking in the vmware directory itself and it worked!
Alexandro,
Good night!
You probably use VMware Workstation, which is the paid version of VMware and comes with Virtual Network Editor. In this post I explained how to use this application in VMware Player, which is free for non-commercial use and does not have Virtual Network Editor.
This executable you do not run inside the VM, but on the same physical machine (host), because it configures which physical network adapter the VM will access to connect to the network.
Any questions, I am available.
Good night I downloaded the file that you talked about..extract from the folder I try to install but it presents the following error… ..
“The program cannot be started because it is missing
sigc-2.0.dll on your computer. Try to reinstall it to solve this problem. ” what file and that?
Larissa,
Good night!
This issue is happening because you did not extract the file to the directory where your VMware was installed 😉
Helped me a lot! Thanks
say there friend I'm trying to open a server 'in virtual makeup in vbox' and not be able to put the bridge mode ..
Very informative! 🙂 Loved the Blog
Good afternoon,
Success here was almost giving up.
Thanks for sharing knowledge.
See you.
Thanks for the visit!