Link to home
Start Free TrialLog in
Avatar of Manohar M.
Manohar M.Flag for India

asked on

How can I add a new Private network to ESXi

Hi Guys,

I have recently purchased a dedicated server and installed ESXi standard free edition on it, the DC guys gave me 10 public IP's but I want to setup VM's with local IP addresses instead of Public IP's. Do I need to add a new network switch or something on the ESXi host. Can someone help me accomplish this ?
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can have private networks inside of your ESXi host. It works the same as it would with a physical network. You configure virtual switches from within vSphere in Configuration->Networking.

You can then connect those virtual switches to zero or more of your physical network interfaces on your host, if desired. This is functionally equivalent to putting a real switch in the datacenter and connecting the cable(s) that they give you to it.

In your Virtual Machine settings, you can configure how many network adapters the VM has, and which virtual switch each of those adapters is connected to. Then you can assign whatever IP addresses to your virtual machines that you like from within the guest OS.

If you don't connect the virtual switch (vSwitch) to any of your physical network interfaces, that particular virtual network will not be connected to the outside world in any way.

MAKE SURE that your provider gives you IPMI / KVM access directly to the console of your host, or at least provides the ability to reset the networking configuration for you so that you can regain access if you screw things up. Management via vSphere is done through a VMKernal interface which is connected to a virtual network. It's easy to accidentally lose access to your host.
See the screenshot below of one of my test ESXi hosts. This one is just a test machine in my office.

User generated image
My host as two NICs inside of it which connect the host to the outside world. You can see that I have my main vSwitch0, which all of my VMs are connected to, and it is connected to vmnic0. The vmnic0 physical interface on my host connects to the rest of my office LAN. Any VMs that I connect to this switch are accessible from my LAN.

I have a second switch, vSwitch1, which is connected to vmnic1. This NIC is connected directly to my NAS. I could have connected it to another network, such as a WAN link provided by the datacenter, and I could have assigned public IP addresses to my VMs.  In this case this network is my "SAN", although in reality it's actually just a crossover cable going directly to my NAS.

The third switch, vSwitch3, is not connected to any physical network inferface at all. It exists only inside of the host. If I were to assign a few VM's network interfaces to that switch they would be able to talk to each other, but not the outside world.

The VMKernal interfaces are management interfaces which connect to the host itself, that is how you assign an IP address to the host itself on the various networks you want it to be accessible on.