▸Protocol notes for this page (click to expand)

LLDP (Link Layer Discovery Protocol)

What it is for

Cables are often plugged into the wrong port, and the configuration does not show which device and port the other end of a cable is connected to.

LLDP (802.1AB) has every device advertise its identity periodically (every 30 seconds by default) on every port, for example "I am sw1, this is my G0/1 port". The far end records it, producing a neighbour table, which management systems use to draw the topology automatically.

Exactly one hop

LLDP frames reach only directly connected neighbours and are not forwarded.

The reason is the destination MAC, the reserved multicast address 01:80:c2:00:00:0e. A switch processes frames sent to this address itself and then discards them; it does not send them out other ports.

So the server's neighbour table contains sw2 but not sw1, because sw1 is not the server's direct neighbour.

Common misconceptions

The TTL TLV is an aging time in seconds, not a hop count: if the record is not refreshed within that time it is deleted. LLDP goes only one hop and has no notion of hop count.

Each device knows only its direct neighbours. The full topology map is built by a management system that combines every device's neighbour table.

LLDP exposes device information. It advertises model, software version and management IP, which an attacker can use to map assets. LLDP should be turned off on customer-facing or untrusted ports.