LLDP on OpenWrt
Install and configure LLDP on OpenWrt Linux
This is on my Linksys WHW03 V1 Velop hardware, currently running OpenWrt 24.10.0, r28427-6df0e3d02a
opkg update
opkg install lldpd
- Review text configuration file
/etc/config/lldp
/etc/init.d/lldpd enable
/etc/init.d/lldpd start
My server routes all my subnets right now. From my server, a WHW03 Velop shows up like this:
$ sudo lldpcli show neighbors
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: eno1, via: LLDP, RID: 5, Time: 0 day, 00:07:53
Chassis:
ChassisID: mac c4:41:1e:4e:38:3f
SysName: Velop0
SysDescr: OpenWrt 24.10.0 @ Velop0
MgmtIP: 10.0.0.77
MgmtIface: 5
MgmtIP: fe80::c641:1eff:fe4e:383f
MgmtIface: 2
Capability: Bridge, on
Capability: Router, on
Capability: Wlan, off
Capability: Station, off
Port:
PortID: mac c4:41:1e:4e:38:3f
PortDescr: br-lan
TTL: 120
Interface eno1
is the name of the ethernet hardware on my server,
not on the WHW03.
From the WHW03 V1 (Velop) side, LLDP info looks like this:
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: br-lan, via: LLDP, RID: 1, Time: 0 day, 00:00:42
Chassis:
ChassisID: mac 44:a8:42:2d:c2:55
SysName: monarch.glump
SysDescr: Arch Linux Linux 6.13.11-hardened1-1-hardened #1 SMP PREEMPT_DYNAMIC Thu, 17 Apr 2025 22:27:54 +0000 x86_64
MgmtIP: 10.0.0.1
MgmtIface: 2
MgmtIP: fe80::46a8:42ff:fe2d:c255
MgmtIface: 2
Capability: Bridge, off
Capability: Router, on
Capability: Wlan, off
Capability: Station, off
Port:
PortID: mac 44:a8:42:2d:c2:55
PortDescr: eno1
TTL: 120
group_fwd_mask
Apparently, the OpenWrt br-lan
device doesn’t ordinarily forward
LLDP packets.
LLDP packets aren’t TCP/IP packets at all.
They’re ethernet protocol 0x88cc packets,
where IP packets are ethernet protocol
or ethertype
0x0800.
LLDP packets get sent to a MAC address like 01:80:c2:00:00:0e.
I found a blog post
about how to enable forwarding LLDP packets.
I did this logged in to my Velop:
$ cd /sys/class/net/br-lan/bridge
$ echo 16384 > group_fwd_mask
Once I did this, I could see my server’s LLDP info from the Velop.
tcpdump LLDP packets
Initially, lldpcli
did not show me my server’s LLDP info.
I installed tcpdump
on a Velop with opkg install tcpdump
.
On the Velop:
tcpdump -i br-lan ether proto 0x88cc
This showed me only LLDP packets from my server. On the server:
tcpdump -i ens4 ether proto 0x88cc
This showed me both server and Velop LLDP packets.