LLDP: Finding the Device at the Other End of the Cable
The labels on network cables do not always settle what is plugged in where. A technician facing a crowded cabinet can also ask the equipment. With LLDP, neighboring devices announce identifying details about themselves and the connection points they are using.
Link Layer Discovery Protocol, or LLDP, gives these local announcements a shared format. Equipment from different makers can use it because it follows the IEEE 802.1AB networking standard. It works at the data-link layer, where adjacent network devices communicate.
A network switch connects devices on a local network. Its LLDP records can help a technician trace those connections: which device is attached to which port, or connection point, on the switch?
- Keep work, guest and smart-home gear apart with up to 32 VLANs on one small switch.
- Copy any port's traffic to your laptop with port mirroring and see what is on the wire.
- Set it up from a web page instead of learning a command line.
Two Ports Describe One Connection
A receiving device already knows which of its own ports received a message. LLDP supplies information from the neighbor's side too.
Suppose a record shows that local port 4 heard from port 12 on a device calling itself “office-switch.” The technician can compare that pair of ports with the wiring plan. If the plan names a different switch, there is a specific cable to investigate.
An announcement contains labeled fields. The required fields identify the sending chassis, meaning the device, and the sending port. Another required field supplies a time to live, telling the receiver how long it may keep the information without a refresh. An end marker closes the message.
Optional fields add detail, such as a system name, a description of the port, supported capabilities or an address used to manage the device. Cisco's LLDP documentation describes these fields and their use in its 8000 Series routers. Receiving software turns the information into a neighbor record that an administrator or management tool can inspect.
The networking standards group IEEE identifies this practical use in its description of the standard's purpose: discovery information helps managers find inconsistencies and plan corrections.
The Record Has an Expiry Time
Devices repeat their announcements so the receiver can refresh what it knows. If those messages stop, the stored information eventually expires according to its advertised lifetime.
An old neighbor may therefore remain listed briefly after someone changes a cable, until its record expires or is removed. The display reflects received announcements. A technician might already be holding a disconnected cable while its former neighbor still appears on the screen.
The timing depends on the product and its settings. Sending and receiving can also be enabled separately. The open-source lldpd implementation, for example, lets a device listen without announcing itself.
Management software can collect many local records to build a broader picture of a local area network. That picture has gaps wherever devices or interfaces do not participate. An empty neighbor list may mean LLDP is disabled on a connection, even though a cable is plugged in.
Hub, Switch or Router: What's the Difference?
A Name the Neighbor Supplies
The name “office-switch” in our example comes from what the neighbor advertises. Some identity fields can be configured, so the name needs to be checked against inventory and wiring records.
An LLDP announcement is not authentication: it does not, by itself, verify the claimed identity or grant the device permission to join the network. A device can announce a familiar name without being the switch the technician expected to find.
CDP: How Cisco Devices Introduce Themselves to Their Neighbors

A Network Switch Learns Where to Send the Next Frame

Network Topology: What Stays Connected When a Link Fails?

QUOTE:
"Amateurs hack systems, professionals hack people."
