JDisc Discovery has greatly improved its layer 2 topology detection by using the port forwarding database. A switch maintains a table of mac addresses that are connected to each port. When looking at all switches, we can detect the switch topology.
However, in some situations, the mac forwarding information is not complete. Switches drop mac address entries when the corresponding device is inactive for more than five minutes. In those cases, JDisc Discovery was unable to determine the switch topology.
Therefore, we have been looking for new ways to obtain a proper layer 2 topology. When connecting switches, network administrators often use a meshed topology. In a meshed topology, there may be more than one path between any two devices in the network. This also implies loop in the topology. Since switches do not maintain a TTL (time to live) counter for the network packets, a loop might result in an endless forwarding of packets within the loop. To avoid loops, switches use the STP (spanning tree protocol) to build a tree topology. A tree has no loops and thus endless packet forwarding is not possible anymore.
The spanning tree protocol maintains a list of active ports within the topology. Ports used for redundancy might be blocked (not used) within the spanning tree. In case a switch port fails, the redundant port might get enabled and become part of the tree topology.
Currently, we are working on making use of spanning tree information to improve the network topology. This feature will make it into one of the next builds of JDisc Discovery 2.9.