CN107733713B - Method, system, device and storage medium for acquiring network topology in hybrid network - Google Patents

Method, system, device and storage medium for acquiring network topology in hybrid network Download PDF

Info

Publication number
CN107733713B
CN107733713B CN201710973282.7A CN201710973282A CN107733713B CN 107733713 B CN107733713 B CN 107733713B CN 201710973282 A CN201710973282 A CN 201710973282A CN 107733713 B CN107733713 B CN 107733713B
Authority
CN
China
Prior art keywords
node
information
table information
network
link
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
CN201710973282.7A
Other languages
Chinese (zh)
Other versions
CN107733713A (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 Deta Jingyao Information Technology Co ltd
Original Assignee
Beijing Deta Jingyao Information Technology 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 Deta Jingyao Information Technology Co ltd filed Critical Beijing Deta Jingyao Information Technology Co ltd
Priority to CN201710973282.7A priority Critical patent/CN107733713B/en
Publication of CN107733713A publication Critical patent/CN107733713A/en
Application granted granted Critical
Publication of CN107733713B publication Critical patent/CN107733713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/52Multiprotocol routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Abstract

The invention provides a method, a system, equipment and a storage medium for acquiring network topology in a hybrid network, wherein the acquisition method comprises the steps of acquiring communication protocol information corresponding to each IP node in an active state in a target hybrid network; acquiring a logical link corresponding to the IP node comprising the non-self physical information according to the FDB table information corresponding to each IP node, and establishing a link to be checked corresponding to the IP node not comprising the non-self physical information according to the STP table information and the routing table information; screening links with the same network address as the existing logical link from all the links to be checked, and converting the rest links to be checked into the logical links; and acquiring the network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node. The method and the device can acquire the network topology structure in the hybrid network, the acquisition process is quick and reliable, and the accuracy of the acquired network topology structure in the hybrid network is effectively improved.

Description

Method, system, device and storage medium for acquiring network topology in hybrid network
Technical Field
The invention relates to the technical field of network topology discovery, in particular to a method, a system, equipment and a storage medium for acquiring network topology in a hybrid network.
Background
According to the related definition of open System interconnection (osi) (open System interconnection), network management mainly includes five functional domains: the method comprises the steps of fault management, configuration management, performance management, safety management and charging management, wherein the configuration management is the basis of network management, the main functions of the configuration management comprise discovering the topological structure of a network, monitoring and managing the configuration situation of network equipment, and other functions are all based on the topological structure of a known network, wherein the conventional example of the topological structure of the network is shown in figure 1, and the main purpose of network topology discovery is to acquire and maintain the existence information of network nodes and the connection relation information between the network nodes and draw the whole network topological graph on the basis of the existence information and the connection relation information.
In 2000, bell laboratories published article "Topology Discovery in Heterogeneous ip networks", which describes mathematical formulas and implementation methods for calculating link relationships between network devices, but because the calculation process of the link relationship between the network devices needs to acquire the set of physical addresses mac (media access control) of all the devices in the target network and the complete set of FDB table of a certain port of a certain switch, but with the rapid development of social science and technology, the target network which needs to be monitored and managed is more and more huge, thus acquiring the MAC addresses of all devices in the target network and acquiring a complete FDB table of ports has become a new challenge for network topology acquisition, meanwhile, cisco Discovery protocol cdp (cisco Discovery protocol) protocol may be used to obtain a network topology in a network environment composed entirely of cisco devices, but is not applicable to a hybrid network environment.
At present, around the above-mentioned difficult problem of acquiring network Topology in hybrid networks, in 2006, a link layer Discovery Protocol LL DP (L ink L a layer Discovery Protocol) Protocol for performing link Discovery in hybrid networks was proposed, but due to some manufacturers not fully supporting the LL DP Protocol, the problem of incompatibility with devices supporting the LL DP Protocol is caused, and in the software field, 2010, bell laboratories published the article "Ethernet Topology Discovery for networks with incorporated Information", and proposed inaccurate links calculated under hybrid networks under the condition that complete a and U cannot be acquired, the degree of inaccuracy depends on how much Information is acquired;
however, whether the network device in the hybrid network is incompatible with the device supporting the LL DP protocol or the method described in the 2010 paper of the bell laboratory, there are problems that the calculated link has a large area of errors and the network topology in the hybrid network cannot be accurately obtained.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method, a system, equipment and a storage medium for acquiring the network topology in the hybrid network, which can acquire the network topology structure in the hybrid network, have a quick and reliable acquisition process and effectively improve the accuracy of the acquired network topology structure in the hybrid network.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, the present invention provides a method for acquiring a network topology in a hybrid network, where the method includes:
collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network, wherein the communication protocol information comprises: interface table information, forwarding database FDB table information, spanning tree protocol STP table information and routing table information;
acquiring a logical link corresponding to the IP node which comprises non-self physical information according to the FDB table information corresponding to each IP node, and establishing a link to be checked corresponding to the IP node which does not comprise the non-self physical information according to the STP table information and the routing table information;
screening links with the same network address as the existing logical link from all links to be checked, and converting the rest links to be checked into the logical link;
and acquiring the network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node.
Further, after the acquiring a logical link corresponding to an IP node including non-self physical information according to the FDB table information corresponding to each IP node, and establishing a link to be checked corresponding to an IP node not including non-self physical information according to the STP table information and the routing table information, the acquiring method further includes:
judging whether the communication protocol information corresponding to each IP node which does not include the non-self physical information also includes link discovery protocol information;
if so, establishing a link to be checked corresponding to the IP node not comprising the non-self physical information according to the link discovery protocol information in the IP node not comprising the non-self physical information;
wherein the link discovery protocol information includes Cisco discovery protocol CDP table information, neighbor discovery protocol NDP table information, and link layer discovery protocol LL DP table information.
Further, before the acquiring communication protocol information corresponding to each IP node in an active state in the target hybrid network, the acquiring method further includes:
searching and obtaining an IP node in an active state in the target hybrid network according to a network diagnosis tool;
and screening out the IP nodes supporting the network management protocol from all the IP nodes in the active state to obtain all the IP nodes which support the network management and are in the active state.
Further, the collecting of the communication protocol information corresponding to each IP node in an active state in the target hybrid network includes: interface table information, FDB table information, STP table information and routing table information; the method comprises the following steps:
collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network for multiple times, wherein the communication protocol information comprises: interface table information, FDB table information, STP table information and routing table information;
and carrying out information accumulation processing on a plurality of pieces of FDB table information corresponding to each IP node acquired for a plurality of times.
Further, the communication protocol information further includes: ARP table information;
correspondingly, after the information accumulation processing is performed on the multiple pieces of FDB table information corresponding to each IP node acquired multiple times, the acquiring method further includes:
and performing information supplement processing on the FDB table information which is subjected to information accumulation processing and corresponds to each IP node according to the ARP table information corresponding to each IP node.
Further, the acquiring a logical link corresponding to an IP node including non-self physical information according to the FDB table information corresponding to each IP node, and establishing a link to be checked corresponding to an IP node not including non-self physical information according to the STP table information and the routing table information includes:
sequentially judging whether the FDB table information corresponding to each IP node comprises non-self physical information or not;
if the FDB table information of a certain IP node comprises non-self physical information, acquiring a logical link between the IP node and another corresponding IP node in the non-self physical information;
and if the FDB table information of one IP node does not contain non-self physical information, establishing links to be checked between the IP node and other IP nodes according to the STP table information and the routing table information.
Further, before the screening out the links with the same network address as the logical link from all the links to be checked, the obtaining method further includes:
if an isolated point still exists in the IP node, judging whether the isolated point is a physical historical path device of another IP node;
if yes, generating the link to be checked of the isolated point.
In a second aspect, the present invention provides an acquisition system for network topology in a hybrid network, the acquisition system comprising:
a communication protocol information acquisition unit, configured to acquire communication protocol information corresponding to each IP node in an active state in a target hybrid network, where the communication protocol information includes: interface table information, forwarding database FDB table information, spanning tree protocol STP table information and routing table information;
a link obtaining unit, configured to obtain a logical link corresponding to an IP node that includes non-self physical information according to the FDB table information corresponding to each IP node, and establish a link to be checked corresponding to an IP node that does not include non-self physical information according to the STP table information and the routing table information;
the link screening unit to be checked is used for screening links which are the same as the network address of the existing logical link from all the links to be checked and converting the rest links to be checked into the logical link;
and a network topology obtaining unit, configured to obtain a network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node.
In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for acquiring a network topology in a hybrid network.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program, which when executed by a processor, performs the steps of the method for obtaining a network topology in a hybrid network.
As can be seen from the foregoing technical solutions, according to the method, system, device, and storage medium for acquiring a network topology in a hybrid network provided by the present invention, communication protocol information corresponding to each IP node in an active state in a target hybrid network is acquired, where the communication protocol information includes: interface table information, forwarding database FDB table information, spanning tree protocol STP table information and routing table information; acquiring a logical link corresponding to the IP node which comprises non-self physical information according to the FDB table information corresponding to each IP node, and establishing a link to be checked corresponding to the IP node which does not comprise the non-self physical information according to the STP table information and the routing table information; screening links with the same network address as the existing logical link from all links to be checked, and converting the rest links to be checked into the logical link; and acquiring the network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node, so that the network topology structure in the hybrid network can be acquired, the acquisition process is quick and reliable, and the accuracy of the acquired network topology structure in the hybrid network is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a conventional exemplary diagram of a topology of a network;
fig. 2 is a flowchart illustrating an embodiment of a method for acquiring a network topology in a hybrid network according to the present invention;
fig. 3 is a schematic flow chart of an embodiment of steps a01 and a02 after step 200 in the method for acquiring a network topology in a hybrid network according to the present invention;
fig. 4 is a flowchart illustrating an embodiment of steps 001 and 002 of the method for acquiring a network topology in a hybrid network according to the present invention, before step 100;
fig. 5 is a flowchart illustrating a specific embodiment of step 100 in the method for acquiring a network topology in a hybrid network according to the present invention;
fig. 6 is a flowchart illustrating an embodiment of step B01 after step 100 in the method for acquiring a network topology in a hybrid network according to the present invention;
fig. 7 is a flowchart illustrating an embodiment of step 200 of the method for acquiring a network topology in a hybrid network according to the present invention;
fig. 8 is a flowchart illustrating a specific embodiment of steps C01 and C02 before step 300 in the method for acquiring a network topology in a hybrid network according to the present invention;
FIG. 9 is a schematic structural diagram of an embodiment of a system for acquiring a network topology in a hybrid network according to the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a specific implementation manner of a method for acquiring a network topology in a hybrid network, and referring to fig. 2, the method for acquiring a network topology in a hybrid network specifically includes the following steps:
step 100: collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network, wherein the communication protocol information comprises: interface table information, forwarding database FDB table information, spanning tree protocol STP table information, and routing table information.
In step 100, a communication protocol information collecting unit in the system for acquiring a network topology in a hybrid network collects communication protocol information corresponding to each active IP node in a target hybrid network, and the system for acquiring a network topology in a hybrid network is a configuration management device in network management, and the communication protocol information includes: interface table information, forwarding database FDB table information, spanning tree protocol STP table information, and routing table information.
It is understood that, in step 100, the communication protocol information collected by the communication protocol information collection unit is not limited to the four information of interface table information, forwarding database FDB table information, spanning tree protocol STP table information, and routing table information, and may further include related information such as ARP table information, cisco discovery protocol CDP table information, neighbor discovery protocol NDP table information, and link layer discovery protocol LL DP table information, and the present embodiment is not limited to the type of information collected by the communication protocol information collection unit.
Specifically, the interface table information is from the interface protocol
Information in Interface protocol, wherein the Interface protocol refers to a communication mode and a requirement which need to be followed between interfaces needing information exchange, and not only specifies the communication of a physical layer, but also specifies the requirements of a syntax layer and a semantic layer; the forwarding database FDB table information is that the switch receives Media Access Control (MAC) address information from all its ports, forms a MAC address table, and maintains it. When the exchanger receives a frame of data, it will decide whether to filter or forward the frame of data according to its own MAC address table, and the maintained MAC table is the FDB address table; the spanning Tree protocol STP (spanning Tree protocol) in the STP table information is applied to establishing a Tree topology in a network, eliminating loops in the network and realizing path redundancy by a certain method, and the spanning Tree protocol is suitable for network equipment of all manufacturers, has difference in configuration and reflected function strength, but has consistent principle and application effect; the routing table information is a table of routing information stored on a router or other internet network device that stores paths to specific network terminals and, in some cases, metrics associated with those paths.
Step 200: and according to the STP table information and the routing table information, establishing a link to be checked corresponding to the IP node which does not comprise the non-self physical information.
In the step 200, after the communication protocol information acquisition unit acquires the communication protocol information corresponding to the protocol IP nodes interconnected between the networks in the active state in the target hybrid network, the link acquisition unit in the acquisition system of the network topology in the hybrid network sends the acquired communication protocol information corresponding to the IP nodes in the active state, so that the link acquisition unit acquires the logical links corresponding to the IP nodes including non-self physical information according to the FDB table information corresponding to the IP nodes, and establishes links to be checked corresponding to the IP nodes not including non-self physical information according to the STP table information and the routing table information.
It can be understood that the logical link is a data link formed by a physical link and necessary communication procedures, and the logical link Control (L logical L ink Control, LL C) is an upper layer part of a data link layer in the local area network, and a logical link Control protocol is defined in IEEE 802.2. the data link service of the user provides a uniform interface for the network layer through a LL C sublayer, and a MAC (medium access Control sublayer) is arranged below the LL C sublayer, and the sublayer is added in the IEEE standard, and ensures transmission in different network types by adding 8 bits of destination address service access points and source address service access points to an IP packet, and the link to be checked is a logical link to be checked, and needs to be determined or marked as a new logical link after being screened in the subsequent step 300.
Step 300: and screening out links with the same network address as the existing logical link from all the links to be checked, and converting the rest links to be checked into the logical links.
In step 300, a link to be checked in the system for acquiring a network topology in a hybrid network is screened out from all links to be checked by the link screening unit in the hybrid network, where the link to be checked has the same network address as the existing logical link, and the remaining links to be checked are converted into logical links, so that all the remaining links are logical links with duplicate entries deleted.
Step 400: and acquiring the network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node.
In step 400, the network topology obtaining unit in the system for obtaining network topology in the hybrid network obtains the network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node.
As can be seen from the above description, the method for acquiring the network topology in the hybrid network according to the embodiment of the present invention can acquire the network topology structure in the hybrid network, the acquisition process is fast and reliable, and the accuracy of the acquired network topology structure in the hybrid network is effectively improved.
In a specific embodiment, the present invention further provides a specific embodiment of steps a01 and a02 after step 200 in the method for acquiring a network topology in a hybrid network, and referring to fig. 3, the steps a01 and a02 specifically include the following:
step A01: judging whether the communication protocol information corresponding to each IP node which does not include the non-self physical information also includes link discovery protocol information; if yes, go to step A02; otherwise, go directly to step 300.
A02, establishing a link to be checked corresponding to the IP node not including the non-self-physical information according to the link discovery protocol information in the IP node not including the non-self-physical information, wherein the link discovery protocol information comprises Cisco discovery protocol CDP table information, neighbor discovery protocol NDP table information and link layer discovery protocol LL DP table information, and entering the step 300.
It can be understood that, in step a02, the system for acquiring a network topology in a hybrid network establishes a link to be checked corresponding to the IP node not including non-self physical information according to the link Discovery Protocol information in the IP node not including non-self physical information, wherein the cisco Discovery Protocol CDP (cisco Discovery Protocol) table information is a private two-layer network Protocol introduced by cisco and can be operated on most cisco devices, the cisco devices can share relevant information about an operating system software version, an IP address, a hardware platform, and the like among devices directly connected to them by operating the CDP Protocol, the neighbor Discovery Protocol ndp (neighbor Discovery Protocol) table information is used to discover neighbor information directly connected to the devices, including device names, software/hardware versions, connection ports, and the like of neighboring devices, and further provides information about IDs, port addresses, hardware platforms, and the like of the devices, and the link layer Discovery Protocol LL (L in L) is a subnet identifier of the local subnet Discovery Protocol which allows the devices to advertise the local subnet Discovery Protocol information of the vendor to notify the local devices of the network Discovery Protocol.
As can be seen from the above description, the method for acquiring a network topology in a hybrid network provided in the embodiments of the present invention effectively improves the application range and the application range of the method for acquiring a network topology in a hybrid network, meets the support requirements of various manufacturers, and further improves the accuracy and the reliability of acquiring a network topology structure in a hybrid network.
In a specific embodiment, the present invention further provides a specific embodiment of steps 001 and 002 before step 100 in the method for acquiring a network topology in a hybrid network, referring to fig. 4, where the steps 001 and 002 specifically include the following:
step 001: and searching and obtaining the IP node in the active state in the target hybrid network according to the network diagnosis tool.
Specifically, the system for acquiring the network topology in the hybrid network searches for the IP node in the active state in the target hybrid network according to an instruction of an internet packet finder ping (packetnetgroper).
Step 002: and screening out the IP nodes supporting the network management protocol from all the IP nodes in the active state to obtain all the IP nodes which support the network management and are in the active state.
Specifically, the network management protocol may be a simple network management protocol snmp (simple network management protocol), which is composed of a set of network management standards and includes an application layer protocol (application layer protocol), a database model (database schema) and a set of resource objects. The protocol can support a network management system to monitor devices connected to the network for any regulatory concerns. It can be understood that the system for acquiring the network topology in the hybrid network determines whether the target IP supports the SNMP protocol by using the GET sysOID operation through the SNMP protocol.
As can be seen from the above description, the method for acquiring a network topology in a hybrid network provided in the embodiments of the present invention effectively improves the reliability and integrity of IP node acquisition, and further improves the accuracy and integrity of acquiring a network topology structure in a hybrid network.
In a specific embodiment, the present invention further provides a specific embodiment of step 100 in the method for acquiring a network topology in a hybrid network, and referring to fig. 5, the step 100 specifically includes the following steps:
step 101: collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network for multiple times, wherein the communication protocol information comprises: interface table information, FDB table information, STP table information, and routing table information.
Step 102: and carrying out information accumulation processing on a plurality of pieces of FDB table information corresponding to each IP node acquired for a plurality of times.
It can be understood that the system for acquiring the network topology in the hybrid network performs information accumulation processing on a plurality of pieces of FDB table information corresponding to each IP node acquired for multiple times, so as to reduce data lost due to timeout of the FDB table.
As can be seen from the above description, the method for acquiring a network topology in a hybrid network provided in the embodiments of the present invention effectively reduces data loss in FDB table information, and further improves accuracy and reliability of acquiring a network topology structure in a hybrid network.
In a specific embodiment, the present invention further provides a specific embodiment of step B01 after step 100 in the method for acquiring a network topology in a hybrid network, referring to fig. 6, where step B00 specifically includes the following contents:
the communication protocol information further includes: ARP table information;
correspondingly, after the step 100, the acquiring method further includes:
step B00: and performing information supplement processing on the FDB table information which is subjected to information accumulation processing and corresponds to each IP node according to the ARP table information corresponding to each IP node.
As can be seen from the above description, the method for acquiring a network topology in a hybrid network according to the embodiment of the present invention improves the reliability and integrity of information acquisition of the FDB table by supplementing data of the FDB table, thereby further improving the accuracy and reliability of acquiring a network topology structure in a hybrid network.
In a specific embodiment, the present invention further provides a specific embodiment of step 200 in the method for acquiring a network topology in a hybrid network, and referring to fig. 7, the step 200 specifically includes the following steps:
step 201: sequentially judging whether the FDB table information corresponding to each IP node comprises non-self physical information or not; if the FDB table information of a certain IP node comprises non-self physical information, the step 202 is entered; if the FDB table information of a certain IP node does not include the non-self physical information, step 203 is entered.
Step 202: and acquiring a logical link between the IP node and another corresponding IP node in the non-self physical information.
Step 203: and establishing links to be checked between the IP node and other IP nodes according to the STP table information and the routing table information.
As can be seen from the above description, the method for acquiring a network topology in a hybrid network according to the embodiment of the present invention improves the efficiency of distinguishing a link to be checked from a logical link, thereby further improving the accuracy and reliability of acquiring a network topology structure in a hybrid network.
In a specific embodiment, the present invention further provides a specific embodiment of steps C01 and C02 before step 300 in the method for acquiring a network topology in a hybrid network, referring to fig. 8, where the steps C01 and C02 specifically include the following:
step C01: if an isolated point still exists in the IP node, judging whether the isolated point is a physical historical path device of another IP node;
if yes, go to step C02; otherwise, go directly to step 300.
Step C02: and generating the link to be checked of the isolated point.
As can be seen from the above description, the method for acquiring a network topology in a hybrid network according to the embodiment of the present invention further improves the accuracy and reliability of acquiring a network topology structure in a hybrid network by acquiring a link to be checked of an orphan node.
To further explain the scheme, the present invention further provides an application example of the method for acquiring a network topology in a hybrid network, which specifically includes the following contents:
1. active IP in the target network is discovered by Ping.
2. And judging whether the target IP supports the SNMP protocol or not by using GET sysoid operation through the SNMP protocol.
3. Attempting to acquire information provided by each protocol supported by the target SNMP device:
a) an interface table;
b) an FDB table;
c) ARP table;
d) STP table;
e) a CDP table;
f) NDP table;
g) LL DP table;
h) a routing table;
4. after all the IP in the network are scanned, all the network equipment is uniformly calculated according to all the protocol information, and as many links as possible are generated:
a) the FDB table is accumulated.
i. We reduce the data lost due to FDB table timeouts by finding, multiple acquisitions, and accumulating the data acquired each time.
b) Supplementing FDB table according to ARP table
ARP is also a cache table but the cache time is much longer than the FDB, and the ARP table may contain data that should be present in the FDB table.
c) According to the FDB table, if a port of one network device contains the MAC of another network.
i. Then there must be a logical link between the two devices.
Excluding whether it is a logical link by a proximity device calculation method (method described in the paper of bell lab 2000).
if not, creating a link to be examined.
d) And calculating the link to be checked according to the STP table.
e) And calculating links to be checked among Cisco devices according to the CDP table.
f) And calculating links to be checked among the Huawei devices according to the NDP table.
g) According to the LL DP table, the link to be checked between LL DP supporting devices is calculated.
h) And calculating the link to be checked between the three layers of equipment according to the routing table.
i) And calculating a link of the orphan device, wherein the orphan device does not contain the MAC address of any other network device, and the other network devices do not contain the MAC address of the device.
i. And searching whether the MAC address of the terminal equipment exists or not, and generating a link to be checked through the isolated point equipment and other network equipment.
5. Excluding the logical link in the link to be checked as much as possible:
a) checking a 3-point loop;
b) checking a multipoint loop;
c) and 4, checking the 4-point full-connection link.
As can be seen from the above description, the system for acquiring a network topology in a hybrid network provided in the application example of the present invention calculates as many links to be checked as possible using multiple protocols, and eliminates as many logical links in the links to be checked as possible according to a scene, so as to acquire a network topology structure in the hybrid network, where the acquisition process is fast and reliable, and the accuracy of the acquired network topology structure in the hybrid network is effectively improved.
An embodiment of the present invention provides a specific implementation manner of a system for acquiring a network topology in a hybrid network, which is capable of implementing all steps in the method for acquiring a network topology in a hybrid network, and referring to fig. 9, the system for acquiring a network topology in a hybrid network specifically includes the following contents:
a communication protocol information collecting unit 10, configured to collect communication protocol information corresponding to each IP node in an active state in a target hybrid network, where the communication protocol information includes: interface table information, forwarding database FDB table information, spanning tree protocol STP table information, and routing table information.
A link obtaining unit 20, configured to obtain, according to the FDB table information corresponding to each IP node, a logical link corresponding to an IP node that includes non-self physical information, and establish, according to the STP table information and the routing table information, a link to be checked corresponding to an IP node that does not include non-self physical information.
And the link to be checked screening unit 30 is configured to screen links, which are the same as the network addresses of the existing logical links, from all the links to be checked, and convert the remaining links to be checked into logical links.
A network topology obtaining unit 40, configured to obtain a network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node.
The embodiment of the system for acquiring a network topology in a hybrid network provided by the present invention may be specifically used for executing the processing procedure of the embodiment of the method for acquiring a network topology in a hybrid network, and the functions of the system are not described herein again, and refer to the detailed description of the embodiment of the method.
As can be seen from the above description, the system for acquiring a network topology in a hybrid network according to the embodiment of the present invention can acquire a network topology structure in a hybrid network, and the acquisition process is fast and reliable, so that the accuracy of the acquired network topology structure in the hybrid network is effectively improved.
An embodiment of the present invention provides a specific implementation manner of an electronic device, which is capable of implementing all steps in the method for acquiring a network topology in a hybrid network, and referring to fig. 10, the electronic device specifically includes the following contents:
a processor (processor)601, a memory (memory)602, a communication interface (communications interface)603, and a bus 604;
the processor 601, the memory 602 and the communication interface 603 complete mutual communication through the bus 604; the communication interface 603 is used for realizing information transmission between related devices such as acquisition of each IP node and a communication protocol;
the processor 601 is configured to call the computer program in the memory 602, and the processor implements all the steps in the first embodiment when executing the computer program, for example, the processor implements the following steps when executing the computer program:
step 100: collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network, wherein the communication protocol information comprises: interface table information, forwarding database FDB table information, spanning tree protocol STP table information, and routing table information.
Step 200: and according to the STP table information and the routing table information, establishing a link to be checked corresponding to the IP node which does not comprise the non-self physical information.
Step 300: and screening out links with the same network address as the existing logical link from all the links to be checked, and converting the rest links to be checked into the logical links.
Step 400: and acquiring the network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node.
As can be seen from the above description, the electronic device provided in the embodiment of the present invention can acquire the network topology in the hybrid network, the acquisition process is fast and reliable, and the accuracy of the acquired network topology in the hybrid network is effectively improved.
An embodiment of the fourth embodiment of the present invention provides a specific implementation manner of a computer-readable storage medium, which is capable of implementing all the steps of the above method for acquiring a network topology in a hybrid network, where the computer-readable storage medium stores a computer program, and the computer program implements all the steps of the above first embodiment when being executed by a processor, for example, the processor implements the following steps when executing the computer program:
step 100: collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network, wherein the communication protocol information comprises: interface table information, forwarding database FDB table information, spanning tree protocol STP table information, and routing table information.
Step 200: and according to the STP table information and the routing table information, establishing a link to be checked corresponding to the IP node which does not comprise the non-self physical information.
Step 300: and screening out links with the same network address as the existing logical link from all the links to be checked, and converting the rest links to be checked into the logical links.
Step 400: and acquiring the network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node.
As can be seen from the above description, the computer-readable storage medium provided in the embodiments of the present invention can acquire a network topology structure in a hybrid network, and the acquisition process is fast and reliable, so as to effectively improve the accuracy of the acquired network topology structure in the hybrid network.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above examples are only for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for acquiring network topology in a hybrid network is characterized in that the method comprises the following steps:
collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network, wherein the communication protocol information comprises: interface table information, forwarding database FDB table information, spanning tree protocol STP table information and routing table information;
acquiring a logical link corresponding to the IP node which comprises non-self physical information according to the FDB table information corresponding to each IP node, and establishing a link to be checked corresponding to the IP node which does not comprise the non-self physical information according to the STP table information and the routing table information;
screening links with the same network address as the existing logical link from all links to be checked, and converting the rest links to be checked into the logical link;
acquiring network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node;
the acquiring a logical link corresponding to an IP node including non-self physical information according to the FDB table information corresponding to each IP node, and establishing a link to be checked corresponding to the IP node not including the non-self physical information according to the STP table information and the routing table information comprises the following steps:
sequentially judging whether the FDB table information corresponding to each IP node comprises non-self physical information or not;
if the FDB table information of a certain IP node comprises non-self physical information, acquiring a logical link between the IP node and another corresponding IP node in the non-self physical information;
and if the FDB table information of one IP node does not contain non-self physical information, establishing links to be checked between the IP node and other IP nodes according to the STP table information and the routing table information.
2. The obtaining method according to claim 1, wherein after the obtaining of the logical link corresponding to the IP node including the non-self physical information according to the FDB table information corresponding to each IP node, and the establishing of the link to be checked corresponding to the IP node not including the non-self physical information according to the STP table information and the routing table information, the obtaining method further comprises:
judging whether the communication protocol information corresponding to each IP node which does not include the non-self physical information also includes link discovery protocol information;
if so, establishing a link to be checked corresponding to the IP node not comprising the non-self physical information according to the link discovery protocol information in the IP node not comprising the non-self physical information;
wherein the link discovery protocol information includes Cisco discovery protocol CDP table information, neighbor discovery protocol NDP table information, and link layer discovery protocol LL DP table information.
3. The method according to claim 1, wherein before the acquiring communication protocol information corresponding to each IP node in an active state in the target hybrid network, the method further comprises:
searching and obtaining an IP node in an active state in the target hybrid network according to a network diagnosis tool;
and screening out the IP nodes supporting the network management protocol from all the IP nodes in the active state to obtain all the IP nodes which support the network management and are in the active state.
4. The method according to claim 1, wherein the collecting includes collecting communication protocol information corresponding to each IP node in an active state in the target hybrid network, where the communication protocol information includes: interface table information, FDB table information, STP table information and routing table information; the method comprises the following steps:
collecting communication protocol information corresponding to each IP node in an active state in a target hybrid network for multiple times, wherein the communication protocol information comprises: interface table information, FDB table information, STP table information and routing table information;
and carrying out information accumulation processing on a plurality of pieces of FDB table information corresponding to each IP node acquired for a plurality of times.
5. The method of claim 4, wherein the communication protocol information further comprises: ARP table information;
correspondingly, after the information accumulation processing is performed on the multiple pieces of FDB table information corresponding to each IP node acquired multiple times, the acquiring method further includes:
and performing information supplement processing on the FDB table information which is subjected to information accumulation processing and corresponds to each IP node according to the ARP table information corresponding to each IP node.
6. The method according to claim 1, wherein before the screening out the links with the same network address as the logical link from all the links to be checked, the method further comprises:
if an isolated point still exists in the IP node, judging whether the isolated point is a physical historical path device of another IP node;
if yes, generating the link to be checked of the isolated point.
7. An acquisition system of a network topology in a hybrid network, the acquisition system comprising:
a communication protocol information acquisition unit, configured to acquire communication protocol information corresponding to each IP node in an active state in a target hybrid network, where the communication protocol information includes: interface table information, forwarding database FDB table information, spanning tree protocol STP table information and routing table information;
a link obtaining unit, configured to obtain a logical link corresponding to an IP node that includes non-self physical information according to the FDB table information corresponding to each IP node, and establish a link to be checked corresponding to an IP node that does not include non-self physical information according to the STP table information and the routing table information;
the link screening unit to be checked is used for screening links which are the same as the network address of the existing logical link from all the links to be checked and converting the rest links to be checked into the logical link;
a network topology obtaining unit, configured to obtain a network topology in the target hybrid network according to all the logical links and the interface table information of each corresponding IP node;
the link obtaining unit is further configured to:
sequentially judging whether the FDB table information corresponding to each IP node comprises non-self physical information or not;
if the FDB table information of a certain IP node comprises non-self physical information, acquiring a logical link between the IP node and another corresponding IP node in the non-self physical information;
and if the FDB table information of one IP node does not contain non-self physical information, establishing links to be checked between the IP node and other IP nodes according to the STP table information and the routing table information.
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 method for acquiring a network topology in a hybrid network according to any one of claims 1 to 6 when executing the program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for obtaining a network topology in a hybrid network according to any one of claims 1 to 6.
CN201710973282.7A 2017-10-18 2017-10-18 Method, system, device and storage medium for acquiring network topology in hybrid network Active CN107733713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710973282.7A CN107733713B (en) 2017-10-18 2017-10-18 Method, system, device and storage medium for acquiring network topology in hybrid network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710973282.7A CN107733713B (en) 2017-10-18 2017-10-18 Method, system, device and storage medium for acquiring network topology in hybrid network

