VMware Cloud Community
Darren_DnFn
Enthusiast
Enthusiast
Jump to solution

ESXi 6.7.0 - How to create multiple networks in seperate networks/subnets?

Hello,

I have a server that I installed the latest version of ESXi 6.7 on. I have been using the hypervisor on other servers for quite a while. I have always wanted to know how to allow VMs to connect to two different internal networks. For instance, I have one switch that is set up for the 192.168.10.0/24 network, and I have another switch that is set up for the 192.168.50.0/24 network. The server I have has four Ethernet ports. I would like to set up a VM so that it can connect to both internal networks. I have looked through a variety of guides, most of which are fairly complex, and hard to understand. It is very easy to do on a real server or workstation, you just plug in a second ethernet cable to the desired switch and modify its IP accordingly.

Does someone know how to do this, or have used a guide that is easy to follow.

Thanks in advance for your help,

Darren

1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

From what I understand, you are using different physical switches, i.e. not VLANs.

In this case you need to connect one, or more uplinks (depending on your redundancy requirements)  from the ESXi host to each of these switches, then create separate virtual switches, each with a "Virtual Machine Port Group" on it, to which you can then connect the virtual machines with their virtual network adapters.


André

View solution in original post

8 Replies
a_p_
Leadership
Leadership
Jump to solution

From what I understand, you are using different physical switches, i.e. not VLANs.

In this case you need to connect one, or more uplinks (depending on your redundancy requirements)  from the ESXi host to each of these switches, then create separate virtual switches, each with a "Virtual Machine Port Group" on it, to which you can then connect the virtual machines with their virtual network adapters.


André

T180985
Expert
Expert
Jump to solution

Im going to start by assuming this isn't a production environment...

It may be as simple as adding 2 NICs to the VM, 1 attached to each port group on each network essentially. That's assuming there is no routing between the switches.

To do this you're going to need to either add all 4 physical NICs to a single vswitch then change the failover order so each port group only uses the ports connected to a specific switch or alternatively just create 2 separate vSwitchs with 2 NICs each going to their separate switch.

Please mark helpful or correct if my answer resolved your issue. How to post effectively on VMTN https://communities.vmware.com/people/daphnissov/blog/2018/12/05/how-to-ask-for-help-on-tech-forums
Reply
0 Kudos
Darren_DnFn
Enthusiast
Enthusiast
Jump to solution

Yes I am using two different switches, instead of using VLANs. I got plenty of swithches and server, so I just seperated them by network. Yeah that is what I tried, I created a second virtual switch and port group and attached to the the second ethernet port. I also created a second vmnic. However when I add the second network card to the VM and configure the IP for the second network attached to the second switch I have no connectivty, cannot ping.

Reply
0 Kudos
Darren_DnFn
Enthusiast
Enthusiast
Jump to solution

I attached a few screenshots to make things easier, probably just have a bad setting since I have never set this up before

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

What you need for VMs are "Virtual Machine" (VM) port groups, not VMKernel (vmk) Port Groups.

VM port groups do not have IP settings, because IP addressing is done within the guest OS itself.


André

Darren_DnFn
Enthusiast
Enthusiast
Jump to solution

I still need two different virtual switches right?

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Yes, that's because each physical NIC (vmnic) can be attached to a single vSwitch only.

André

Darren_DnFn
Enthusiast
Enthusiast
Jump to solution

Makes sense, you are essentially just replicating your physical setup into a virtual counterpart.

Awesome, I was able to get it to work, required a reboot of the VM, but it works.

Thanks for the help,

and Happy New Year!

Reply
0 Kudos