I have installed VMWare ESXi 5.1 on a Whitebox recently to use it as a home lab, even though I have a very little knowledge about VMware ESXi and vSphere, but I found that it is most suitable virtualization platform for my lab.

So I am trying to create a isolated network for punch of Linux VMs, one of the VMs will be the router to connect the internal network to the internet, it should be multi-homed with two vNICs, I have created a second standard vSwitch with "Virtual Machine" port group, and I bind the new switch to no Physical NIC, intend to use this switch for internal network.

My problem is, how to choose witch switch the VM will connect, and how to make the Muti-Homed VM to connect to both vSwitches, how to do this? I cant find any option or configuration enable me to accomplish this, also I tried to google it too much, but with no success.

I appreciate if any one can help me for this to be done.


I don't quite understand what you're asking but I'll take a shot at it:

Assumption: You want to isolate your VM's to an "internal only" network. You would like them to access the internet through a multihomed VM that will act as a router/proxy.

If the above is true then:

  1. Create a new Virtual Machine network (a vSwitch) which doesn't connect to any physical adapters. This is the "internal only" network. Give it a name appropriate to it's purpose. This is the network that your isolated VM's will be connected to and will communicate through. Your router/proxy VM will also have a connection to this network.

  2. Create a second new Virtual Machine network that connects to your physical network adapter. Give it a name appropriate to it's purpose. This is the other network that your router/proxy will connect to.

  3. Create the router/proxy VM and add 2 virtual network adapters, one for each Virtual Machine network that you created. You want one virtual NIC connected to each Virtual Network.

  4. Create the isolated VM's with one virtual network adapter and connect it to the isolated Virtual Network that you created in step 1.

  5. Create your router/proxy VM and install and configure it appropriately. This will be specific to whatever router/proxy operating system/software/appliance you're using.

  6. Create your isolated VM's and install and configure them appropriately. This will be specific to whatever operating system you're installing.

I'm not including any information on how to assign ip addresses, default gateways or router/proxy settings because that's going to be specific to the platform you choose and your particular network design scenario.

  • Thanks a lot Joe, yes I meant just like you have assumed, and your post helped a lot. – Bahaddin Hussein Nov 3 '12 at 10:30
  • Glad to help... – joeqwerty Nov 3 '12 at 10:30
  • For the other part, what you recommend to use as Router/Proxy? I used Vyatta before, but is there anything else which is easier to setup? – Bahaddin Hussein Nov 3 '12 at 10:49
  • I really have no idea. I've never used a software based virtual router or proxy. – joeqwerty Nov 3 '12 at 10:53
  • Glad to help... – joeqwerty Nov 3 '12 at 11:33

I suspect you already have the External Network created but just to be sure.

To do this you would:

Setup the External Network

To setup the network that will be used to connect to a physical NIC do the following:

  1. Create a Standard vSwitch (External_Switch_1) for the physical connected network. Assign a physical NIC to it.
  2. Create a Port Group (External_Group_1) on External_Switch_1. This will be used for the gateway router VM to connect to the physical network.

Setup the Internal Network

  1. Create a Standard vSwitch (Internal_Switch_1) for the virtual network that is only available to VMs.
  2. Create a Port Group (Internal_Group_1) on Internal_Switch_1. This will be used to connect all the VMs to.

Setup Networking for Gateway VM

  1. On the VM create one network adapter (vNICs) and assign it to the network External_Group_1. This will allow it to talk on the physical network.
  2. On the same VM create a secondary network adapter (vNIC) using the same add hardware wizard. Assign this second vNIC to the Internal_Group_1 network.

Setup Networking for All other VMs

  • When configuring the networking for each of the other VMs you want to go through the gateway assign their vNICs to the Internal_Group_1 network.

Basically you end up with the gateway sitting on both networks and all the other VMs on the internal only network. You would then configure your router with two IP ranges, one on the external network that goes to you internet connection and the other that matches with the other VMs.

The other VMs would be configured with their default gateway or default route to the Internal_Group_1 IP address on the gateway VM.

Hope that helps.

  • Thanks Bernie, you helped a lot, until yesterday, I couldn't realize how to configure a vNIC to connect to a specific vSwitch, I found how to did it, and with your valuable notes, now I can proceed with what I am trying to do:), really appreciate your help. – Bahaddin Hussein Nov 3 '12 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.