VMware vCenter 6.0 / 6.5 / 6.7 LACP / LAG best practice configuration with IP HASH Load balancing mode in Nutanix also. VMware supports LACP / LAG : Link Aggregation Control Protocol / Link Aggregation Group in VMware ESXi vCenter 6.0 / 6.5 / 6.7 / 7.0 or later. To configure / set up / create the LACP / LAG in VMware vCenter Distributed vSwitch vDS. LACP / LAG feature is available in vCenter’s Enterprise Edition license only.
LACP / LAG is very useful network traffic distribution protocol and most uses in large VMware / Nutanix infra to maximize the utilize the network NICs bandwidth and aggregate the NICs in single logical pipe.
Advantages of LACP / LAG
Lets explore the advantages of using LACP / LAG protocol on VMware ESXi configured by vCenter.
- LACP is a standards-based method to control the bundling of several physical network links together to form a logical channel for increased bandwidth and redundancy purposes.
- LACP enables a network device to negotiate an automatic bundling of links by sending LACP packets to the peer.
LACP / LAG Limitations of vDS
LACP / LAG limitation on VMware vCenter – Distributed vSwitch vDS are here:
- LACP does not support Port mirroring.
- LACP settings do not exist in host profiles.
- LACP between two nested ESXi hosts is not possible.
- LACP only works with IP Hash load balancing and Link Status Network failover detection.
Create the Distributed Switch vDS
Lets create / configure the VMware Distributed vSwitch vDS through vCenter 6.0 / 6.5 / 6.7 / 7.0 or later.
Login to vCenter web console > Click on the Home icon on the vSphere Web Client and select Networking.
In the Networking pane, select the datacenter where you need the new distributed switch, right-click on it, select Distributed Switch -> New Distributed Switch…, as shown in the below picture.
Provide a name for the distributed switch.
Select the version that is compatible with all your hosts.
Edit the settings of the switch by selecting the number of uplinks and other settings. In this example, we will create our own port groups, so we Unchecked – “Create a default port group“.
Confirm the configuration and click Finish.
Creating Port Groups on the Distributed Switch vDS
You will need a minimum of 3 port groups on the distributed switch: Virtual Machine traffic, vMotion and Host Management. If vMotion and Host Management are used as one, then only Management Port group would be created. You can create as many port groups based on your requirements.
Right-click on the distributed switch that we just created and select Distributed Port Group -> New Distributed Port Group…
Provide a name for the Port Group – In the example below, we are creating a Virtual Machine Port Group.
Follow the New Distributed Port Group wizard – In the Configure settings screen, update the settings for the port group. If there are any VLANs that need to be configured, you can update them here.
Review the settings on the next screen and click Finish.
Create the remaining port groups following the steps above. In the example below, we have created 2 additional port groups vMotion Port Group and Management Port Group. If vMotion and Host Management are used as one, then only Management Port group would be created.
Create the LACP / LAG on Distributed Switch vDS
To create the new LACP / LAG Link Aggregation Group in VMware Distributed vSwitch through vCenter version 6.0 / 6.5 / 6.7 / 7.0, select the distributed switch we created earlier, click on the Configure tab, select LACP, then click on the + sign as shown in the screenshot below:
In the “New Link Aggregation Group” screen, provide a name for the Link Aggregation Group.
The number of ports should match the physical ports per host in the LACP LAG. For instance, if Number of Ports is “2”, you can attach two physical ports per ESXi host to the LAG.
The policies selected here depends on the configuration on the physical switch. In the configuration below, we have chosen:
- Mode = Passive ( Recommended), as the physical switch is set to Active.
- Load balancing mode= Source and destination IP address, TCP/UDP Port and VLAN , as this is the policy configured on the physical switch for this group.
If you have VLANs configured in your environment, you can update the fields appropriately.
Click OK, The LAG has been created.
Configure the Port Groups to use the LAG created in step 3
Edit the settings of the port groups that were created on the distributed switch to use the LAG as the uplink. Select the port group and click on the Configure tab. Click on Edit settings as shown in the screenshot below.
In the Management Port Group – Edit Settings window, select “Teaming and failover“. Make the following changes:
- Load balancing Policy = Route based on IP hash
- Active Adapter = LAG adapter marked as Active – Move the LAG group that was created earlier to the active adapter.
- Unused Adapter = Move the all Uplinks-1/2/3/4/5/6 to Unused.
The screenshot below shows the changes made to the Management Port Group.
Configure the remaining port groups on the distributed switch following the steps described above.
The screenshot below shows the configuration of a port group after the policy changes have been applied.
Add the ESX Hosts to the Distributed Switch vDS – LACP / LAG
migrate the Networks from the Standard Switch to the Distributed Switch and migrate the VMs, if any, on the host to the Distributed Switch
Right-click on the distributed switch and select “Add and Manage Hosts“
In the “Add and Manage Hosts” wizard, under “Select tasks“, choose Add hosts
In the “Select hosts” screen, click on the + (plus sign) and add the hosts that would be connected to this distributed switch.
We will start by adding just one host to the distributed switch. Before we go further, migrate all the production VMs from this host. We will just have one test VM running on this host, and the CVM. We will use the test VM to confirm networking is working as expected once migrated to the new distributed switch.
In the “Select new hosts” screen, select this host that you have migrated all production VMs from. Click OK and click Next.
Under the “Select network adapter tasks” – You can select “Manage physical adapters“, “Manage VMkernel adapters” and “Migrate virtual machine networking“. Once selected, click Next.
On the “Manage physical network adapter” screen, select the NIC you would like to connect to the distributed switch.
You can view the settings of the NIC by selecting the NIC and clicking “View settings” above the table.
Select the NIC and Click on “Assign uplink“.
Select the LAG uplink to associate the NIC to and click OK.
Assign the second NIC to the uplink by following the same steps above.
In the example below, we have the 2 NICs associated with LAG-1-0 and LAG-1-1, respectively. Click Next.
In the “Manage VMkernel network adapters” view, select the VMkernel adapter that is associated with vSwitch0.
This is your management VMkernel adapter. We will need to migrate this adapter to the corresponding port group on the distributed switch. Do not migrate the VMkernel adapter associated with vSwitchNutanix.
Please note: If there are any network misconfigurations, for example, VLANs not configured correctly, we could lose network connectivity.
Please ensure if there are VLANs associated with the port group on the standard switch, the corresponding distributed port group also has the correct VLAN. Verify the physical network configuration to ensure it is setup as required.
Click on “Assign port group“.
In the “Assign destination port group” screen, select the corresponding destination port group and click OK.
Confirm the configuration and click Next.
In the “Analyze impact” screen, if you see any warnings or alerts, review them before clicking Next.
In the “Migrate VM networking” screen, review the VMs and migrate the VM network from the standard switch port group to the corresponding distributed switch port group.
Please note: If there are any network misconfigurations, for example, VLANs not configured correctly, the VMs could lose network connectivity. Please ensure if there are VLANs associated with the port group on the standard switch, the corresponding distributed port group also has the correct VLAN. Verify the physical network configuration to ensure it is set up as required.
The Nutanix Controller VM (CVM) has 2 network adapters, one connected to the “VM Port Group” and the other to the “svm-iscsi-pg” port group. When migrating the Nutanix Controller VM networking, we would only need to migrate the CVM network connected to the “VM Port Group” to the corresponding port group on the distributed switch. Do not migrate the network connected to the “svm-iscsi-pg” port group
For the VM, select the Network Adapter and Click on “Assign port group“, Select the corresponding port group on the distributed switch. Repeat the same for the other VMs.
Confirm the VM networks configuration that was selected for migration and click Next.
Confirm the configuration and click Finish.
This will migrate the VMkernel Management and the VM network to the distributed switch. You can keep a ping going to the host from another machine on the network.
If the physical and virtual networking configuration is correctly set up, the host should be accessible over the network. You may see a ping drop and a duplicate IP noted as below on the network.
I hope, today you have learned how to configure the VMware vCenter 6.0 / 6.5 /6.7 or later – LACP / LAG in VMware Distributed vSwitch vDS with best practice.
Thanks to being with HyperHCI Tech Blog with stay tuned with latest and upcoming technology updates.!