A short note on how to get available CDP (Cisco Discovery Protocol) information on Linux systems.
The following example is for Ubuntu GNU/Linux:
$ sudo dnf install -y lldpd
$ sudo systemctl enable --now lldpd.service
$ sudo lldpctl
The result will look somewhat similar:
root@host:~# lldpctl ens6f0np0
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: ens6f0np0, via: LLDP, RID: 2, Time: 0 day, 00:00:22
Chassis:
ChassisID: mac 5c:xx:xx:xx:41:40
SysName: swic.domain.tdl
SysDescr: Cisco Nexus Operating System (NX-OS) Software 10.3(6)
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2024, Cisco Systems, Inc. All rights reserved.
MgmtIP: 192.168.178.250
MgmtIface: 83886080
Capability: Bridge, on
Capability: Router, on
Port:
PortID: ifname Ethernet1/25
PortDescr: hostname-nic1
TTL: 120
MFS: 9216
VLAN: 50, pvid: no VLAN0050
VLAN: 60, pvid: no VLAN0060
VLAN: 70, pvid: yes VLAN0070
VLAN: 75, pvid: no VLAN0075
Unknown TLVs:
TLV: OUI: 00,01,42, SubType: 1, Len: 1 01
TLV: OUI: 00,80,C2, SubType: 7, Len: 5 01,00,00,00,00
-------------------------------------------------------------------------------