Publications (2)

Publication Number Publication Date
CN107733713A CN107733713A (en) 2018-02-23
CN107733713B true CN107733713B (en) 2020-07-14

Family

ID=61211933

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710973282.7A Active CN107733713B (en) 2017-10-18 2017-10-18 Method, system, device and storage medium for acquiring network topology in hybrid network

Country Status (1)

Country Link
CN (1) CN107733713B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110247784B (en) * 2018-03-07 2023-09-26 北京京东尚科信息技术有限公司 Method and device for determining network topology structure
CN112583627A (en) * 2019-09-30 2021-03-30 杭州海康威视数字技术股份有限公司 Networking topology structure display method and device
CN110830290B (en) * 2019-10-28 2022-06-24 华为技术有限公司 Network topology generation method and server
CN111130881B (en) * 2019-12-25 2022-11-01 杭州迪普科技股份有限公司 Network topology discovery method and device
CN112671588B (en) * 2020-12-30 2023-10-17 普联国际有限公司 Network topology generation method, device, medium and network control equipment
CN113542127B (en) * 2021-06-10 2023-07-14 新华三大数据技术有限公司 Single VXLAN topology searching method and device for non-role VTEP node

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756189A (en) * 2004-09-30 2006-04-05 北京航空航天大学 IP network topology discovering method based on SNMP
CN101640610A (en) * 2009-09-02 2010-02-03 中兴通讯股份有限公司 Method and system for automatic discovery of Ethernet link
CN102130737A (en) * 2010-01-15 2011-07-20 华为技术有限公司 Method and device for acquiring network topology
CN102523136A (en) * 2011-12-22 2012-06-27 东南大学 Wireless sensor network data link layer protocol test method and system
CN103765835A (en) * 2011-08-30 2014-04-30 高通股份有限公司 Topology discovery in a hybrid network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090040946A1 (en) * 2007-08-06 2009-02-12 Archer Charles J Executing an Allgather Operation on a Parallel Computer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756189A (en) * 2004-09-30 2006-04-05 北京航空航天大学 IP network topology discovering method based on SNMP
CN101640610A (en) * 2009-09-02 2010-02-03 中兴通讯股份有限公司 Method and system for automatic discovery of Ethernet link
CN102130737A (en) * 2010-01-15 2011-07-20 华为技术有限公司 Method and device for acquiring network topology
CN103765835A (en) * 2011-08-30 2014-04-30 高通股份有限公司 Topology discovery in a hybrid network
CN102523136A (en) * 2011-12-22 2012-06-27 东南大学 Wireless sensor network data link layer protocol test method and system

