With Link Layer Discovery Protocol (LLDP), vSphere administrators can determine which physical switch port connects to a given vSphere Distributed Switch.
From the Operation drop-down menu, select the operational mode of the ESXi hosts connected to the 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.
LLDP neighbors command on the physical switch does not show the virtual port id of the vSphere Distributed Switch and only shows the mac address.
switch#sh lldp neighbors
Port Device ID Port ID System Name
ge9 vmnic0 ##:##:##:##:##:## esxi.localdomain
vSphere 7
vSphere 8
LLDP information for a vSphere Distributed Port is in expanded LLDP Neighbor information under "Port Description"
View the expanded LLDP Neighbor information in the physical switch.
physical switch cli
Find the physical port,
switch#sh lldp neighbors
Port Device ID Port ID System Name
ge9 vmnic0 ##:##:##:##:##:## esxi.localdomain
Then get the expanded LLDP for that port,
switch#sh lldp neighbor ge9
Device ID: ##:##:##:##:##:##
Port ID: ##:##:##:##:##:##
System Name: esxi.localdomain
System description: VMware ESX Releasebuild-<build>
Port description: port ## on dvSwitch DSwitch (etherswitch)
or
physical switch UI
From the switch UI navigate to the LLDP Neighbor Information and view the expanded port detail.
LLDP Neighbor Information
Port Details
Local Port: GE9
Chassis ID: vmnic0
Port ID Subtype: MAC Address
Port ID: ##:##:##:##:##:##
Port Description: port ## on dvSwitch DSwitch (etherswitch)
System Name: esxi.localdomain
System Description: VMware ESX Releasebuild-<build>