A few years ago I have written a PowerCLI script to collect and report ESXi CDP informations. My use case of this script was the ability to verify the uplink redundancy of all ESXi Hosts in the inventory. It was about time to do a vendor-neutral refresh of the script. The new version of the PowerCLI function is now able to gather ESXi LLDP Uplink Details in addition to the exiting CDP possibility.
Unlike CDP, LLDP is only available with VMware vSphere Distributed Switch (VDS). But LLDP is not the only feature that makes VDS pretty interesting. My top features, besides the central management of port groups and their settings in huge environments, are:
- VMware vSphere Network I/O Control (NIOC).
- Link Aggregation Control Protocol (LACP)
- Load Based Teaming (LBT) based on physical NIC load
- Network health-check to verify physical network configuration
- HTML5 Client feature to mass-add VMkernel Ports to distributed port groups
Per default, a new vSphere Distributed Switch is configured for CDP. On the Distributed Switch level the discovery type can be switched to Link Layer Discovery Protocol (LLDP). From the Operation drop-down menu, you can select the operational mode of the ESXi hosts connected to the Distributed Switch.
Operation | Description |
---|---|
Listen | ESXi detects and displays information about the associated physical switch port, but information about the vSphere Distributed Switch is not available to the switch administrator. |
Advertise | ESXi makes information about the vSphere Distributed Switch available to the switch administrator, but does not detect and display information about the physical switch. |
Both | ESXi detects and displays information about the associated physical switch and makes information about the vSphere Distributed Switch available to the switch administrator. |
Source: Enable Link Layer Discovery Protocol on a vSphere Distributed Switch
VDS is available for all vSAN Editions and vSphere Enterprise Plus licenses.
Intel X710 NICs and LLDP
If you are using Intel X710 network cards, you should definitely check this community thread: https://communities.vmware.com/thread/575459
I had the same issue with HPE branded Intel X710 NICs and wrote a small PowerCLI snippet to set the required parameters to disable the Intel LLDP Agent on all hosts and let the ESXi receive and send LLDP packets.
Note:
The value of the parameterstring needs to be modified based on the number of ports in your setup.
|
|
Get LLDP Uplink Details with PowerCLI
|
|