I have a server with vSphere installed. The server has 2 physical ethernet ports: one it's empty and the other one it's connected to the management network.
There is one vSwitch connected to this ethernet port and to my virtual machine, so I can access this virtual machine through the management network.
Now, I need to connect this virtual machine to a different external network too.
I was wondering how to configure the other physical ethernet port of the server in vSphere and the virtual machine, if I need to create another vSwitch, etc
The best way (and recomended) is to use have both pNICs connected to your switch in Trunk Mode allowing all the VLANs that you need to use in the virtual platform.
Then, you´ll have one vSwitch, with different Port Groups for VLANs.
If in your platform, those are different physical switches for example, you can achieve that connecting the secon pNIC to that switch, create a new vSwitch and then a portgroup. Add a new vNIC to the VM and connect to that one.
(but strongly recommend you working with trunk and consolidatin in ToR switches for example, and propagatin VLANs to enable your ESXi to reach both vlans using trunk with both pNICs.
If neither both scenarios are right, please provide a simple (mspaint) diagram :smileysilly:
Hello and welcome to the community
Remember some point of vSphere networking design, especially standard vSwitch:
1. Each of physical adapters (uplink or vmnic) only belongs to a single vSwitch and you cannot share it, so when you decide to separate virtual machines networking to the different physical networks, you should create two separate vSwitch and each of existing physical NICs must belongs to only one of them. You can migrate uplinks and move them between vSwitches, but in a current state, they are part of a single vSwitch.
2. For VM connectivity you should create virtual machine PortGroups and connect their virtual NICs to them. Each port group can be part of a single standard vSwitch. So you should create two separate port groups in each of those mentioned vSwitches. So the connected uplinks to the vSwitch, can handle traffic of VMs from their associated portgroup in vSwitch.
They are all basic rules of vSphere networking, you can design and implement many structure by using the vSwitch/portgroup failover order, setup VLAN ID and so on based on your requirements.
it's one VM connected to two external networks, accessible through two physical Ethernet port. At the moment, the VM is connected to one of this network through a vSwitch connected to one of the physical NICs. This is the situation:
So I want to connect "VM" with "External network 2". Therefore, I guess I need:
- another vNIC
- another vSwitch?
Yes of course but more precisely:
Another vSwitch that 2nd pNIC is connected to it
Another virtual machine port group in the new vSwitch to handle your VM traffic
Yes! you need to:
1- Create new vSwith with pNIC2 as uplink
2- Create new PortGroup
3- Connect VM to that portgroup.
Natiya, maybe for the future, you should start thinking in a different approuch. Something like this:
NicolasAlauzet I see the option you suggest but at the moment, we don't have a switch.
Before we actually set the vSwitch, the vNIC and the port group, I'd like to make sure of these points, please:
1.- Do I need to assign a range of IPs to each physical adapter/vSwitch? Like this example:
So this way, traffic coming out of the VM knows where to go even if the VM has 2 different vNICs and there are 2 vSwitch, each of them with a different port group?
2.- The existing vSwitch and vNICs, are connected to the management network that we use to access vSphere remotely. There are no more port groups or vNICs in that vSwitch. Anyway, do we need to give the IP address for management? I assume yes (it's configured like that already), but correct me if I'm wrong. Do we need to do this for the new vSwitch? I guess we don't need to provide an IP for that port group, but we need to configure it in the vSwitch pNIC, right? This is a screenshot of the settings I'm talking about:
3.- I read a bit about the type of adapters we can select for the vNIC here. Would it be ok to select "VMXNET 3" for this application?
1- No, you don't need to assign ip ranges or anything else to the uplinks (that information is dinamically populated)
2- There is not need to add a Management Kernel or any other kind of vmkernel. (Those are used to access and manage the ESXi for example)
Just New Switch, assign the Uplink (the pNIC), create a portgroup and assign it to the VM.
3- VMXNET 3! when supported, you should use that adapter (Drivers are installed with the vmware tools)
Hope that helps!