Lldpd not working


#1

On a Linksys E1200 V2 (Broadcom BCM53572)

I installed lldpd but it is not working. We extensively use lldpd to keep track of network topology.

I tried tcpdump and it shows packets being sent out but none received and the switch it is connected to shows workstations, voip phones and other switches but not openwrt. I also can not see lldp packets coming into the router.

tcpdump -vvv -i eth0 ether proto 0x88cc

This only shows outgoing packets.

I've tried this:

echo 16384 > /sys/class/net/br-lan/bridge/group_fwd_mask

I've tried cycling through "list interface" in /etc/config/lldpd:

  • lan
  • br-lan
  • eth0
  • eth0.1
  • eth0.2
  • lo
  • as well as commented out.

I've tried running it in debug mode from the command line.

lldpd -d -c -f -s -e -M 4
lldpd -d -c -f -s -e -M 4 -I eth0
lldpd -d -c -f -s -e -M 4 -I br-lan... etc.

Here is some lldpcli info showing no received packets waited several minutes as switch transmits every 30 seconds.

root@OpenWrt:~# lldpcli show statistics
-------------------------------------------------------------------------------
LLDP statistics:
-------------------------------------------------------------------------------
Interface:    br-lan
  Transmitted:  38
  Received:     0
  Discarded:    0
  Unrecognized: 0
  Ageout:       0
  Inserted:     0
  Deleted:      0
root@OpenWrt:~# lldpcli show neighbors
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------

It looks like the network topology in the router is a switch with internal (hidden) eth0 that vlan tags each port on the switch.

root@OpenWrt:~# swconfig dev eth0 show
Global attributes:
	enable_vlan: 1
	ports: 0x003f
Port 0:
	pvid: 1
	link: port:0 link:up speed:100baseT full-duplex auto
Port 1:
	pvid: 1
	link: port:1 link:down
Port 2:
	pvid: 1
	link: port:2 link:down
Port 3:
	pvid: 1
	link: port:3 link:down
Port 4:
	pvid: 2
	link: port:4 link:down
Port 5:
	pvid: 1
	link: port:5 link:up speed:100baseT full-duplex 
VLAN 1:
	ports: 0 1 2 3 5t 
VLAN 2:
	ports: 4 5t 

I checked iptables (filter, nat, mangle) for DROP/REJECT but and any adjustments in iptables didn't help.

Could it be that the "switch" or "bridge" or "vlan" portion of the router is somehow not passing lldp packets through?
How do I get lldpd working in openwrt?


#2

That seems plausible. On proper standalone smart switches obviously lldp packets don't pass from one port to other ports (because their whole purpose is to answer "which port is this object connected to?"). It's concievable that the switch on your router doesn't pass these packets either. It's not "supposed" to in some sense...


#3

Since tcpdump shows outgoing packets only, I'd focus on why there is nothing coming back. Tcpdump will capture something even if it is blocked by the firewall. Have you tried to connect on the same port with the same cable some other device that exchanges lldp frames without issues? Do you see anything on the switch?


#4

port 1 <=> hp switch with lldp and cdp support enabled
port 2 <=> linux station with lldpd installed.

tcpdump and lldpcli shows:

  • no incoming lldp packets on openwrt.
  • no incoming lldp packets on linux station.
  • outgoing/transmitted lldp packets on both openwrt and linux station.
root@OpenWrt:~# lldpcli show statistics
-------------------------------------------------------------------------------
LLDP statistics:
-------------------------------------------------------------------------------
Interface:    eth0
  Transmitted:  90
  Received:     0
  Discarded:    0
  Unrecognized: 0
  Ageout:       0
  Inserted:     0
  Deleted:      0
-------------------------------------------------------------------------------

And on the linux station:

root@linux:~# lldpcli show st
-------------------------------------------------------------------------------
LLDP statistics:
-------------------------------------------------------------------------------
Interface:    enp0s25
  Transmitted:  2
  Received:     0
  Discarded:    0
  Unrecognized: 0
  Ageout:       0
  Inserted:     0
  Deleted:      0
-------------------------------------------------------------------------------

I also tried combinations of switch interface/vlan settings.
eth0:untagged port2:untagged
eth0:tagged port2:untagged
eth0:tagged port2:tagged

Also attaching lldpd to both eth0 and the vlan eth0.1(lan)

It looks like the problem is related to this...


#5

It sounds like your hardware switch on the board is swallowing these packets and they never actually go out of the physical ports of the device. since the OpenWrt OS is supposedly sending them out, can you look on your HP switch and see if it is aware of them / receives them? If so, then it's probably not the hardware on your OpenWrt if not, then it might well be the hardware filtering them.


#6

That is probably the case. Hardware chip switch is masking off inbound and outbound broadcasts - so consumer based switch/router can't behave like an enterprise switch/router.

Is there anyone with a different router/chipset and similar interface topology able to get lldpd to work?
Default install of OpenWrt 18.06.1.
eth0 is the internal interface of device assigned to br-lan (switch port 5)
switch has vlan1 - untagged on ports 0 1 2 3(lan), tagged on 5(internal)
br-lan bridge assigned ip to to vlan1 (eth0.1)
vlan2 port4 is wan port.