VMware Cloud Community
Lucas_Rey
Contributor
Contributor

Newbie question for ESXI VMs network config

Hello community, I'm new in ESXI instrallation and configuration. Till now I installed it in a test environment where I can get IP for all VMs via DHCP server.

In production I have only one public IP and no DHCP server and all VM are isolated and no connected to internet. So please can someone exaplain how can I connect the VMs to internet?

Thank you.

Lucas

Reply
0 Kudos
10 Replies
daphnissov
Immortal
Immortal

Without knowing more about your production networking infrastructure and design (which you haven't provided), you will still have to provide a way for VMs to receive separate IP addresses. This can be either statically assigned or via DHCP.

Reply
0 Kudos
Lucas_Rey
Contributor
Contributor

Thank you for reply

Reply
0 Kudos
daphnissov
Immortal
Immortal

Again, not a lot of information to go on, but in order for VMs to have Internet access, they do not need a public IP. The general way this is done is to NAT the connection from your VMs' private IPs to the single public IP you possess. Regardless, you need individual IPs for each VM, regardless of their classification.

Reply
0 Kudos
Lucas_Rey
Contributor
Contributor

What kind of information you need?

Anyway, could you please drive me to configure the NAT to connect the VM to internet? I don't understand how to do that, I'm lost in VSwitch and ports groups Smiley Sad

As I wrote, I have one assigned public IP (used for the GUI), but I don't understand how to create a NAT.

Thank you very much

Lucas

Reply
0 Kudos
daphnissov
Immortal
Immortal

Regardless of NAT or not, as I said, ​each VM needs its own IP address. After that you can worry about NAT versus no-NAT.

Reply
0 Kudos
Lucas_Rey
Contributor
Contributor

What do you mean with each VM needs its own IP address ?

You wrote that a public ip for each VM is useless, so I don't understand

Reply
0 Kudos
daphnissov
Immortal
Immortal

I mean exactly that. Every VM you host on ESXi or any other hypervisor needs to have a dedicated IP. It doesn't matter if that's a public IP or a private IP.

Reply
0 Kudos
Lucas_Rey
Contributor
Contributor

So, still don't understand. Just to recap, I have a dedicated server with one ethernet adapter with one public IP (assigned to ESXi managment gui).

My goal is connect to internet the VMs hosted on ESXi.

First question, is it possible to do that with that configuration? How?

Then, in case is not possible, what I have to do? Buy another public IP, assign it to VM Network and then use something like PFSense to NAT/DHCP all the VMs?

I don't want a ready solution, I would like to understand the concept behind a possibile solution and go ahead with my personal project.

Reply
0 Kudos
daphnissov
Immortal
Immortal

Let me try again.

First question, is it possible to do that with that configuration? How?

With nothing else in the picture, no, it's not possible.

Then, in case is not possible, what I have to do?

You could do any of the following:

  1. Assign each VM a separate IP on the same network as your management vmkernel port, be those public IPs or otherwise.
  2. Create a new network for your VMs and assign them private IPs from this network. Could be static or DHCP addresses. Route that traffic through a gateway which performs NAT from a single, additional IP to get Internet access.

Either of these options requires assistance from whomever is hosting this hardware and will require modifying the physical networking layout and configuration.

So, in short, you cannot achieve what you wish based on what you say you have.

Reply
0 Kudos
Lucas_Rey
Contributor
Contributor

Thank you for your time. I actually solved with pfSense (NAT) and configuring 2 vSwitches and Port Groups on ESXi. Plus, I had to configure on VM the MAC address of the uplink.

Now it seems I can reach internet from both pFsense and VM. I still have to configure some routing, but for now it's ok.

Reply
0 Kudos