Configuring a LAG on a vSphere Distributed Switch Port Group when using LACP
search cancel

Configuring a LAG on a vSphere Distributed Switch Port Group when using LACP

book

Article ID: 312554

calendar_today

Updated On: 04-01-2025

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article provides information on configuring a LAG within the vSphere Distributed Switch while using Link Aggregation Control Protocol (LACP) on the physical switch.

Environment

VMware vCenter Server

VMware vSphere ESXi

Resolution

Before Configuration Occurs:

  • If the environment has multiple NICs and that are going to be in an LACP configuration, VMware recommends first performing the creation of the LAG and then working with the hardware vendor (who is configuring the LACP) so that the NICs can be moved over a few at a time to prevent total connectivity loss. If all NICs are placed into the LACP configuration in the physical switch prior to configuring the Distributed Switch connectivity will stop working and the LACP configuration will need to be undone to restore connectivity
  • For Support Case situations, when LACP is configured, any network troubleshooting will typically require not only support from VMware by Broadcom, but also collaboration on the same call with the customer personnel who manages and can access and modify physical switch configurations. Because both these groups are typically in high demand, this tends to elongate the length of time for support calls considerably.

Configuring LACP on an Uplink Port Group

General Procedure:
  1. Create and configure a Link Aggregation Group (LAG).
  2. Connect the physical adapters to LAG that just got created
  3. Configure teaming and failover specifically for LACP.
  4. Activate and Migrate LAG to desired host(s).

Create the LAG:

  1. Open the vSphere Web client.
  2. Click the Networking icon:
  3. Expand the Datacenter and select the Distributed Switch that the LAG is being added to.
  4. Click on the Configuration tab and select LACP click NEW.
  5. Begin Configuring the LAG
    1. Name the LAG
    2. Number of ports (set to the number of NICs that are going to be in the LAG)
    3. Mode
      1. Either the Distributed Switch LAG or the physical switch (or both) need to be set to Active
    4. Load balancing mode will need to be set to match the physical switches configuration for the LACP
    5. Timeout (configure this setting based on your physical switch vendor recommendation)
      1. Slow: will send out a heartbeat packet every 30 seconds
      2. Fast: will send out a heartbeat packet every second
    6. VLAN trunk range (configure this setting based on your physical switch vendor recommendation)
    7. NetFlow (if necessary ensure NetFlow is also enabled on the specific Distributed Switch portgroups that are to be monitored)

Assign NICs to the LAG:

The next step is to safely move NIC(s) over to the LAG and ensure all portgroups are using the LAG as the Active uplink. In order to ensure connectivity remains up VMware by Broadcom recommends performing the following steps with your network vendor  that has access to make changes to the physical switch during this process.

Example:

Note: This is a sample and actual adapters and vmnic numbers may be different for each environment

    1. Identify the NICs (vmnics) that need to be moved to the LAG adapter group. For this example, the NICs are vmnic0 and vmnic1.
    2. Ensure that all the NICs (vmnics) are tagged with the correct VLAN, if used.
    3. On the physical switch, down the port connected to vmnic0.
    4. On the physical switch, place the port connected to vmnic0 in the LACP/Etherchannel configuration.
    5. In the Add and Manage Hosts wizard, select the host and add vmnic0 in one of the LAG uplinks by selecting vmnic0 and clicking "Assign Adapter". Finish the wizard.
    6. On the physical switch, up the port connected to vmnic0.
    7. In the port groups on the Distributed Switch, move the LAG uplink group to active and any other uplinks to unused (see example below). Ensure the host stays connected during these changes before moving onto the next NIC
    8. On the physical switch, down the port connected to vmnic1.
    9. Add the vmnic1 to the LAG uplink group on the Distributed Switch through the Add and Manage Hosts wizard and ensure that the any vmkernel adapters that use the vmnics that will be within the LAG are also. Also add the switch port connected to vmnic1 to the LACP/Etherchannel in the physical switch.
    10. On the physical switch, up the vmnic1 port again.
    11. Now the LAG should be set to be the Active uplink for all portgroups

Additional Information

Note: For more information, see About vSphere Networking. This guide contains definitive information. If there is a discrepancy between the guide and the article, assume the guide is correct.


For more information on LACP support on a vSphere Distributed Switch, see: