In Nutanix clusters running AHV hypervisors, we can use the LLDP protocol to find more details about the directly connected switches.
LLDP needs to be enabled in the switches for the details to be seen in the AHV hosts.
From the AHV host,
>root@AHV-HOST ~]# lldpctl
------------------------------------------------------------------------
LLDP neighbors:
------------------------------------------------------------------------
Interface: eth2, via: LLDP, RID: 7478, Time: 35 days, 22:55:59
Chassis:
ChassisID: mac 00:XX:XX:2d:b6:ba
SysName: AHV-HOST
SysDescr: Network Switch
TTL: 120
MgmtIP: xx.xx.xx.xx
Capability: Bridge, on
Capability: Router, off
Port:
PortID: ifname Ethernet9
PortDescr: Nutanix-AHV-Node-A
MFS: 9236
VLAN: 100, pvid: yes
------------------------------------------------------------------------
You can get the following switch details:
-
Management IP address
-
MAC address
-
Interface ID
-
Vlan ID
You can also get the output from all the hosts in the cluster with the below command, from the CVM:
nutanix@NTNX-XXXX-A-CVM:xx.xx.xx.xx:~$hostssh lldpctl