VMware Communities
denverjaye
Contributor
Contributor
Jump to solution

Two physical NICs on separate networks

Is it possible to set up two physical NICs on a desktop computer host running VMware Workstation in a way where your host OS uses one of them and a guest uses the other? I need the host and the guest on separate physical networks? Example - My host OS is on our production network but I want one of my guests to be on our test network. The two physical production and test networks are completely separate and have no physical connections between them. Basically my desktop host would be multi-homed.

Thank you

0 Kudos
1 Solution

Accepted Solutions
asatoran
Immortal
Immortal
Jump to solution

Guest VM traffic only goes to the vnet you connect it to. So if you configure NIC1 to be on the default bridged network (vnet0) and NIC2 to be bridged to vnet2 (for example), then configure your guests with ONE vNIC connected to vnet2. The guest only "sees" whatever is connected to NIC2, since it is NOT connected to vnet0/NIC1.

If you don't need host traffic to go on test network at all, you can disable TCP protocol on the test network NIC. Then no host traffic will go out on on that NIC. Just leave the VMWare bridging protocol enabled in order for VM traffic to travel on that NIC.

However, if your host needs access to both networks, then imagine that the virtual machines are running on some other host on the network. With your current physical machine with two NICs, ask yourself the same question: how do you guarantee that the computer's traffic goes on the production network? If you do not set a gateway for the host's TCP/IP on the test network NIC, then only traffic destined for that test subnet will go to that NIC. This assumes that the two networks have different subnets, of course. If both networks are the same numerical subnet, (e.g.: both are 192.168.1.x) then you're going to have problems even without virtual machines.

The reason you do not set (and are normally not allowed to have two gateways) is because if the traffic is destined for a subnet that your machine is not directly connected to, then your machine contacts the gateway. If you have two (or more) gateways, which one does your machine contact? Beyond simple flat networks such as this example, you'll probably need the assistance of a networking expert.

View solution in original post

0 Kudos
4 Replies
asatoran
Immortal
Immortal
Jump to solution

Sure. Just configure Workstation's networking to bridge the 2nd NIC to one of the unused vnets. (e.g.: vnet2.) Then configure your VM to use that vnet.

KellyOlivier
Enthusiast
Enthusiast
Jump to solution

Set the host nicA to network A.

Set the host nicB to network B

Configure the VM's nic to only use network B. However the host's nicB will still be accessible by the host.

denverjaye
Contributor
Contributor
Jump to solution

How would you handle routing? WIth two physical NICs on one host, how could you garauntee that the host OS traffic is on the production network and the guest OS is on the test network? I can't set two gateways on the host. Woudl I not worry about setting a gateway on the host for the test network and only set that in the guest?

0 Kudos
asatoran
Immortal
Immortal
Jump to solution

Guest VM traffic only goes to the vnet you connect it to. So if you configure NIC1 to be on the default bridged network (vnet0) and NIC2 to be bridged to vnet2 (for example), then configure your guests with ONE vNIC connected to vnet2. The guest only "sees" whatever is connected to NIC2, since it is NOT connected to vnet0/NIC1.

If you don't need host traffic to go on test network at all, you can disable TCP protocol on the test network NIC. Then no host traffic will go out on on that NIC. Just leave the VMWare bridging protocol enabled in order for VM traffic to travel on that NIC.

However, if your host needs access to both networks, then imagine that the virtual machines are running on some other host on the network. With your current physical machine with two NICs, ask yourself the same question: how do you guarantee that the computer's traffic goes on the production network? If you do not set a gateway for the host's TCP/IP on the test network NIC, then only traffic destined for that test subnet will go to that NIC. This assumes that the two networks have different subnets, of course. If both networks are the same numerical subnet, (e.g.: both are 192.168.1.x) then you're going to have problems even without virtual machines.

The reason you do not set (and are normally not allowed to have two gateways) is because if the traffic is destined for a subnet that your machine is not directly connected to, then your machine contacts the gateway. If you have two (or more) gateways, which one does your machine contact? Beyond simple flat networks such as this example, you'll probably need the assistance of a networking expert.

0 Kudos