Linux Servers & LLDP


Written by

If you’ve ever tried to locate a server’s uplink port on a switch then you’ve probably wondered why there isnt CDP/LLDP being utilised within the server networking world, well there are a few implementations but the easiest I’ve used is lldpd. This means you can now easily locate linux systems from your switches or figureout what switch port you’re in from linux all utilising lldp.

Just run the following command once installed and you get a lovely simple output.

user@computer:$ lldpctl
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: eth0, via: LLDP, RID: 1, Time: 0 day, 00:32:05
Chassis:
ChassisID: mac 00:xx:xx:xx:61:52
Port:
PortID: ifname ge.1.40
-------------------------------------------------------------------------------