Suppose I have a list of layer-2 switches that do not support LLDP (Link Layer Discovery Protocol) but support SNMP. I have the management IP addresses of these switches, but I don't know how they are connected to each other.
I am able to get the forwarding table of each switch via SNMP, which is a mapping from source / target MAC address to the port number of the switch.
Is is possible to construct the topology of the layer-2 network from these forwarding tables? I searched a lot for such an algorithm (pseudo code) but just cannot find it.