Hi All,
To get topology of a LAN, I have used LLDP package. I use the following scenarios:
1- Using bridge in LAN of openwrt routers: to unified LAN ports and LAN ports in each routers, I use lan-bridge mode. However. bridge mode is done in link layer and I cannot see the routers. In other words, When two nodes A and B connected to the routers by LAN, if I use LLDP, it shows that A and B are directly connected to each others, while they are connected to the routers and do not have direct physical link.
2- Using WAN port: I have used WAN port on my router to connect openwrt routers together. In this scenario, each routers and systems connected to the router are a local LAN. But, When I set IP for each LAN port, it has its own neghboring table!
Is there any solution to get topology of the network?
Thanks.
brada4
August 6, 2024, 10:00pm
2
Sounds similar?
opened 10:33AM - 06 Feb 24 UTC
target/ramips
bug
release/23.05
Official Image
Supported Device
### Describe the bug
Noticed on several devices that I see LLDP entries for t… he device itself when plugged into another OpenWRT switch. This shouldn't happen as 802.1d compliant bridges should never forward frames sent to 01:80:c2:00:00:0e, the LLDP multicast address.
Everything is running the latest 23.05 release but I have noticed on my Ubiquiti EdgeRouter X and TP-Link C2600, that I can see multiple LLDP neighbours on a single local interface port. Not a bridge port, but eth0 for example. These neighbours are not locally connected but are connected to a neighbour of the device and seem to be forwarded from the neighbour.
Doesn't happen on all devices - an OpenWRT x86 machine with Intel E810 NIC seems to show LLDP neighbours correctly. So I guess it's an issue with the switch configuration on the affected devices?
Example - only Edgerouter-1 is locally attached to this device, the other entries are connected to edgerouter-1 and are not locally attached.
```
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: eth1.1, via: LLDP
Chassis:
ChassisID: local edgerouter-x-1
SysName: edgerouter-x-1
Port:
PortID: mac 74:83:c2:08:d4:f6
PortDescr: eth2
TTL: 120
-------------------------------------------------------------------------------
Interface: eth1.1, via: LLDP
Chassis:
ChassisID: local edgerouter-x-2
SysName: edgerouter-x-2
Port:
PortID: mac 74:83:c2:4d:cb:ce
PortDescr: eth0
TTL: 120
-------------------------------------------------------------------------------
Interface: eth1.1, via: LLDP
Chassis:
ChassisID: mac d8:5e:d3:ad:90:57
SysName: bruce
Port:
PortID: mac d8:5e:d3:ad:90:57
PortDescr: enp7s0
TTL: 120
-------------------------------------------------------------------------------
```
I found this setting which would be where the bridge normally allows LLDP forwarding, but it's set to 0x0 so no mask and no forwarding should be allowed (but forwarding is still observed).
```
root@C2600:~# cat /sys/class/net/br-lan/bridge/group_fwd_mask
0x0
```
### OpenWrt version
r23630-842932a63d
### OpenWrt release
23.05.2
### OpenWrt target/subtarget
ramips/mt7621
### Device
Ubiquiti EdgeRouter X
### Image kind
Official downloaded image
### Steps to reproduce
Enable LLDP on multiple devices, view neighbours on multiple devices.
### Actual behaviour
Non-locally connected neighbours are visible on local devices. Only local LLDP neighbours should be visible but neighbours of non-local LLDP devices are visible, including seeing the local device as a neighbour from itself.
### Expected behaviour
We should only see LLDP PDUs from systems locally connected to the device because these PDUs should not be forwarded by 802.1d compliant Linux bridges.
### Additional info
_No response_
### Diffconfig
_No response_
### Terms
- [X] I am reporting an issue for OpenWrt, not an unsupported fork.
i.e try snapshot, add your voice to issue if needed.
1 Like
Thank you very much for the link.