Attach network interface to vmware nat (bridge is not working perfectly)

3

0

I have a developer computer with two physical network interfaces (NIC A and NIC B). I have VMWare workstation and several virtual machines in VMNet8 (NAT). I would like to connect my notebook to my computer in that way that my notebook is in the same network/subnet as my virtual machines, but also connected to the internet. So:

Internet -- (NIC A) -- COMPUTER ---- VMNet8 -------- VM1
                                       |
                                       +------------- VM2
                                       |
                                       +-- (NIC B) -- NOTEBOOK

How can I achieve that? It is important to have the notebook in the same subnet as the vm-s, and the internet should be accessable from the notebook. I use Windows 8 professional (64bit, all updates) and VMWare Workstation 10 (newest).

I have been trying bridging (Windows built-in, bridge VMNet8 and NIC B) since the middle of August (and still using that), but it is not working: DNS resolve is slow and sometimes doesn't finish. The problem stands even if there is no vm running, only deleting the bridge solves the DNS problem.

lajos.cseppento

Posted 2013-09-16T23:31:34.073

Reputation: 33

Why don't you use bridge instead of NAT ? – harrymc – 2013-09-19T05:45:50.803

I want the computers in the same subnet (network). – lajos.cseppento – 2013-09-19T08:48:45.310

If bridged, they will all be in your local network. – harrymc – 2013-09-19T09:40:41.123

But with windows 8 network bridge it dns resolve is verrry slow any buggy (even from the host with no vm running!) – lajos.cseppento – 2013-09-19T12:54:39.503

That's not normal - setting a VM to bridged should not affect the host, and certainly not if the VM is not running. It might be that this is your real problem, rather than asking for a such a strange workaround. But you will have to totally rewrite your question and supply us with more information. As a first step : Are you running the latest version of Workstation? – harrymc – 2013-09-19T13:03:38.760

Answers

0

Bridging is your answer but if you cannot use it for any reason you can setup additional IP range for your NIC on the laptop - this will allow you to connect to the IP range the VMs are using for example:

Internet -- (NIC A) 192.168.1.5/255.255.255.0-- COMPUTER
              |                                    |
              |                                   VMNet8 --- VM1 (10.10.10.1/255.255.255.0)
              |                                     |
              |                                     +------- VM2 (10.10.10.2/255.255.255.0)
              |                                     
              +-- (NIC B) 192.168.1.6/255.255.255.0 -- NOTEBOOK  

                  10.10.10.3/255.255.255.0

Now, only the 192.168.1.X subnet will have gateway set so internet will work on the laptop but it will also be able to reach the VMs.

If you don't know how to add the 2nd IP, follow this guide:

http://www.tutorialspoint.com/shorttutorials/assign-multiple-ip-addresses-to-windows-8-computer

TomEus

Posted 2013-09-16T23:31:34.073

Reputation: 3 355

0

I am not sure if you are facing some limitation as follow, but let's make some assumption.

  1. You could only have 1 internet IP, your ISP will charge you more if you got 2.
  2. You want you Laptop can reach internet, but not your VMs
  3. You didn't have a switch available. (even the $10 one).
  4. Windows Routing/Bridging isn't good (we knew it, since FW / antivirus ... etc may interfere it).

Solutions:

  1. NIC A still goes internet, but unchecked everything except the VM bridge protocol
  2. Get a ClearOS VM,(which is a firewall),give it 2 interface, 1 bridge to NIC A (which goes internet), and 1 bridge to NIC B (which serve as internal gateway, enable DHCP server there).
  3. turn on DHCP for all other stuffs, put all of them bridged to NIC B. and set their default gateway to the ClearOS.
  4. Shutdown all Window Firewall / Anti-virus stuffs. (ClearOS have them already)

Remarks: under this settings, everything in LAN should be quite fast, except for the internet link, which should be safe as long as it doesn't exceed 100Mb, and don't turn on jumbo frame. or you need a fast CPU for it. Use Intel 100 when install Driver inside the ClearOS.

Remarks 2: If you are a Linux / Network Experts, run DD-WRT on VM, which is 70-80% faster, ClearOS only excel since it have GUI ... lol.

user218473

Posted 2013-09-16T23:31:34.073

Reputation: