VMware Cloud Community
mjmalleo
Contributor
Contributor
Jump to solution

Can not grasp how to configure Network Cards on HPE ESXi Server

Hello!

 

So I have googled as much as I can and I am sure the answers are there, but I just am not grasping the concept!

 

I have 2 situations.

One, I want any given VM I connect to be able to, through DHCP, connect to a main/single IP on NIC1.

Two, I have 3 More NIC's and I want to have NIC 2 and NIC 3 to be associated with static IP's (192.168.5.36 and 192.168.2.126) to be specifically for a NAS Server VM utilizing 2 NIC's, 2 networks).

Three, I have a 4th NIC I want to have STATIC 192.168.5.180 and for use only with 1 specific Linux VM.

 

I just do not under the concept of having vmnic, physical nic, virtual switch etc. I am just so lost! It does not even need to be this specific.. I just can not find a guide that actually gets into configuration examples on Static, Dynamic, pass through (of nics) etc.

Please excuse my ignorance.

0 Kudos
2 Solutions

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

Maybe a picture will explain this.

a_p__0-1649453302390.png

André

View solution in original post

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

The above is an example. If you need more subnets being passed to the VMs, you may need to add more vSwitches.

That said, a better design with multiple subnets is to work with VLANs. If your physical switch supports this, you could basically work with a single vSwitch that has multiple port groups with the appropriate VLAN-IDs assigned, and multiple uplinks/vmnics which are then connected to tagged ports on the physical side. Such a design adds redundancy, so that even if one of the uplinks failed, the traffic could flow through another one.

André

View solution in original post

0 Kudos
8 Replies
a_p_
Leadership
Leadership
Jump to solution

It may be a bit confusing if you work with virtual networks the first time. However, it's basically not too much different from physical networking.

  • Remember that IP settings for VMs are configured within the VMs themselves, i.e. not on the ESXi host.
  • Connect the vmnics (physical ports) to physical switch ports, which are configured for the respective subnets
  • Create vSwitches and and connect them with the different uplinks/vmnics
  • Create "VM Portgroups" to which you can then connect the VMs

André

mjmalleo
Contributor
Contributor
Jump to solution

Alright aright, that is coming together.

 

Unless I misunderstand, could I do this. I would still need 2 PHYSICAL NIC's because of the 2 networks not connected. 

I would create vmnic1 going to NIC 1 and vmnic2 going to NIC 2

I would create, let's say, virtual switch called SERVER and add both vmnic1 and vmnic2 (both going to 2 separate physical NIC's).

I would create, again, Portgroup called SERVER and when I create the VM, I use that (SERVER[portgroup])  as the Network Adapter...

When VM is installing and setting up, it will see TWO Network Cards (vmnic1 vmnic2) and then there I can assign the IP's, obviously according to their subnets?

 

Or did I miss the mark.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

>>> When VM is installing and setting up, it will see TWO Network Cards (vmnic1 vmnic2) and then there I can assign the IP's, obviously according to their subnets?

Not exactly. The VM will only see the network adapters, which are configured in the VM's settings. The VM does not see the physical network configuration.

Whether to use a singe vSwitch with multiple port groups, or multiple vSwitches depends on the physical network. In case the physical switch ports are tagged ports, you may use a single vSwitch, and configure VLAN-IDs on the different port groups. For untagged ports, I'd recommend that you create separate vSwitches for each subnet.

André

0 Kudos
mjmalleo
Contributor
Contributor
Jump to solution

I won't keep bugging you with initial configuration stuff. But this is kind of where I begin to lose my understanding.

 

In the end, the VM needs to see 2 Network Adapters. One coming from a 192.168.5.0 Network and one from a 192.168.2.0 Network.

Where I get lost is what do I add to the VM when I create it. Would I be adding ONE PortGroup as an Adapter and that consists of both vmnics or would I b e adding TWO PortGroups, one going to their own vSwitch which goes to their own vmnic.

Initially I thouhht you meant to create a (1) vSwitch and add 2 vmnics, each going to their own Physical NIC on the ESXi and then create a PortGroup that houses that vSwitch and then I add (1) Adapter to my VM... But I suppose that would translate to the VM as "one" NIC.

So then I assume you now mean;

create a vswitch and add a vmnic and then create a portgroup that houses that. then create a 2nd vswitch and add a vmnic and create a 2nd portgroup. Both vmnics associate to their physical esxi NIC's. When I create the VM I will add 2 (total) Adapter's which the VM will see as 2 NIC's? Or did I miss it again?

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Maybe a picture will explain this.

a_p__0-1649453302390.png

André

0 Kudos
mjmalleo
Contributor
Contributor
Jump to solution

Makes perfect sense.
I appreciate you and your generous time. It clicked. 
thank you


I noticed you removed vmnic from the equation.  Are they for if you were to use multiple ip’s (same network) on  vswitch.

i.e 192.168.1.2, 192.168.1.3

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

The above is an example. If you need more subnets being passed to the VMs, you may need to add more vSwitches.

That said, a better design with multiple subnets is to work with VLANs. If your physical switch supports this, you could basically work with a single vSwitch that has multiple port groups with the appropriate VLAN-IDs assigned, and multiple uplinks/vmnics which are then connected to tagged ports on the physical side. Such a design adds redundancy, so that even if one of the uplinks failed, the traffic could flow through another one.

André

0 Kudos
mjmalleo
Contributor
Contributor
Jump to solution

Perfect description. Thank you my friend.

0 Kudos