I have a very simple setup where my ESXi host is hooked up to the LAN just as other regular PCs. I have created a few VMs on that host and want to be able to access the LAN as if these were hooked up to the LAN directly. I have read multiple solutions on it but I am confused whether to go for one or not. It would be great help if someone could point me in the right direction. Here is what I think I should do:

I should create another network for the VMs' internal traffic besides the one default network that is bound to host NIC. Then I need to have a gateway VM with a software such as pfsense that would do the magic and let my VMs see the LAN and its IP addresses seamlessly.

Is my understanding correct?

  • Edit: The NIC on my host is connected to a VLAN on our office network. Aug 20, 2015 at 11:00
  • 5
    You're clearly out of your depth, get some training, read the documentation or both - this site is NOT for beginners, we make this very clear when you sign up - you've skipped or ignored it.
    – Chopper3
    Aug 20, 2015 at 11:20

1 Answer 1


You can create a port group on your virtual switch that uses the host NIC on your physical lan as its uplink. Then all VM's can be connected to that port group and will be able to use addresses on your LAN as if they were real devices.

If you wanted to go for a routed set up then you can create another vSwitch (or port group on the same switch) with a different VLAN ID and connect your VM's to that. You must then put a router in place such as pfSense which you can run in a VM. Give it two NIC's and connect one to your office vlan port group and the other to your vm vlan port group. You must then make the gateway of the VM's ip of your pfsense vm lan interface and it will be able to route traffic onto your office lan. You will however have to configure the gateway on your office lan devices to be the pfsense office lan side IP or configure static routes to tell your office lan devices / router where to go when you want to reach the VM network.

Hope this helps.

  • 3
    A better answer the question deserves, well done you.
    – Chopper3
    Aug 20, 2015 at 11:21
  • Thanks for the reply. The first part in your answer, I have already implemented it, but my VMs dont get an IP address, although I have checked the configuration in VM settings, assigned proper Network label etc., Aug 20, 2015 at 11:44
  • 1
    Where do you expect these VMs to get their IPs from? You're lack of detail here is shockingly lazy.
    – Chopper3
    Aug 20, 2015 at 11:49
  • @HassanR.Bhatti I assume you have DHCP running on the network? Also, the physical NIC on your ESXi host thats connected to the office vlan... Did you configure the physical switchport as a trunk or an access port? If the link is a trunk then you must make sure your vswitch port group ports are set to tag the traffic with the vlan ID (making them access ports) so the ESXi uplink is able to send traffic down the trunk. If it is not a trunk then your port group ports do not need to be tagged. Aug 20, 2015 at 11:50
  • @tomstephens89 Yes to both of your questions. DHCP is running and vlan is active. The problem is that I have tried to tag it with the VLANID as well, but the issue doesnt seem to resolve. Right now, I am going to remove all other networks that I have in my setup and redo this with the simplest architecture to troubleshoot it. I will post my response and let you know. Thanks a lot for your help. Really appreciate you taking time to answer and be helpful than be useless like that other guy. Aug 20, 2015 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .