CN114915561B - Network topology graph generation method and device - Google Patents

Network topology graph generation method and device Download PDF

Info

Publication number
CN114915561B
CN114915561B CN202210412439.XA CN202210412439A CN114915561B CN 114915561 B CN114915561 B CN 114915561B CN 202210412439 A CN202210412439 A CN 202210412439A CN 114915561 B CN114915561 B CN 114915561B
Authority
CN
China
Prior art keywords
network
target network
attribute information
equipment
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210412439.XA
Other languages
Chinese (zh)
Other versions
CN114915561A (en
Inventor
易存道
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baolande Software Co ltd
Original Assignee
Beijing Baolande Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baolande Software Co ltd filed Critical Beijing Baolande Software Co ltd
Priority to CN202210412439.XA priority Critical patent/CN114915561B/en
Publication of CN114915561A publication Critical patent/CN114915561A/en
Application granted granted Critical
Publication of CN114915561B publication Critical patent/CN114915561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a network topology graph generation method and device, wherein the method comprises the following steps: configuring different network protocols based on the type of device in the target network; scanning corresponding types of equipment in the target network based on the configured network protocol respectively to acquire attribute information of the equipment; and determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment, and obtaining a network topology diagram of the target network. The invention can automatically find the equipment in the target network and automatically identify the links among the equipment in the target network, thereby automatically generating the network topology diagram of the target network without manual participation, ensuring the accuracy of the generated network topology diagram, ensuring the efficiency of generating the network topology diagram and accurately and efficiently realizing the visual display of the network links.

Description

Network topology graph generation method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a network topology map.
Background
With the rapid development of computer technology, particularly network technology, many enterprise network devices are supported deeper and deeper into core services, which affects policy formulation and enterprise development. Enterprises have increasingly high requirements on the reliability and availability of networks, and at the same time, enterprise networks have become more complex, so that links of the enterprise networks are often required to be quickly and intuitively displayed through a network topology graph.
The existing network topology map generation method mainly comprises a method for manually generating a network topology map according to information of network equipment and a method for generating the network topology map according to the fact that an initial device and an end device find out the whole link.
The method for manually generating the network topology graph according to the information of the network equipment cannot guarantee the accuracy of the network topology graph due to the fact that the difference exists between manual operation and a real network, and under the conditions that the number of the network equipment is large and the network is complex, the workload of manual operation is large, and the efficiency of generating the network topology graph is low. According to the method for generating the network topology graph by finding the whole link by the starting equipment and the end equipment, the equipment cannot be found under the condition that the two equipment have no link relation, so that the generated network topology graph is different from a real network, and the accuracy of the network topology graph cannot be ensured.
Disclosure of Invention
The invention provides a method and a device for generating a network topology map, which are used for solving the defects that the accuracy of the network topology map generated by the prior art cannot be ensured and the efficiency of generating the network topology map is lower, ensuring the accuracy of the generated network topology map, ensuring the efficiency of generating the network topology map and realizing accurate and efficient visual display of network links.
In a first aspect, the present invention provides a method for generating a network topology map, including:
configuring different network protocols based on the type of device in the target network;
scanning corresponding types of equipment in the target network based on the configured network protocol respectively to acquire attribute information of the equipment;
and determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment, and obtaining a network topology diagram of the target network.
According to the network topology graph generation method provided by the invention, the configuration of different network protocols based on the types of devices in the target network comprises the following steps:
configuring a first type of network protocol based on a host and a virtual machine in the target network; wherein the first type of network protocol comprises an SSH protocol or a Telnet protocol;
configuring a second type of network protocol based on switches and routers in the target network; wherein the second type of network protocol comprises SNMP protocol;
the scanning, based on the configured network protocol, the device of the corresponding type in the target network, to obtain attribute information of the device, including:
Scanning a host and a virtual machine in the target network based on the first type of network protocol, and acquiring first attribute information of the host and the virtual machine;
and scanning the switch and the router in the target network based on the second type of network protocol, and acquiring second attribute information of the switch and the router.
According to the network topology graph generation method provided by the invention, the method for determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment to obtain the network topology graph of the target network comprises the following steps:
analyzing the acquired attribute information of the equipment to generate list attribute information of the equipment;
and determining the equipment in the target network and the connection relation between the equipment based on the generated list attribute information of the equipment, and obtaining a network topology diagram of the target network.
According to the network topology graph generation method provided by the invention, the analysis is performed on the acquired attribute information of the equipment to generate list attribute information of the equipment, and the method comprises the following steps:
analyzing the acquired first attribute information to generate network card list attribute information of the host and the virtual machine;
Analyzing the acquired second attribute information to generate routing table attribute information, ARP table attribute information, MAC address forwarding table attribute information, base bridge list attribute information and STP port list attribute information of the switch and the router;
the determining, based on the generated list attribute information of the devices, connection relationships between the devices in the target network, to obtain a network topology diagram of the target network, includes:
determining links between devices in the target network through IP addresses based on the routing table attribute information and the network card list attribute information;
determining links between devices in the target network through the MAC address based on the MAC address forwarding table attribute information and the base bridge list attribute information;
determining links between devices in the target network through cascading ports based on the STP port list attribute information and the base bridge list attribute information;
a network topology map of the target network is generated based on the links determined by the IP addresses, the links determined by the MAC addresses, and the links determined by the tandem ports.
The network topology graph generation method provided by the invention further comprises the following steps:
Respectively acquiring performance information of equipment and links in the target network based on the configured network protocol;
counting normal and out-of-link equipment and links based on the acquired performance information, and determining the states of the equipment and links;
and displaying the network topology diagram of the target network, displaying the acquired performance information of the equipment and the links, the counted normal and unconnected equipment and link information, and displaying different states of the equipment and the links in different colors according to the determined states of the equipment and the links.
According to the method for generating a network topology map provided by the present invention, after the network topology map of the target network is displayed, the method further includes:
aggregating devices in a network topology graph of the target network, and generating a sub-topology graph based on the aggregated devices;
and displaying the network topology diagram after the target network aggregation and the generated sub-topology diagram.
According to the network topology graph generation method provided by the invention, after the network topology graph of the target network is displayed, the method further comprises the following steps:
receiving search information, and matching the received search information with information of equipment or links in a network topology diagram of the target network; wherein the search information comprises information of a link starting device and a link ending device in the target network or information of a link state in the target network;
The matching links are shown in highlighted form in the network topology of the target network.
In a second aspect, the present invention further provides a network topology map generating apparatus, including:
the protocol configuration module is used for configuring different network protocols based on the types of the devices in the target network;
the information discovery module is used for respectively scanning the equipment of the corresponding type in the target network based on the configured network protocol to acquire attribute information of the equipment;
the topology map generation module is used for determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment to obtain a network topology map of the target network.
In a third aspect, the present invention also provides an electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any one of the network topology map generation methods described above when executing the program.
In a fourth aspect, the invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a network topology map generation method as described in any of the above.
In a fifth aspect, the invention also provides a computer program product having a computer program stored thereon, which when executed by a processor, implements the steps of a network topology generation method as described in any of the above.
According to the network topology graph generation method and device, different network protocols are configured according to the types of the devices in the target network, the devices of the corresponding types in the target network are scanned respectively to obtain the attribute information of the devices, the devices in the target network can be automatically found, the links between the devices in the target network can be automatically identified by determining the connection relation between the devices in the target network according to the attribute information of the devices, so that the network topology graph of the target network is automatically generated, manual participation is not needed, the accuracy of the generated network topology graph can be ensured, the efficiency of generating the network topology graph is ensured, visual display of network links can be accurately and efficiently realized, and especially, the addition, deletion and modification of the devices and/or links in the network can be realized.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a network topology graph generation method provided by the invention;
fig. 2 is a flow chart of another network topology generation method provided by the present invention;
fig. 3 is a flowchart of an application scenario of the network topology generating method provided by the present invention;
FIG. 4 is a block diagram schematically showing the constitution of an execution apparatus of the network topology generation method of FIG. 3;
FIG. 5 is a flow chart of the respective constituent structures in the execution apparatus of the network topology generation method of FIG. 4;
fig. 6 is a schematic flow chart showing a network topology diagram provided by the present invention;
fig. 7 is a schematic diagram of a composition structure of a network topology generating apparatus provided by the present invention;
fig. 8 is a schematic diagram of a composition structure of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The network topology generation method of the present invention is described below with reference to fig. 1 to 6.
Referring to fig. 1, fig. 1 is a flowchart illustrating a network topology generating method according to the present invention, where the network topology generating method shown in fig. 1 may be executed by a network topology generating apparatus. As shown in fig. 1, the network topology map generating method at least includes:
101, configuring different network protocols based on the type of device in the target network.
In the embodiment of the invention, the target network may be a network deployed by a target subject, and the type of the target subject is not limited in the embodiment of the invention, for example, the target subject may be an enterprise, a school, a market, or the like. The type of the target network is not limited in the embodiment of the present invention, and for example, the target network may be a local area network, a metropolitan area network, a wide area network, and the like. The target network may include multiple types of devices, such as a computer, a virtual machine, a switch, a router, and the like, where the multiple types of devices may also include devices from different manufacturers, such as switches of different brands produced by different companies, switches of different models produced by the same company, and the like.
In the embodiment of the present invention, a network protocol supported by a device may be determined according to a type of the device in a target network, so that multiple network protocols are configured according to the network protocol supported by the device in the target network, so that different types of devices in the target network are respectively managed by different network protocols.
102, respectively scanning the corresponding type of equipment in the target network based on the configured network protocol to acquire the attribute information of the equipment.
In the embodiment of the invention, after different network protocols are configured according to the types of the devices in the target network, the devices of the corresponding types in the target network can be scanned respectively through the configured network protocols, so that the attribute information of the devices in the target network can be obtained. The implementation method for scanning the device can be determined according to the type of the network protocol, which is not limited in the embodiment of the present invention, for example, the first type of network protocol can scan the computers and virtual machines in the target network by means of remote login, and the second type of network protocol can scan the switches and routers in the target network by means of receiving the message.
In the embodiment of the invention, different types of devices in a target network are scanned through different network protocols, and the acquired attribute information of the different types of devices is also different, for example, a first attribute information of a computer and a virtual machine in the target network can be acquired by scanning the computer and the virtual machine through a first type of network protocol, a second attribute information of a switch and a router in the target network can be acquired by scanning the switch and the router through a second type of network protocol, wherein the first attribute information can comprise information such as an IP address, an MAC address, a subnet mask and the like, and the second attribute information can comprise information such as a routing table, an MAC address forwarding table (DotldPfdftable) and a base bridge list (DotldbaseBridgedAddreddress).
And 103, determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment, and obtaining a network topology diagram of the target network.
In the embodiment of the invention, after the corresponding type of equipment in the target network is scanned according to the configured network protocol to acquire the attribute information of the equipment in the target network, the equipment in the target network and the connection relationship between the equipment in the target network can be determined according to the acquired attribute information of the equipment in the target network, so that the determined equipment in the target network can be taken as a node, and the connection relationship between the equipment in the target network is taken as a link, thereby forming the network topology diagram of the whole target network. The link between the devices in the target network may be determined by adopting different methods according to the attribute information of the different types of devices, which is not limited in the embodiment of the present invention, for example, the link between the devices in the target network may be determined by passing through the IP address according to the IP address and the routing table, the link between the devices in the target network may be determined by passing through the MAC address according to the MAC address forwarding table and the base bridge list, and so on.
In the embodiment of the invention, after the connection relation between the devices in the target network is determined according to the attribute information of the devices in the target network to form the network topology diagram of the target network, the formed topology diagram of the target network can be displayed.
According to the network topology graph generation method provided by the embodiment of the invention, different network protocols are configured according to the types of the devices in the target network, the corresponding types of the devices in the target network are scanned respectively to obtain the attribute information of the devices, the devices in the target network can be automatically found, the links between the devices in the target network can be automatically identified by determining the connection relation between the devices in the target network according to the attribute information of the devices, so that the network topology graph of the target network is automatically generated, the accuracy of the generated network topology graph is ensured, the efficiency of generating the network topology graph is ensured, visual display of network links can be accurately and efficiently realized, and especially, the addition, deletion and modification of the devices and/or links in the network can be realized.
Referring to fig. 2, fig. 2 is a flow chart of another network topology generating method provided by the present invention, and as shown in fig. 2, the network topology generating method at least includes:
A different network protocol is configured 201 based on the type of device in the target network.
In the embodiment of the present invention, the description about 201 may be referred to the description of 101 in fig. 1, so that a description thereof will not be repeated here.
202, respectively scanning the corresponding type of equipment in the target network based on the configured network protocol to acquire the attribute information of the equipment.
In the embodiment of the present invention, the description of 202 may be referred to the description of 102 in fig. 1, and thus will not be repeated here.
203, analyzing the acquired attribute information of the device to generate list attribute information of the device.
In the embodiment of the invention, after the corresponding type of devices in the target network are scanned according to the configured network protocol to obtain the attribute information of the devices in the target network, the obtained attribute information of the devices in the target network can be analyzed to generate the list attribute information of the corresponding devices, and the implementation method for analyzing the attribute information of the devices can be determined according to the type of the network protocol.
And 204, determining the devices in the target network and the connection relation among the devices based on the generated list attribute information of the devices, and obtaining a network topology diagram of the target network.
In the embodiment of the invention, after the acquired attribute information of the target network equipment is analyzed to generate the list attribute information of the corresponding equipment, the equipment in the target network and the connection relationship between the equipment in the target network can be determined according to the generated list attribute information of the equipment, so that the determined equipment in the target network can be taken as a node, and the connection relationship between the equipment in the target network is taken as a link, thereby forming a network topology diagram of the whole target network. The link between the devices in the target network may be determined by adopting different methods according to the list attribute information of the different types of devices, which is not limited in the embodiment of the present invention, for example, the link between the devices in the target network may be determined by IP addresses according to the network card list attribute information and the routing table, the link between the devices in the target network may be determined by MAC addresses according to the MAC address forwarding table attribute information and the base bridge list attribute information, and so on.
Referring to fig. 3, fig. 3 is a flowchart of an application scenario of the network topology generating method provided by the present invention, and as shown in fig. 3, the network topology generating method at least includes:
301, configuring an SSH protocol or a Telnet protocol based on a host and a virtual machine in a target network; the SNMP protocol is configured based on switches and routers in the target network.
In the embodiment of the invention, as shown in fig. 4, the executing device of the network topology graph generating method may include a protocol configuration module, an information discovery module and a topology graph generating module, as shown in fig. 5, network scanning rules may be newly established in the protocol configuration module according to hosts, virtual machines, switches and routers of different manufacturers and different models in the target network, and SSH protocol or Telnet protocol may be configured to scan the hosts and the virtual machines and SNMP protocol may be configured to scan the switches and routers according to the newly established network scanning rules. The embodiment of the invention does not limit the content of the newly-built network scanning rule, for example, the newly-built network scanning rule can comprise user names, IP addresses and the like of a host machine and a virtual machine, ports, group names and the like of a switch and a router.
302, scanning a host and a virtual machine in a target network based on an SSH protocol or a Telnet protocol to acquire first attribute information of the host and the virtual machine; and scanning the switch and the router in the target network based on the SNMP protocol to acquire second attribute information of the switch and the router.
In the embodiment of the present invention, as shown in fig. 4 and fig. 5, the information discovery module receives, as first attribute information, information of remote login of the host and the virtual machine according to the SSH protocol or the Telnet protocol, and receives, as second attribute information, a message sent by the switch and the router according to the SNMP protocol. The information discovery module may determine whether the received information and the message include attribute information of the device after the information and the message are received from the device in the target network, if the received information and/or the message do not include attribute information of the device, the information discovery module may feed back to the protocol configuration module, and the protocol configuration module reconfigures the network protocol according to the fed back information, and if the received information and/or the message include attribute information of the device, the received information and/or the message is used as the first attribute information and/or the second attribute information.
303, analyzing the acquired first attribute information to generate network card list attribute information of the host and the virtual machine; and analyzing the acquired second attribute information to generate routing table attribute information, ARP table attribute information, MAC address forwarding table attribute information, base bridge list attribute information and STP port list attribute information of the switch and the router.
In the embodiment of the present invention, as shown in fig. 4 and fig. 5, after receiving the first attribute information of the host and the virtual machine, and the second attribute information of the switch and the router, the information discovery module may parse the first attribute information and the second attribute information, respectively, and parse the first attribute information to obtain the network card list attribute information of the host and the virtual machine, where the network card list attribute information may include information such as an IP address, an MAC address, and a subnet mask, and parse the second attribute information to obtain the routing table attribute information, the ARP table attribute information, the MAC address forwarding table attribute information, the base bridge list attribute information, and the STP port list (DotldStpPortTable) attribute information of the switch and the router.
304, determining links between devices in the target network through the IP address based on the routing table attribute information and the network card list attribute information; determining links between devices in a target network through the MAC address based on the attribute information of the MAC address forwarding table and the attribute information of the base bridge list; and determining links between devices in the target network through the cascading ports based on the STP port list attribute information and the base bridge list attribute information.
In the embodiment of the present invention, as shown in fig. 4 and fig. 5, the topology map generating module may determine, according to list attribute information obtained by analyzing the first attribute information and the second attribute information, that a device in the target network is a node, and determine, according to route table attribute information and network card list attribute information in the list attribute information, MAC address forwarding table attribute information and base bridge list attribute information, STP port list attribute information and base bridge list attribute information, whether a link relationship exists between devices in the target network, if the link relationship exists, determine, according to route table attribute information and network card list attribute information, a link between devices through IP addresses, determine, according to MAC address forwarding table attribute information and base bridge list attribute information, a link between devices through cascade ports, according to STP port list attribute information and base bridge list attribute information, respectively. Alternatively, when there is a case of three-layer switch forwarding in the target network, the link between the devices may also be determined by the IP address and the MAC address according to ARP table attribute information in the list attribute information.
A network topology map of the target network is generated 305 based on the links determined by the IP address, the links determined by the MAC address, and the links determined by the tandem port.
In the embodiment of the present invention, as shown in fig. 4 and 5, the topology map generation module may generate a network topology map of the target network according to the determined device nodes and links in the target network after passing through the links determined by the IP address, the MAC address, and the tandem port, and may display the generated network topology map.
Referring to fig. 6, fig. 6 is a flow chart illustrating a network topology according to the present invention, and as shown in fig. 6, the network topology generating method at least includes:
and 601, respectively acquiring performance information of equipment and links in a target network based on the configured network protocol.
In the embodiment of the present invention, the performance information of the device and the link may also be obtained from the corresponding type of device in the target network through the configured network protocol, where the performance information of the device and the link may include the available condition of the internal resources of the device, and the bandwidth ratio, the network delay, the availability, the rated rate, and other information of the link.
The normal and out-of-link devices and links are counted 602 based on the acquired performance information and the status of the devices and links is determined.
In the embodiment of the invention, after the performance information of the devices and links in the target network is acquired through the configured network protocol, the normal and the unconnected devices and links in the target network can be counted according to the acquired performance information of the devices and links, and the states of the devices and links in the target network are determined, for example, the states of the devices and links in the target network can comprise five levels of normal, prompt, warning, serious and emergency.
603, displaying a network topology diagram of the target network, and displaying the acquired performance information of the devices and links, the counted normal and unconnected device and link information, and displaying different states of the devices and links in different colors according to the determined states of the devices and links.
In the embodiment of the invention, the performance information of the equipment and the link, the normal and the link information of the equipment and the link and the different states of the equipment and the link are displayed in the network topology in real time according to the acquired performance information of the equipment and the link in the target network, the counted information of the equipment and the link which are normal and not connected in the target network and the determined state of the equipment and the link in the target network, and the different states of the equipment and the link are displayed in different colors, for example, the rated rate of the link can be directly displayed in the network topology by the thickness effect of lines.
According to the embodiment, the performance information of the equipment and the links, the normal and the abnormal equipment and the link information are displayed in the network topological graph, and the states of the equipment and the links can help management staff to know the link condition of the network and the operation condition of the equipment in real time, so that the fault node can be rapidly positioned on the basis of the topological graph.
Optionally, as shown in fig. 5, after the network topology of the target network is shown, devices in the network topology of the target network may be further aggregated, a sub-topology may be generated based on the aggregated devices, and the network topology and the generated sub-topology of the target network may be shown. For example, devices located in a region in a network topology of a target network may be aggregated and devices in the region may be presented in a sub-topology. The sub-topology map is generated by aggregating the devices, so that the structure displayed by the network topology map interface can be clearer and more visual for the network with huge number of the devices, the management of the manager is facilitated, and the management efficiency of the manager can be improved.
Optionally, after the network topology diagram of the target network is displayed, search information may be received, and the received search information is matched with information of the device or the link in the network topology diagram of the target network; the retrieval information may include information of a link start device and an end device in the target network, or information of a link state in the target network; the matching links are then shown in highlighted form in the network topology of the target network. By receiving the search information and searching in the network topology graph, the link in an abnormal state in the target network can be rapidly positioned, and management of the target network by a manager is facilitated.
Optionally, after the network topology diagram of the target network is displayed, the devices and links in the network topology diagram can be added, deleted and modified in a manual manner, and operations such as zooming in, zooming out and dragging the network topology diagram and the devices and links thereof can be performed. The flexibility of the network topology graph can be improved by adding the manual function, and the performance of the network topology graph display can be enhanced.
The network topology generating device provided by the invention is described below, and the network topology generating device described below and the network topology generating method described above can be referred to correspondingly.
Referring to fig. 7, fig. 7 is a schematic diagram of a composition structure of a network topology generating apparatus provided by the present invention, where the network topology generating apparatus shown in fig. 7 may be used to execute the network topology generating method of fig. 1, and as shown in fig. 7, the network topology generating apparatus at least includes:
a protocol configuration module 710 for configuring different network protocols based on the type of device in the target network.
The information discovery module 720 is configured to scan devices of corresponding types in the target network based on the configured network protocol, respectively, to obtain attribute information of the devices.
The topology map generating module 730 is configured to determine devices in the target network and a connection relationship between the devices based on the obtained attribute information of the devices, and obtain a network topology map of the target network.
Optionally, the protocol configuration module 710 is configured to:
configuring a first type of network protocol based on a host and a virtual machine in a target network; wherein the first type of network protocol comprises an SSH protocol or a Telnet protocol;
configuring a second type of network protocol based on switches and routers in the target network; wherein the second type of network protocol comprises SNMP protocol.
The information discovery module 720 is configured to:
scanning a host and a virtual machine in a target network based on a first type of network protocol to acquire first attribute information of the host and the virtual machine;
and scanning the switch and the router in the target network based on a second type of network protocol to acquire second attribute information of the switch and the router.
Optionally, the topology map generation module 730 includes:
and the information analysis unit is used for analyzing the acquired attribute information of the equipment and generating list attribute information of the equipment.
The topology map generating unit is used for determining the devices in the target network and the connection relation between the devices based on the generated list attribute information of the devices to obtain a network topology map of the target network.
Optionally, the information parsing unit is configured to:
analyzing the acquired first attribute information to generate network card list attribute information of the host and the virtual machine;
analyzing the acquired second attribute information to generate routing table attribute information, ARP table attribute information, MAC address forwarding table attribute information, base bridge list attribute information and STP port list attribute information of the switch and the router;
the topology map generation unit is used for:
determining links between devices in a target network through IP addresses based on the routing table attribute information and the network card list attribute information;
determining links between devices in a target network through the MAC address based on the attribute information of the MAC address forwarding table and the attribute information of the base bridge list;
determining links between devices in a target network through cascading ports based on STP port list attribute information and base bridge list attribute information;
a network topology map of the target network is generated based on the links determined by the IP addresses, the links determined by the MAC addresses, and the links determined by the tandem ports.
Optionally, the network topology generating apparatus further includes:
and the information acquisition module is used for respectively acquiring the performance information of the equipment and the link in the target network based on the configured network protocol.
And the information statistics module is used for counting normal and out-of-connection equipment and links based on the acquired performance information and determining the states of the equipment and the links.
The topology diagram display module is used for displaying a network topology diagram of the target network, displaying the acquired performance information of the equipment and the links, the counted normal and unconnected equipment and link information and displaying different states of the equipment and the links in different colors according to the determined states of the equipment and the links.
Optionally, the network topology generating apparatus further includes:
and the sub-topology map generation module is used for aggregating the devices in the network topology map of the target network and generating a sub-topology map based on the aggregated devices.
The topology diagram display module is further used for displaying the network topology diagram after the target network is aggregated and the generated sub-topology diagram.
Optionally, the network topology generating apparatus further includes:
the information retrieval module is used for receiving the retrieval information and matching the received retrieval information with information of equipment or links in a network topology diagram of the target network; wherein the retrieved information includes information of a link initiation device and an end device in the target network or information of a link state in the target network.
The topology diagram display module is further used for displaying the matched links in a highlighted form in the network topology diagram of the target network.
Fig. 8 illustrates a physical structure diagram of an electronic device, as shown in fig. 8, which may include: processor 810, communication interface 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, and memory 830 accomplish communication with each other through communication bus 840. The processor 810 may invoke logic instructions in the memory 830 to perform a network topology map generation method comprising:
configuring different network protocols based on the type of device in the target network;
scanning corresponding types of equipment in the target network based on the configured network protocol respectively to acquire attribute information of the equipment;
and determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment, and obtaining a network topology diagram of the target network.
Further, the logic instructions in the memory 830 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RAM, randomAccessMemory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the network topology map generation method provided by the methods described above, the method comprising:
configuring different network protocols based on the type of device in the target network;
scanning corresponding types of equipment in the target network based on the configured network protocol respectively to acquire attribute information of the equipment;
and determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment, and obtaining a network topology diagram of the target network.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the network topology generation methods provided above, the method comprising:
configuring different network protocols based on the type of device in the target network;
scanning corresponding types of equipment in the target network based on the configured network protocol respectively to acquire attribute information of the equipment;
And determining the equipment in the target network and the connection relation between the equipment based on the acquired attribute information of the equipment, and obtaining a network topology diagram of the target network.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for generating a network topology, comprising:
configuring different network protocols based on the type of device in the target network;
scanning corresponding types of equipment in the target network based on the configured network protocol respectively to acquire attribute information of the equipment;
determining equipment in the target network and a connection relation between the equipment based on the acquired attribute information of the equipment to obtain a network topology diagram of the target network;
wherein the configuring different network protocols based on the type of the device in the target network includes:
determining a network protocol supported by equipment according to the type of the equipment in the target network, and configuring a plurality of network protocols according to the network protocol supported by the equipment in the target network;
The configuring different network protocols based on the types of the devices in the target network includes:
configuring a first type of network protocol based on a host and a virtual machine in the target network; wherein the first type of network protocol comprises an SSH protocol or a Telnet protocol;
configuring a second type of network protocol based on switches and routers in the target network; wherein the second type of network protocol comprises SNMP protocol;
the scanning, based on the configured network protocol, the device of the corresponding type in the target network, to obtain attribute information of the device, including:
scanning a host and a virtual machine in the target network based on the first type of network protocol in a remote login mode to acquire first attribute information of the host and the virtual machine;
and scanning the switch and the router in the target network based on the second type of network protocol by means of receiving the message, and acquiring second attribute information of the switch and the router.
2. The network topology generation method of claim 1, wherein determining the connection relationship between the devices in the target network based on the acquired attribute information of the devices, to obtain the network topology of the target network, comprises:
Analyzing the acquired attribute information of the equipment to generate list attribute information of the equipment;
and determining the equipment in the target network and the connection relation between the equipment based on the generated list attribute information of the equipment, and obtaining a network topology diagram of the target network.
3. The network topology generation method of claim 2, wherein the parsing the acquired attribute information of the device to generate list attribute information of the device, comprises:
analyzing the acquired first attribute information to generate network card list attribute information of the host and the virtual machine;
analyzing the acquired second attribute information to generate routing table attribute information, ARP table attribute information, MAC address forwarding table attribute information, base bridge list attribute information and STP port list attribute information of the switch and the router;
the determining, based on the generated list attribute information of the devices, connection relationships between the devices in the target network, to obtain a network topology diagram of the target network, includes:
determining links between devices in the target network through IP addresses based on the routing table attribute information and the network card list attribute information;
Determining links between devices in the target network through the MAC address based on the MAC address forwarding table attribute information and the base bridge list attribute information;
determining links between devices in the target network through cascading ports based on the STP port list attribute information and the base bridge list attribute information;
a network topology map of the target network is generated based on the links determined by the IP addresses, the links determined by the MAC addresses, and the links determined by the tandem ports.
4. A network topology generation method according to any one of claims 1 to 3, further comprising:
respectively acquiring performance information of equipment and links in the target network based on the configured network protocol;
counting normal and out-of-link equipment and links based on the acquired performance information, and determining the states of the equipment and links;
and displaying the network topology diagram of the target network, displaying the acquired performance information of the equipment and the links, the counted normal and unconnected equipment and link information, and displaying different states of the equipment and the links in different colors according to the determined states of the equipment and the links.
5. The method for generating a network topology according to claim 4, further comprising, after said displaying the network topology of the target network:
Aggregating devices in a network topology graph of the target network, and generating a sub-topology graph based on the aggregated devices;
and displaying the network topology diagram after the target network aggregation and the generated sub-topology diagram.
6. The network topology generation method of claim 4, wherein said presenting the network topology of the target network further comprises:
receiving search information, and matching the received search information with information of equipment or links in a network topology diagram of the target network; wherein the search information comprises information of a link starting device and a link ending device in the target network or information of a link state in the target network;
the matching links are shown in highlighted form in the network topology of the target network.
7. A network topology generation apparatus, comprising:
the protocol configuration module is used for configuring different network protocols based on the types of the devices in the target network;
the information discovery module is used for respectively scanning the equipment of the corresponding type in the target network based on the configured network protocol to acquire attribute information of the equipment;
the topology map generation module is used for determining equipment in the target network and connection relation among the equipment based on the acquired attribute information of the equipment to obtain a network topology map of the target network;
The protocol configuration module is further used for determining a network protocol supported by the equipment according to the type of the equipment in the target network and configuring various network protocols according to the network protocol supported by the equipment in the target network;
the protocol configuration module is further used for configuring a first type of network protocol based on a host and a virtual machine in the target network; wherein the first type of network protocol comprises an SSH protocol or a Telnet protocol; configuring a second type of network protocol based on switches and routers in the target network; wherein the second type of network protocol comprises SNMP protocol;
the information discovery module is further configured to scan, by using a telnet manner, a host and a virtual machine in the target network based on the first type of network protocol, and obtain first attribute information of the host and the virtual machine; and scanning the switch and the router in the target network based on the second type of network protocol by means of receiving the message, and acquiring second attribute information of the switch and the router.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the network topology generation method of any of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the network topology generation method of any of claims 1 to 6.
CN202210412439.XA 2022-04-19 2022-04-19 Network topology graph generation method and device Active CN114915561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210412439.XA CN114915561B (en) 2022-04-19 2022-04-19 Network topology graph generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210412439.XA CN114915561B (en) 2022-04-19 2022-04-19 Network topology graph generation method and device

Publications (2)

Publication Number Publication Date
CN114915561A CN114915561A (en) 2022-08-16
CN114915561B true CN114915561B (en) 2024-02-20

Family

ID=82764380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210412439.XA Active CN114915561B (en) 2022-04-19 2022-04-19 Network topology graph generation method and device

Country Status (1)

Country Link
CN (1) CN114915561B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115514586B (en) * 2022-11-24 2023-03-21 河北纬坤电子科技有限公司 Access control policy configuration method and electronic equipment
CN117176639B (en) * 2023-11-02 2024-03-08 北京邮电大学 Multi-protocol-based network topology automatic discovery method and device

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143007A (en) * 2011-05-03 2011-08-03 中国南方电网有限责任公司 Distribution-based hierarchical network topology discovery method
CN105072039A (en) * 2015-07-31 2015-11-18 山东蚁巡网络科技有限公司 Link layer network topology discovery method
CN106301909A (en) * 2016-08-11 2017-01-04 杭州华三通信技术有限公司 A kind of port detection method and device
CN108055207A (en) * 2017-10-26 2018-05-18 北京天元创新科技有限公司 A kind of network topology cognitive method and device
CN109525417A (en) * 2018-10-09 2019-03-26 广东美的制冷设备有限公司 Household appliance cut-in method, domestic electric appliances controller and storage medium based on network interface
CN109544349A (en) * 2018-11-29 2019-03-29 广东电网有限责任公司 One kind being based on networked asset information collecting method, device, equipment and storage medium
CN109672740A (en) * 2018-10-15 2019-04-23 无锡华云数据技术服务有限公司 The method of deployment configuration information is obtained in a kind of large-scale cluster environment
CN110784358A (en) * 2019-10-31 2020-02-11 北京宝兰德软件股份有限公司 Method and device for constructing network call relation topological graph
CN111901144A (en) * 2020-06-19 2020-11-06 深圳奇迹智慧网络有限公司 Interaction method and device for Internet of things equipment, computer equipment and storage medium
CN112822053A (en) * 2021-01-13 2021-05-18 科大国创云网科技有限公司 SNMP-based link layer network topology structure discovery method and system
CN112910696A (en) * 2021-01-22 2021-06-04 上海三零卫士信息安全有限公司 Automatic modeling analysis method for network topology
CN113452561A (en) * 2021-06-25 2021-09-28 深信服科技股份有限公司 Topology generation method, device and equipment and readable storage medium
CN114257537A (en) * 2021-12-06 2022-03-29 上海新炬网络信息技术股份有限公司 Network topology self-discovery method based on multi-dimensional priority

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6847614B2 (en) * 1998-04-20 2005-01-25 Broadcom Corporation Apparatus and method for unilateral topology discovery in network management

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143007A (en) * 2011-05-03 2011-08-03 中国南方电网有限责任公司 Distribution-based hierarchical network topology discovery method
CN105072039A (en) * 2015-07-31 2015-11-18 山东蚁巡网络科技有限公司 Link layer network topology discovery method
CN106301909A (en) * 2016-08-11 2017-01-04 杭州华三通信技术有限公司 A kind of port detection method and device
CN108055207A (en) * 2017-10-26 2018-05-18 北京天元创新科技有限公司 A kind of network topology cognitive method and device
CN109525417A (en) * 2018-10-09 2019-03-26 广东美的制冷设备有限公司 Household appliance cut-in method, domestic electric appliances controller and storage medium based on network interface
CN109672740A (en) * 2018-10-15 2019-04-23 无锡华云数据技术服务有限公司 The method of deployment configuration information is obtained in a kind of large-scale cluster environment
CN109544349A (en) * 2018-11-29 2019-03-29 广东电网有限责任公司 One kind being based on networked asset information collecting method, device, equipment and storage medium
CN110784358A (en) * 2019-10-31 2020-02-11 北京宝兰德软件股份有限公司 Method and device for constructing network call relation topological graph
CN111901144A (en) * 2020-06-19 2020-11-06 深圳奇迹智慧网络有限公司 Interaction method and device for Internet of things equipment, computer equipment and storage medium
CN112822053A (en) * 2021-01-13 2021-05-18 科大国创云网科技有限公司 SNMP-based link layer network topology structure discovery method and system
CN112910696A (en) * 2021-01-22 2021-06-04 上海三零卫士信息安全有限公司 Automatic modeling analysis method for network topology
CN113452561A (en) * 2021-06-25 2021-09-28 深信服科技股份有限公司 Topology generation method, device and equipment and readable storage medium
CN114257537A (en) * 2021-12-06 2022-03-29 上海新炬网络信息技术股份有限公司 Network topology self-discovery method based on multi-dimensional priority

Also Published As

Publication number Publication date
CN114915561A (en) 2022-08-16

Similar Documents

Publication Publication Date Title
JP7108674B2 (en) Failure root cause determination method and device, and computer storage medium
CN109644141B (en) Method and system for visualizing a network
JP6821800B2 (en) Systems and methods for interactive network analytics platforms
CN114915561B (en) Network topology graph generation method and device
US7860016B1 (en) Method and apparatus for configuration and analysis of network routing protocols
EP3675419A1 (en) Method and apparatus for detecting network fault
CN110661669A (en) Network topology automatic discovery method of network equipment based on ICMP, TCP and UDP protocols
US8203962B2 (en) Network monitoring device, network monitoring method, and network monitoring program
US11075814B2 (en) Sub-topology discovery for operating hybrid solutions
CN109672562B (en) Data processing method and device, electronic equipment and storage medium
US11509552B2 (en) Application aware device monitoring correlation and visualization
WO2021047011A1 (en) Data processing method and apparatus, and computer storage medium
CN113273135B (en) Network topology discovery in a substation
CN116545861A (en) Network topology graph generation method, device and equipment
US20100094994A1 (en) Network structure information acquiring method and device
CN109639488B (en) Multi-extranet shunt acceleration method and system
US20130042020A1 (en) Quick Network Path Discovery
US11032124B1 (en) Application aware device monitoring
US20040215781A1 (en) Techniques for determining device connectivity in a network using protocol-specific connectivity information
CN108833129B (en) Network topology discovery method and device
US20040158780A1 (en) Method and system for presenting neighbors of a device in a network via a graphical user interface
CN112787930A (en) Method, device and storage medium for monitoring running state of peer
CN116248479A (en) Network path detection method, device, equipment and storage medium
US8467301B2 (en) Router misconfiguration diagnosis
CN113364681B (en) Network path determination method, network path determination device, electronic apparatus, network path determination medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant