I’m new to the Vmware world despite that I’m using it in my day-to-day job, but my works with the Vmware remain at the basic level I think. During my studies, I wanted to work on LACP but the interesting part is that it was confusing for me. Despite that it is very simple task on switches, but it has a few tricks while you need to implement LACP on vCenter. I watched some videos on the Internet and reviewed many relevant part on various books, but almost all of them demonstrated LACP with only a single ESXi host which is also a very simple task.
The tricky part comes while you have many ESXi hosts. After spending a couple of days looking for a solution, I finally managed to find it. Then I decided to put what I found here on my blog so other beginners can benefit from it.
Anyway, This is my topology:

LACP Topology

I have two ESXi hosts which I’m going to connect two physical ports on each host to the upstream physical switch. The tricky part is you need to create only single LAG on vCenter which will holds all of four physical ports on both of ESXi hosts. But from switch’s perspective, two physical ports coming from first ESXi host need to be configured as port channel 1 and other two ports coming from the 2nd ESXi host should be configured as port channel 2, as the picture displays. This is because Vmware only allows one LAG to be chosen as uplink for any dvPort Group. Now it’s time to start the configuration.

1. After creating a distributed switch, which is TDSwitch in my lab, click on LACP and then on the green plus icon on the page to create a LAG.

LACP configuration

2. Type a name for this LAG and write the number of uplinks per ESXi host, which is 2 in my lab. You can put this any higher number but not the lower number. Also it has no negative effect if you physically attach lower number of ports than what you configure here on this page. The mode can be Passive or Active if you configure the switch side to act as active node. It is also important to mention here, specially for beginners that this LAG, or all of the physical uplinks will act as trunk (which convey all VLANs traffic).

LACP configuration

3. Right click on the dvSwitch (which is TDSwitch in my lab) and select Add and Manage Hosts, then choose Manage Host Networking and push Next button. Click on Attached Hosts on the page and select your ESXi hosts (in my lab the ESXi hosts IP addresses are 10.1.206.156 & 10.1.206.142). Then check the box at the bottom of the page and activate Configure Identical Network Settings on Multiple Hosts (Template Mode), then push the Next. This option lets us to determine one of our ESXi hosts as a template, then copying that settings to other ESXi hosts at the later steps.

LACP configuration

4. Select the ESXi host you want to select as template and click on Next.

LACP configuration

5. On the next page select only the Manage Physical Adapters (Template Mode) option and click on Next.
6. on the next screen, click on the first physical port on the “template host” (which is vmnic2 in my lab) and then click on Assign Uplink at the top of page. Then choose “esxi-lag-1-0” and click on Ok. click on the 2nd physical port on your “template host” (which is vmnic3 in my lab) and click on Assign Uplink again, then choose “esxi-lag-1-1” and click on Ok. On the same page, click on the Apply To All button to copy the configuration on our “template host” to all other ESXi hosts.

LACP configuration

7. At the final, click on Finish.
8. Right click on the name of your dvSwitch and this time choose Manage Distributed Port Group from the sub-menu. Then enable Teaming and Failover and click on the Next. on the next page click on the Select Distributed Port Group on the top of the page to choose your dvPort Groups.

LACP configuration

9. After selecting which dvPort Groups are going to use the LAG as their uplink, click on the Next. Then put the newly configured LAG as the only uplink and move other physical ports to the Unused Uplinks part with the help of the arrow icons.

LACP configuration

10. At this point you can click on the dvSwitch name on the left pane and then choose the Topology at the middle menu to show the visual topology.

LACP configuration

11. On the other hand, we need to configure switch for LACP to work. Remember what I said at the beginning which was we need to configure a separate LAG for every ESXi host. We have two ESXi hosts in the lab with two physical ports on each of them connected to the physical switch. If you have a Cisco switch on your network, then the configuration should be like this:

interface range g1/0/10-11
 switchport mode trunk
 channel-group 1 mode active
interface range g1/0/12-13
 switchport mode trunk
 channel-group 2 mode active

12. From this point on, if you need to create any new VM, it will be sufficient to choose the name of the dvPort Group on their setting to make them use our LAG as their uplink. Also If you need to create any new dvPort Groups, you should right click on the name of the dvSwitch, then choose New Distributed Port Group option from the sub-menu and follow the steps. Finally you will need to follow the same steps as discribed below again:

12A) Select Manage Distributed Port Group option from the same menu,
12B) Enable the Teaming and Failover option and push the Next,
12C) Click on the Select Distributed Port Group button at the top & select only the new dvPort Group names and click on the Ok and Next.
12D) Put the previously configured LAG as the only uplink and remove all other ports to Unused Ports section at the bottom.

Congradulation! You have done LACP on the Vmware. There is another feature, Load-Based Teaming (LBT) which has eliminated the need for LACP in the case if you licensed to use distributed switches on vCenter. I will probably discuss it in the next posts. But for now, it should be enough.

Configuring LACP on two ESXi hosts
Tagged on: