lldpd
See also: lldpd upstream documentation
The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver Link-Layer notifications to adjacent network devices.
Abstract
An implementation of IEEE 802.1ab
lldpd (Link Layer Discovery Protocol daemon) daemon providing an industry standard protocol designed to supplant proprietary Link-Layer protocols such as Extreme's EDP (Extreme Discovery Protocol) and CDP (Cisco Discovery Protocol).
Installation & Configuration
Installation
OpenWRT uses the standard, lightweight lldpd package. Drop into your ER-X via SSH:
opkg update
opkg install lldpd
Alternatively/additionally install luci-app-lldpd package to add Luci Web interface for LLPD - discovered information are neatly presented in GUI.
Configuration
LLDP frames are link-local frames, do not use any network interfaces other than the ones that achieve a link with its link partner, and the link partner being another networking device. Do not use bridge,VLAN, or DSA conduit interfaces.
Example /etc/config/lldpd, start lldpd on all interfaces:
config lldpd config
# lldp defaults to listening on all interfaces
# Set class of device
option lldp_class 4
# if empty, the distribution description is sent
option lldp_description "OpenWrt System"
Usage
daemon must be running for lldpcli to work
View neighbors across each enabled interface.
lldpcli show neighbors
Get statistics about which interfaces are sending/receiving LLDP frames:
lldpcli show statistics
Known Issues
- lldpd unable to receive frames on mediatek due to bug: https://github.com/openwrt/openwrt/issues/13788
It has been confirmed that on MediaTek (i.e. on ER-X, 25.12.4), the following configuration file works well:
config lldpd config
option enable_cdp 1
option enable_fdp 1
option enable_sonmp 1
option enable_edp 1
option lldp_class 4
option lldp_location "address country EU"
# interfaces to listen on
list interface "loopback"
list interface "eth1"
list interface "eth2"
list interface "eth3"
list interface "eth4"