Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a cheap but powerful dedicated server I am leasing with OVH, because they were recently having a promotion. I would like to try and manage all this power by playing with VMs using ESXi.

However I am only provided with a single NIC.

I had thought this would be easy to get around since, at home I have a single NIC which is my broadband modem, and yet a simple NAT gateway device happily provides internet access to all my devices.

I am struggling to implement this on ESXi, though. Can anyone advise on how I could go about having ESXi and multiple VMs working with just one NIC?

Here's my current setup:

I believe all I need is to be able to configure NAT from the NIC to all the VMs etc.. How would I set up and administer this kind of infrastructure?

share|improve this question

One NIC is very doable, I've done this several times. When you're going through the setup, you give it an IP address for your Management network. Then afterwords when you connect the client to it, you can configure the VMNET to use the same NIC. It'll complain that they really should be separated, but it'll work.

However, you tagged this so I'm guessing the actual question here is:

How do I get ESXi5 to work when I only have one IP address to work with.

This is a very different problem, since one NIC can have thousands of IP addresses behind it.

This may not be doable with your specific situation, but what you're talking about can be done. You do this by creating another virtual switch with no physical NICS in it.

ESXi 5 host-only test environment

You'd then create a VM that bridges the two vswitches that acts as a NAT-gateway between the two. Your management network would go on the private vswitch, and a port pass-through configured on the NAT gateway to allow you to connect to it.

However, I can see no possible way to set that up without physical access to the machine, so this solution is of limited use.

share|improve this answer
That's correct @sysadmin1138 - I do only have a single IP address to work with too. – deed02392 Aug 22 '13 at 21:16
@deed02392 Now that I know what you're asking, I have a real answer for you. It isn't that useful, though. – sysadmin1138 Aug 22 '13 at 21:58
Indeed. The fact what you're suggesting cannot be achieved without physical access (or KVM I suppose) means that this is not currently feasible in my situation where the server is in another country. – deed02392 Aug 22 '13 at 21:59

I think you're confusing your single public ip address with the internal ip addresses configured on your virtual machines. You should be assigning ip addresses to your vSphere host and to your virtual machines from an address space as defined in RFC 1918. As for forwarding traffic from your public ip address to your virtual machines for inbound access to services such as HTTP, SMTP, FTP, etc. you can forward a single port to any one of your virtual machines (port 80 for instance). If you need to forward a single port to multiple virtual machines (port 80 forwarded to two different virtual machines) then you'll need to look into some type of proxy.

As for using a single NIC in the vSphere host, it's certainly do-able. When you create your vSwitch you'll simply create it with a VMkernel port (for accessing and managing the host) and a Virtual Machine Port Group (for the virtual machines). This will give the virtual machines physical acess to the same physical network that the vSphere host is connected to. The vSphere install (IIRC) should create a vSwitch for you that will be configured for both management (VMkernel) and virtual machine (Virtual Machine Port Group) access.

share|improve this answer
Hi. My vSphere host is the ESXi server itself, correct? This server is only accessible to me from the Internet so I'm not sure it can practically have an RFC 1918 IP. The VMs themselves I appreciate would. But then how do I actually setup directing a request to connect to the server IP at port x, to a VM? – deed02392 Aug 22 '13 at 21:35
Yes, your vSphere host and your ESXi host are one and the same. They're two different names for the same thing. I tend to call it vSphere because that's what VMware currently calls it. The name ESXi is a bit of a hold-over for those that have worked with the product since it's early days. You really should assign a private ip address (RFC 1918) to the host and to the virtual machines. You can then port forward whatever port/service you need from the public ip address to the internal ip addresses. Port forwarding is generally configured on your router/firewall. – joeqwerty Aug 22 '13 at 21:48
I don't have physical access to the server, which is why all I can have is the public IP for the vSphere host that OVH is assigning it on their setup. – deed02392 Aug 22 '13 at 21:50

Hi. My vSphere host is the ESXi server itself, correct? This server is only accessible to me from the Internet so I'm not sure it can practically have an RFC 1918 IP. The VMs themselves I appreciate would. But then how do I actually setup directing a request to connect to the server IP at port x, to a VM?
– deed02392 Aug 22 '13 at 21:35

I might be wrong but If You create/configure a Router VM Appliance On Your ESXi Host ( the one with that One Public IP Address You can then handle PORT Forwarding Back and Forth like this ::

Incoming Request on PublicIP:8080 >> Router Appliance PortForward >> InternalIPServer1:80

These are 1:1 translations therefore in the example 8080 has already taken so for InternallIPServer2 it can not be used ( have to go with something else)

As Virtual Router Appliances goes there are tons of them Open Source, etc.. Vyatta, Halon, Cisco, PFSense can also be as a router, DD WRT ...and so on

I hope I made no mistake trying to get what you mean to achive, and probably I gave some ideas if not anything else...

ESXi Pros can correct me and correct me if I made a mistake :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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