Topology Discovery Network layers:
1. Network Layer
Main findings: routers, subnets and their connection relationships
2. Data Link Layer
Main findings: switches, bridges and their connection relationships
MiB library Standard
RFC-1213 defined by MIB-II
RFC-1493-defined bridge-MIB (primarily for switches and bridges)
The router information stored in the MIB-II can be used to find the layer-3 device;
The second-layer device can use the address Forwarding Table stored in bridge-MiB to generate the tree status table. There are other rules to find out.
Topology Discovery Methods:
First, the upper layer, then the lower layer, that is, the network layer to the data link layer.
Initial Conditions for topology discovery:
1. Zero initialization condition
2. Start with an IP address to discover the expanded Topology
3. Specify an IP address set in advance.
Link discovery for Layer 2 devices
1. Address-based forwarding table
2. Bridge spanning tree
3. Port Traffic
Here is just a rough list. In many cases, more information needs to be checked and gradually improved. After all, it is not so easy to find a good network topology.
Reference: algorithm analysis for multi-layer topology discovery of networks