I wonder if anyone has any advice on how to better optimise the network map in LibreNMS?
While it has so many other fantastic features that I have come to know and love, ironically the feature that pushed me to set up and try LibreNMS in the first place - automatically generated network maps, doesn’t work very well for me.
There are two basic options here - LLDP based auto-generation of network maps and MAC based auto-generation of network maps.
LLDP based (
$config['network_map_items'] = array('xdp'); in config.php) does work pretty well, but has some limitations on a network where not all switches support LLDP.
Only approx half of our switches do, this means the map is both incomplete and in error, as having multiple switches which do support LLDP connected via a switch which doesn’t (and thus forwards LLDP packets on all ports) causes the network map to draw weird and incorrect loops. So the map is better than nothing but incomplete and a bit inaccurate in places.
Today I was trying to track down the exact interconnect topology of a number of switches which don’t support LLDP so I did it manually using data available in the FDB tables. I had three switches in one building which link back to the core switch in another building but I wasn’t sure if there was only one uplink (with the other two switches uplinked from the first) or multiple uplinks etc.
To figure out if there was one or two inter-building uplinks I checked the FDB table on the upstream core switch to see if the IP addresses of the three downstream switches appeared on only one port or whether they were spread across two ports - it turned out to be two ports, so from that I know there are two uplinks and the third switch was uplinked via one of the first two.
Then on each of the downstream switches I could check which port they see each other from and was able to work out the topology from that. So the information to work out the interconnection of the switches to a fairly high degree of confidence is available in the FDB tables if you want to do it manually.
From my reading the mac mode (
$config['network_map_items'] = array('mac'); ) should be able to automate this for me but here I run into a number of issues.
If I enable mac mode my main network map - previously a bit incomplete but still useful turns into a big unusable fur ball which has pretty much every device on the network including all clients, when all I want is the network backbone, eg switches:
It also runs at about 1 frame per 10 seconds.
Next I read about Device group maps - in the docs it says “Also you can Build Device Groups and those Device Groups can be drawn with Network Map.”
Sounds perfect. So I create a device group that is devices.type = network (which has only our ethernet switches in it) and view the device group for that and I get an improvement but it’s still a mess and includes lots of devices that aren’t switches in it:
The top centre of that new fur ball is a switch, with all the things coming off it being client devices like printers etc, while in the middle of the bottom group is the LibreNMS server itself. There are thick lines between switches and thin lines between servers. I don’t know what the significance of the thin lines are. It also shows a lot of small loops - that also don’t make sense as there aren’t any network loops.
So it seems that device group maps take all the devices in the group and show ALL other devices which those devices know about, rather than only drawing a map between devices in the device group, which is what I was hoping for based on the description?
So should device group maps show only devices in that group and their interconnections, (which would make the graph above a bug, since there shouldn’t be printers and servers on the graph at all) or is it expected to show many/all devices known about in the FDB tables in these devices? (which seems a bit pointless, as most devices will have most other devices in their FDB tables)
To make use of mac address correlation in device group maps I would have to leave mac enabled in config.php, but this makes the standard network map unusable.
Am I missing something here? All I’m trying to build is a network map that includes only the devices I’m interested in - only switches, or maybe switches and servers to see where those servers are plugged in.
At the moment that doesn’t seem to be possible. Anyone else have any luck with customising the network map or getting device group maps working in a reasonable way?