Algorithm of programical building scheme of network by snmp
I am trying to write an application that greps some information about network by snmp ptotocol. Almost all is done, but now I need somehow to draw the topology of the network. Is there any algo开发者_运维知识库rithm to use for discovery of network topology by snmp?
There is no pre-built algorithm, if that's what you mean in your question, but the implementation of one is quite straightforward : you can hop from router to router taking advantage of the "nexthop" column in the IP table (MIB II object), either in a depth-first or a breadth-first fashion. When you don't discover any new router, then you have the topology of your network !
精彩评论