Also Published As

Publication number Publication date
CN107733713A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
CN107733713B (en) Method, system, device and storage medium for acquiring network topology in hybrid network
US7957364B2 (en) Determining network paths
CN102801567B (en) Method for automatically discovering hierarchical network topology and method for establishing hierarchical network topology
EP2951953A1 (en) Method of managing zigbee network in the internet of things
CN108206792B (en) Topological structure discovery method and device of switch
US11509552B2 (en) Application aware device monitoring correlation and visualization
CN101873229B (en) Network topology discover method and device based on SNMP (Simple Network Management Protocol)
US20140317313A1 (en) Nat sub-topology management server
CN113452561B (en) Topology generation method, device, equipment and readable storage medium
CN112822053B (en) SNMP-based link layer network topology structure discovery method and system
CN104579978A (en) Link-layer topology discovery method for dynamic network
US11032124B1 (en) Application aware device monitoring
CN116545861A (en) Network topology graph generation method, device and equipment
US20040215781A1 (en) Techniques for determining device connectivity in a network using protocol-specific connectivity information
JP2021191007A (en) Network topology discovery method, network topology discovery device, and network topology discovery system
CN114666227B (en) Network topology detection method under non-cooperative condition
CN116260726A (en) Topology discovery method, device, terminal and storage medium
CN102075364B (en) Method and equipment for determining direct link
CN117176639B (en) Multi-protocol-based network topology automatic discovery method and device
Zhou et al. Discovery algorithm for network topology based on SNMP
Ma et al. An algorithm of physical network topology discovery in multi-VLANs
WO2007061404A2 (en) Network topology mapper
Zhang An optimization algorithm of network topology discovery based on SNMP protocol
CN104639373B (en) Port-mark acquisition methods and device
Castellanos et al. Performance analysis of home network topology discovery protocols

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