CN116319362B - Network topology graph generation method - Google Patents

Network topology graph generation method Download PDF

Info

Publication number
CN116319362B
CN116319362B CN202310519403.6A CN202310519403A CN116319362B CN 116319362 B CN116319362 B CN 116319362B CN 202310519403 A CN202310519403 A CN 202310519403A CN 116319362 B CN116319362 B CN 116319362B
Authority
CN
China
Prior art keywords
switch
equipment
router
level
devices
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
CN202310519403.6A
Other languages
Chinese (zh)
Other versions
CN116319362A (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.)
Hunan Tianguan Electronic Information Technology Co ltd
Original Assignee
Hunan Tianguan Electronic 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 Hunan Tianguan Electronic Information Technology Co ltd filed Critical Hunan Tianguan Electronic Information Technology Co ltd
Priority to CN202310519403.6A priority Critical patent/CN116319362B/en
Publication of CN116319362A publication Critical patent/CN116319362A/en
Application granted granted Critical
Publication of CN116319362B publication Critical patent/CN116319362B/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 embodiment of the disclosure provides a network topology graph generation method, which belongs to the technical field of communication and specifically comprises the following steps: defining a boundary range of a network topology; setting basic configuration requirements of devices within a network topology boundary; when the target network meets the boundary range and basic configuration requirements, acquiring and storing connection relation information among all devices in the target network; setting a discovery capability rule of the equipment adjacent relation; determining the uplink and downlink relation of each device in the topology according to a preset uplink and downlink judging rule; the computing device generates a network topology graph at a top level node in the topology. According to the scheme, the algorithm of hierarchical computation and root node self-election after network topology links are discovered and generated among network devices is realized by utilizing a preset protocol, the nodes of actual outlet devices and the layers of all devices in the network in the topology graph are comprehensively calculated according to the conditions of the device types, the product models, the connection relation, the physical port characteristics and the like, and the generation accuracy and the automation capability are improved.

Description

Network topology graph generation method
Technical Field
The embodiment of the disclosure relates to the technical field of communication, in particular to a network topology graph generation method.
Background
The network equipment management software is mainly realized based on standard network management protocols such as snmp and tr069 and is used for remotely maintaining network communication equipment working at two layers or three layers at the back end, wherein the acquisition of the connection relation between adjacent switches can be completed through a standard link layer discovery protocol lldp, a relatively visual network topology graph is formed, the equipment is convenient to view and rapidly position, the equipment discovery capability of the equipment working at three layers is required to be enhanced, and an excellent network management software is required to accurately and completely embody the topology graph and node information of all managed equipment in the network.
It can be seen that an automatic and highly accurate network topology generation method is needed.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a network topology graph generating method, which at least partially solves the problems of poor automation and accuracy of generation in the prior art.
The embodiment of the disclosure provides a network topology graph generation method, which comprises the following steps:
step 1, defining a boundary range of network topology;
step 2, setting basic configuration requirements of equipment in a network topology boundary;
step 3, when the target network meets the boundary range and basic configuration requirements, acquiring and storing connection relation information among all devices in the target network;
Step 4, setting a discovery capability rule of the equipment adjacent relation;
step 5, determining the uplink and downlink relation of each device in the topology according to the connection relation information, the discovery capability rule and the preset uplink and downlink judgment rule;
step 6, combining the top-level nodes of the uplink and downlink relation computing equipment in the topology to generate a network topology graph;
the step 6 specifically includes:
step 6.1, monitoring or actively acquiring preset protocol data in the network management message of the equipment, then taking out the last message data of the equipment from the memory database and comparing the last message data with the current data message, if the last message data of the equipment are the same with the current data message, not triggering the change of the topology map of the network, otherwise, storing the current message in the memory database for preparing the execution of the subsequent flow;
step 6.2, using the device which triggers the topology change at present as an entry for discovering the topology, recursively traversing all the nodes of the detectable devices on the links of the entry according to the connection relation, and then calculating the upper and lower relation between the nodes and the adjacent nodes;
step 6.3, obtaining the corresponding equipment type through the equipment model information of the node, and calculating the terminal of the topological graph, or matching the terminal of the topological graph through a model comparison information table in a background server;
Step 6.4, obtaining the corresponding equipment serial numbers through the equipment mac information of the nodes, wherein mac addresses of all equipment of the detectable links are required to be unique;
step 6.5, calculating the upper and lower relationship between adjacent devices through the steps, automatically increasing the number of times that the device is selected as the lower level of a certain adjacent device once in the calculation process, wherein the initial value is 0, recording a comparison relationship table between the device and the adjacent upper level for each device, and recording basic information and preset protocol information of each device at the same time;
step 6.6, comparing and calculating the least times of selecting as the lower level in all discovered devices within the network topology boundary range, wherein the device corresponding to the times can be judged as the top-level device, and a plurality of top-level devices are allowed to be discovered in the network topology;
step 6.7, starting from each top-level device in sequence, recursively searching all the devices connected with the top-level device according to the comparison relation table recorded before and adjacent to the top-level device, and forming a topological link diagram;
step 6.8, in the process of calculating the topological link diagram from a certain top-level device, the level of the top-level device is 1, one level is added when the next-level device is found in a recursion mode, and when a certain device has a plurality of upper levels, only a large level result value in the calculation process is taken;
Step 6.9, in the topological link diagram calculated from different top-level devices, comparing the level values in the topological link results of the devices, and taking only small level result values as actual level results of the devices in the current network topology;
step 6.10, when the adjacent relation of the devices is extremely individual and the network topology of the top-level devices cannot be accurately calculated, temporarily electing one top-level node to generate a topological link diagram, recording a special mark in the topological link diagram, and reminding or warning a user by using the application of the topological link diagram according to the existence of the mark to require manual confirmation of at least one top-level device;
and 6.11, executing the steps according to the calculation process, wherein all links, nodes, layers and top-level devices in the network topology are automatically generated and completed, so as to form a network topology graph.
According to a specific implementation of an embodiment of the disclosure, the boundary range includes that a start node in the upstream device is an outlet device with at least one detectable top layer, and an end node in the downstream device is a network communication device without other downstream devices.
According to a specific implementation of an embodiment of the present disclosure, the basic configuration requirements include:
The devices in the network topology boundary are network communication devices working in two layers or three layers;
network equipment in the network topology boundary needs to support at least one interface for reporting the detection result of the adjacent node in an active or passive mode;
no MAC collision situation within the network topology boundary;
devices within the network topology boundary are capable of initiating a network request to a terminal providing node aggregation and topology computation services;
the device supports the function of discovering neighbor node information.
According to a specific implementation manner of the embodiment of the present disclosure, the step of obtaining connection relationship information between devices in a target network includes:
and acquiring the adjacent relation connection information of the equipment in a TR069 network management system message interaction mode, wherein the adjacent relation connection information comprises an interface identifier, an MAC address, a model and an interface IP address of the local equipment, and interface identifiers, MAC addresses, model, equipment types, interface IP addresses and VLAN numbers of one to a plurality of pieces of equipment at the opposite end.
According to a specific implementation of an embodiment of the disclosure, the discovery capability rule includes:
the equipment meets the basic configuration requirement;
when the devices in the topology support a preset protocol, only one device closest to the device can be found in a certain link where the device is located;
When a plurality of devices supporting the preset protocol are indirectly connected through one or more switches not supporting the preset protocol, the devices supporting the preset protocol can mutually discover and exchange information, and the intermediate switch can only be identified as a switch device node with unknown information;
when the equipment supporting the preset protocol is directly connected to the WAN port of the router of which the opposite end does not support the preset protocol, the equipment connected under the LAN port of the router of the opposite end and the equipment supporting the preset protocol cannot mutually discover and exchange information;
when the equipment supporting the preset protocol is directly connected to the LAN port of the router which does not support the preset protocol at the opposite end, the equipment supporting the preset protocol can only mutually discover and exchange information with the nearest layer of equipment supporting the preset protocol in each link under the LAN port of the router at the opposite end, and the directly connected router can only be identified as a router equipment node of unknown information;
when the equipment supporting the preset protocol is directly connected to the switch of which the opposite end supports the preset protocol, the two parties can mutually discover and exchange protocol information, and the protocol information can not be mutually discovered and exchanged with other equipment in the current link;
when the equipment supporting the preset protocol is directly connected to the WAN port of the router supporting the preset protocol at the opposite end, the two parties can mutually find and exchange protocol information, but cannot mutually find and exchange protocol information with the equipment in all links below the LAN port of the opposite end router;
When the device supporting the preset protocol is directly connected to the LAN port of the router supporting the preset protocol at the opposite end, the two parties can mutually find and exchange protocol information, and the device supporting the preset protocol can also mutually find and exchange protocol information with the nearest layer of devices supporting the preset protocol in each link under the LAN port.
According to a specific implementation manner of the embodiment of the present disclosure, the uplink and downlink judging rule includes:
when the protocol message data of the two parties of the equipment have node information of the other party equipment, judging that the two parties have a connection relationship;
the connection relation comprises two modes of direct connection and indirect connection, wherein the direct connection means that no other equipment exists in the middle of a link of two devices, and the indirect connection comprises the series connection of switches which do not support a preset protocol through the middle of the link and the series connection of LAN ports through any router equipment in the middle;
the indirectly connected device discovers one to N neighbors under the port of the indirectly connected link, wherein N is a positive integer;
the equipment connection condition which is judged to be free of connection relation comprises that the routers are directly connected with a LAN port by using a LAN, the APs are directly connected with a LAN port by using a LAN, the routers are directly connected with the APs by using the LAN port by using a WAN, the routers are directly connected with a WAN port by using a WAN, the APs are directly connected with a WAN port by using a WAN, and the routers are directly connected with the APs by using the WAN and the WAN port by using a WAN;
The WAN port of the current router B is directly connected with the LAN port of the router A, wherein A is the upper level of B;
the WAN port of the current router B is indirectly connected with the LAN port of the router A through a switch which does not support a preset protocol, wherein A is the upper level of B;
the WAN port of the current router B is directly connected with the LAN port of the AP equipment, and A is the upper level of B;
the WAN port of the current router B is directly connected with a switch A, wherein A is the upper level of B;
the WAN port of the current router B is indirectly connected with a switch A through a switch which does not support a preset protocol, wherein A is the upper level of B;
the WAN port of the current router B is connected with the opposite router a, and the LAN port of a is connected with a plurality of devices, which determines the result: a is the upper level of B; the lower part of the LAN port of A is directly connected with a switch C, and A is the upper stage of C; the LAN port of A is indirectly connected with a router D through a switch which does not support a preset protocol, A is the upper level of D, A is B, C, D upper level equipment, A, B, C, D are neighbors of each other, and E is not in the processing range;
when the current router B, the switch C, the router D and the switch E are indirectly connected through router equipment which does not support a preset protocol, the B, C, D, E does not judge the upper and lower relationships, but are neighbors of each other;
when the current router B, the switch C, the router D and the switch E realize indirect connection through the switch equipment which does not support the preset protocol, the B, C, D, E do not judge the lower relationship, but are neighbors of each other;
When the current switch B is directly connected with the switch A and the switch B is not connected with other equipment, the switch A is the upper stage of the switch B;
the current switch B is indirectly connected with the switch A through a LAN port of the router device D, and the switch C is indirectly connected with the LAN port of the switch D through a switch which does not support a preset protocol in the middle, so that the switch D is a superior stage of A, B, C;
the current switch B is indirectly connected with the switch A through a LAN port of a router D which does not support a preset protocol, the switch C is connected with the LAN port of the router D through a switch which does not support the preset protocol in the middle, A, B, C does not judge the upper-lower relationship and A, B, C are neighbors;
the current switch B is indirectly connected with the switch A through a LAN port of the switch D which does not support a preset protocol, the switch C is indirectly connected with the switch D through a switch which does not support the preset protocol in the middle, A, B, C does not judge the upper-lower relationship and A, B, C are neighbors;
the current switch B is directly connected with the switch device D, the switch A is indirectly connected with the switch D through a switch which does not support a preset protocol in the middle, the switch C is indirectly connected with the switch D through a switch which does not support the preset protocol in the middle, and A, B, C has no adjacent relation;
when at least one of A, B, C is connected with the router, the rule calculation of the router part is synthesized, and the upper and lower relationship between adjacent devices of other routers is obtained;
When A, B, C is not connected to other routers, finding a three-layer core switch according to the device model in A, B, C, if yes, taking the three-layer core switch as the upper level of the other two switches, if the last step is not finished, continuing to find the three-layer core switch according to the device model in other devices adjacent to A, B, C, if yes, taking the core switch as the upper level of a certain device sent by the other devices adjacent to the core switch, otherwise, not calculating the level of A, B, C;
when two ports are directly connected between the current switch B and the switch A, reading LACP configuration of the two switches in the network management system, judging whether the two switches belong to link aggregation, if so, judging that the two switches are in an effective adjacent relation, and otherwise, not processing the two switches.
The network topology graph generation scheme in the embodiment of the disclosure comprises the following steps: step 1, defining a boundary range of network topology; step 2, setting basic configuration requirements of equipment in a network topology boundary; step 3, when the target network meets the boundary range and basic configuration requirements, acquiring and storing connection relation information among all devices in the target network; step 4, setting a discovery capability rule of the equipment adjacent relation; step 5, determining the uplink and downlink relation of each device in the topology according to the connection relation information, the discovery capability rule and the preset uplink and downlink judgment rule; step 6, combining the top-level nodes of the uplink and downlink relation computing equipment in the topology to generate a network topology graph; the step 6 specifically includes: step 6.1, monitoring or actively acquiring preset protocol data in the network management message of the equipment, then taking out the last message data of the equipment from the memory database and comparing the last message data with the current data message, if the last message data of the equipment are the same with the current data message, not triggering the change of the topology map of the network, otherwise, storing the current message in the memory database for preparing the execution of the subsequent flow; step 6.2, using the device which triggers the topology change at present as an entry for discovering the topology, recursively traversing all the nodes of the detectable devices on the links of the entry according to the connection relation, and then calculating the upper and lower relation between the nodes and the adjacent nodes; step 6.3, obtaining the corresponding equipment type through the equipment model information of the node, and calculating the terminal of the topological graph, or matching the terminal of the topological graph through a model comparison information table in a background server; step 6.4, obtaining the corresponding equipment serial numbers through the equipment mac information of the nodes, wherein mac addresses of all equipment of the detectable links are required to be unique; step 6.5, calculating the upper and lower relationship between adjacent devices through the steps, automatically increasing the number of times that the device is selected as the lower level of a certain adjacent device once in the calculation process, wherein the initial value is 0, recording a comparison relationship table between the device and the adjacent upper level for each device, and recording basic information and preset protocol information of each device at the same time; step 6.6, comparing and calculating the least times of selecting as the lower level in all discovered devices within the network topology boundary range, wherein the device corresponding to the times can be judged as the top-level device, and a plurality of top-level devices are allowed to be discovered in the network topology; step 6.7, starting from each top-level device in sequence, recursively searching all the devices connected with the top-level device according to the comparison relation table recorded before and adjacent to the top-level device, and forming a topological link diagram; step 6.8, in the process of calculating the topological link diagram from a certain top-level device, the level of the top-level device is 1, one level is added when the next-level device is found in a recursion mode, and when a certain device has a plurality of upper levels, only a large level result value in the calculation process is taken; step 6.9, in the topological link diagram calculated from different top-level devices, comparing the level values in the topological link results of the devices, and taking only small level result values as actual level results of the devices in the current network topology; step 6.10, when the adjacent relation of the devices is extremely individual and the network topology of the top-level devices cannot be accurately calculated, temporarily electing one top-level node to generate a topological link diagram, recording a special mark in the topological link diagram, and reminding or warning a user by using the application of the topological link diagram according to the existence of the mark to require manual confirmation of at least one top-level device; and 6.11, executing the steps according to the calculation process, wherein all links, nodes, layers and top-level devices in the network topology are automatically generated and completed, so as to form a network topology graph.
The beneficial effects of the embodiment of the disclosure are that: according to the scheme, the network topology link discovery method and device based on the network topology link discovery algorithm, the network topology link discovery algorithm and the network topology link discovery algorithm are utilized to achieve the hierarchical calculation and root node self-selection algorithm after network devices are mutually discovered and generate network topology links, nodes of actual outlet devices in a topological graph and levels of all devices in the network are calculated comprehensively according to conditions such as device types, product models, connection relations and physical port characteristics, and therefore generation accuracy and automation capability are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a flow chart of a network topology graph generating method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a device connection situation that is not determined to be a connection relationship according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of direct connection between a wan port of a current router B and a lan port of a router a according to an embodiment of the present disclosure;
Fig. 4 is a schematic diagram of indirect connection between a wan port of a current router B and a lan port of a router a through a non-NTTDP switch, provided in an embodiment of the present disclosure;
fig. 5 is a schematic diagram of direct connection between a wan port of a current router B and a lan port of an AP device according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of direct connection between a wan port of a current router B and a switch a according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of indirect connection between a WAN port of a current router B and a switch a through a non-NTTDP switch according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of a situation determination result provided in the embodiment of the present disclosure, in which a wan port of a current router B is connected to an opposite router a, and a plurality of devices are connected under a lan port of a;
fig. 9 is a schematic diagram of indirect connection between a current router B, a switch C, a router D, and a switch E through a non-NTTDP router device according to an embodiment of the present disclosure;
fig. 10 is a schematic diagram illustrating indirect connection between a current router B, a switch C, a router D, and a switch E through a non-NTTDP switch device according to an embodiment of the present disclosure;
fig. 11 is a schematic diagram of a current switch B directly connected to a switch a, where B is not connected to other devices according to an embodiment of the present disclosure;
Fig. 12 is a schematic diagram of an indirect connection between a current switch B and a switch a through a LAN port of a router device D, and an indirect connection between a switch C and a LAN port of D through an intermediate non-NTTDP switch, provided in an embodiment of the present disclosure;
fig. 13 is a schematic diagram of a connection between a current switch B and a switch a via a LAN port of a non-NTTDP router (AP) D, and a switch C via an intermediate non-NTTDP switch and a LAN port of D, provided in an embodiment of the present disclosure;
fig. 14 is a schematic diagram of indirect connection between a current switch B and a switch a through a LAN port of a non-NTTDP switch D, and between a switch C and a switch D through an intermediate non-NTTDP switch provided in an embodiment of the present disclosure;
fig. 15 is a schematic diagram of direct connection between a current switch B and a switch device D, where a switch a is indirectly connected to D through an intermediate non-NTTDP switch, and a switch C is indirectly connected to D through an intermediate non-NTTDP switch;
fig. 16 is a schematic diagram of direct connection between two ports between a current switch B and a switch a according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a network topology graph generation method which can be applied to a network equipment management process.
Referring to fig. 1, a flow chart of a network topology generating method according to an embodiment of the present disclosure is shown. As shown in fig. 1, the method mainly comprises the following steps:
step 1, defining a boundary range of network topology;
optionally, the boundary range includes that the initial node in the connected device is an exit device with at least one detectable top layer, and the end node in the connected device is a network communication device without other connected devices.
In particular, the boundary range definition of the network topology may be that the initial node in the upstream device is a detectable top-level exit device, at least one exists, and the end node in the downstream device is a network communication device without other downstream devices, and the device type is unlimited.
Step 2, setting basic configuration requirements of equipment in a network topology boundary;
Optionally, the basic configuration requirement includes:
the devices in the network topology boundary are network communication devices working in two layers or three layers;
network equipment in the network topology boundary needs to support at least one interface for reporting the detection result of the adjacent node in an active or passive mode;
no MAC collision situation within the network topology boundary;
devices within the network topology boundary are capable of initiating a network request to a terminal providing node aggregation and topology computation services;
the device supports the function of discovering neighbor node information.
In particular, the basic configuration of devices within the network topology boundary to meet the requirements of the present algorithm may include: the network communication device which is required to work in two layers or three layers, the network device needs to support at least one interface for reporting the detection result of the adjacent node in an active or passive mode, the condition that no MAC conflict is allowed in the network topology boundary, the device in the network topology boundary can initiate a network request to a terminal providing node summarizing and topology calculating service, and the device supports the function of discovering the information of the adjacent node, as described in the following content specification and examples in the point D.
Step 3, when the target network meets the boundary range and basic configuration requirements, acquiring and storing connection relation information among all devices in the target network;
Further, the step of obtaining connection relationship information between devices in the target network includes:
and acquiring the adjacent relation connection information of the equipment in a TR069 network management system message interaction mode, wherein the adjacent relation connection information comprises an interface identifier, an MAC address, a model and an interface IP address of the local equipment, and interface identifiers, MAC addresses, model, equipment types, interface IP addresses and VLAN numbers of one to a plurality of pieces of equipment at the opposite end.
When the target network meets the boundary range and basic configuration requirements, connection relation information among devices in the target network can be obtained and stored, and the specific steps include, but are not limited to, obtaining adjacent relation connection information of the devices by using a TR069 network management system message interaction mode, wherein the information is generated by active reporting of the device side.
Content specification:
interface identification, MAC address, model and interface IP address (optional) of the local terminal equipment
Interface identification, MAC address, model, equipment type (optional), interface IP address (optional), VLAN number (optional) of one to more equipment at opposite end
Content example:
{ "ProductClass": "home end model", "MAC": "home end MAC", "primary IP": "home end interface IP", "portEvents": [ { "name": "home end interface identifier", "unknowDev": opposite end device type "," list ": [ ] }, {" name ": home end interface identifier", "unknowDev": opposite end device type "," list ": [ {" ProductClass ": opposite end model", "MAC": opposite end MAC "," IP ": opposite end interface IP", "port": opposite end interface identifier "," VLAN ": opposite end interface VLAN number } ] };
The network management server is used as a service terminal for providing summarization and calculation, and the collected information is stored in a hard disk directory, a file or a cache record marked by using the unique identification of the equipment on the ACS of the TR069 network management server, and the method is effective for a long time.
Step 4, setting a discovery capability rule of the equipment adjacent relation;
on the basis of the above embodiment, the discovery capability rule includes:
the equipment meets the basic configuration requirement;
when the devices in the topology support a preset protocol, only one device closest to the device can be found in a certain link where the device is located;
when a plurality of devices supporting the preset protocol are indirectly connected through one or more switches not supporting the preset protocol, the devices supporting the preset protocol can mutually discover and exchange information, and the intermediate switch can only be identified as a switch device node with unknown information;
when the equipment supporting the preset protocol is directly connected to the WAN port of the router of which the opposite end does not support the preset protocol, the equipment connected under the LAN port of the router of the opposite end and the equipment supporting the preset protocol cannot mutually discover and exchange information;
when the equipment supporting the preset protocol is directly connected to the LAN port of the router which does not support the preset protocol at the opposite end, the equipment supporting the preset protocol can only mutually discover and exchange information with the nearest layer of equipment supporting the preset protocol in each link under the LAN port of the router at the opposite end, and the directly connected router can only be identified as a router equipment node of unknown information;
When the equipment supporting the preset protocol is directly connected to the switch of which the opposite end supports the preset protocol, the two parties can mutually discover and exchange protocol information, and the protocol information can not be mutually discovered and exchanged with other equipment in the current link;
when the equipment supporting the preset protocol is directly connected to the WAN port of the router supporting the preset protocol at the opposite end, the two parties can mutually find and exchange protocol information, but cannot mutually find and exchange protocol information with the equipment in all links below the LAN port of the opposite end router;
when the device supporting the preset protocol is directly connected to the LAN port of the router supporting the preset protocol at the opposite end, the two parties can mutually find and exchange protocol information, and the device supporting the preset protocol can also mutually find and exchange protocol information with the nearest layer of devices supporting the preset protocol in each link under the LAN port.
In a specific implementation, the preset protocol may be a three-layer network device discovery protocol NTTDP, where network communication devices supporting NTTDP are defined as CPEs, routers or APs not supporting NTTDP protocol are defined as non-NTTDP routers (APs), and switches not supporting NTTDP protocol are defined as non-NTTDP switches.
The requirements for discovery capability that may set the proximity relationship of the devices include:
The equipment meets the basic configuration of the algorithm requirement and is the same as the content of the C point, wherein a system for realizing the local landing is realized by adopting self-grinding NTTDP protocol of I;
when the devices in the topology support NTTDP protocol, the CPE only finds one device nearest to the CPE in a certain link where the CPE is located;
when a plurality of CPEs are indirectly connected through one or more switches which do not support the NTTDP protocol, the plurality of CPEs can find each other and exchange information, and the intermediate switch can only be identified as a switch equipment node with unknown information;
when the CPE is directly connected to a WAN port of a router (AP) which does not support the NTTDP protocol at the opposite end, the equipment connected under the LAN port of the router (AP) at the opposite end and the CPE cannot mutually discover and exchange information, and the situation is the only inapplicable to the current algorithm;
when the CPE is directly connected to the LAN port of a router (AP) which does not support the NTTDP protocol at the opposite end, the CPE can only discover and exchange information with a layer of equipment which supports the NTTDP protocol and is nearest to the CPE in each link under the LAN port of the router (AP) at the opposite end, and the directly connected router (AP) can only be identified as a router equipment node of unknown information;
When the CPE is directly connected to the exchange supporting NTTDP protocol, the two parties can mutually find and exchange NTTDP information, and can not mutually find and exchange NTTDP information with other devices in the current link
When the CPE is directly connected to the WAN port of a router (AP) supporting the NTTDP protocol at the opposite end, the CPE and the WAN port can mutually discover and exchange NTTDP information, but can not mutually discover and exchange NTTDP information with devices in all links under the LAN port of the opposite end router (AP);
when the CPE is directly connected to the LAN port of a router (AP) supporting the NTTDP protocol at the opposite end, the two parties can mutually find and exchange NTTDP information, and the CPE can also mutually find and exchange NTTDP information with a layer of equipment supporting the NTTDP protocol nearest to the CPE in each link under the LAN port.
Step 5, determining the uplink and downlink relation of each device in the topology according to the connection relation information, the discovery capability rule and the preset uplink and downlink judgment rule;
further, the uplink and downlink judging rule includes:
when the protocol message data of the two parties of the equipment have node information of the other party equipment, judging that the two parties have a connection relationship;
the connection relation comprises two modes of direct connection and indirect connection, wherein the direct connection means that no other equipment exists in the middle of a link of two devices, and the indirect connection comprises the series connection of switches which do not support a preset protocol through the middle of the link and the series connection of LAN ports through any router equipment in the middle;
The indirectly connected device discovers one to N neighbors under the port of the indirectly connected link, wherein N is a positive integer;
the equipment connection condition which is judged to be free of connection relation comprises that the routers are directly connected with a LAN port by using a LAN, the APs are directly connected with a LAN port by using a LAN, the routers are directly connected with the APs by using the LAN port by using a WAN, the routers are directly connected with a WAN port by using a WAN, the APs are directly connected with a WAN port by using a WAN, and the routers are directly connected with the APs by using the WAN and the WAN port by using a WAN;
the WAN port of the current router B is directly connected with the LAN port of the router A, wherein A is the upper level of B;
the WAN port of the current router B is indirectly connected with the LAN port of the router A through a switch which does not support a preset protocol, wherein A is the upper level of B;
the WAN port of the current router B is directly connected with the LAN port of the AP equipment, and A is the upper level of B;
the WAN port of the current router B is directly connected with a switch A, wherein A is the upper level of B;
the WAN port of the current router B is indirectly connected with a switch A through a switch which does not support a preset protocol, wherein A is the upper level of B;
the WAN port of the current router B is connected with the opposite router a, and the LAN port of a is connected with a plurality of devices, which determines the result: a is the upper level of B; the lower part of the LAN port of A is directly connected with a switch C, and A is the upper stage of C; the LAN port of A is indirectly connected with a router D through a switch which does not support a preset protocol, A is the upper level of D, A is B, C, D upper level equipment, A, B, C, D are neighbors of each other, and E is not in the processing range;
When the current router B, the switch C, the router D and the switch E are indirectly connected through router equipment which does not support a preset protocol, the B, C, D, E does not judge the upper and lower relationships, but are neighbors of each other;
when the current router B, the switch C, the router D and the switch E realize indirect connection through the switch equipment which does not support the preset protocol, the B, C, D, E do not judge the lower relationship, but are neighbors of each other;
when the current switch B is directly connected with the switch A and the switch B is not connected with other equipment, the switch A is the upper stage of the switch B;
the current switch B is indirectly connected with the switch A through a LAN port of the router device D, and the switch C is indirectly connected with the LAN port of the switch D through a switch which does not support a preset protocol in the middle, so that the switch D is a superior stage of A, B, C;
the current switch B is indirectly connected with the switch A through a LAN port of a router D which does not support a preset protocol, the switch C is connected with the LAN port of the router D through a switch which does not support the preset protocol in the middle, A, B, C does not judge the upper-lower relationship and A, B, C are neighbors;
the current switch B is indirectly connected with the switch A through a LAN port of the switch D which does not support a preset protocol, the switch C is indirectly connected with the switch D through a switch which does not support the preset protocol in the middle, A, B, C does not judge the upper-lower relationship and A, B, C are neighbors;
The current switch B is directly connected with the switch device D, the switch A is indirectly connected with the switch D through a switch which does not support a preset protocol in the middle, the switch C is indirectly connected with the switch D through a switch which does not support the preset protocol in the middle, and A, B, C has no adjacent relation;
when at least one of A, B, C is connected with the router, the rule calculation of the router part is synthesized, and the upper and lower relationship between adjacent devices of other routers is obtained;
when A, B, C is not connected to other routers, finding a three-layer core switch according to the device model in A, B, C, if yes, taking the three-layer core switch as the upper level of the other two switches, if the last step is not finished, continuing to find the three-layer core switch according to the device model in other devices adjacent to A, B, C, if yes, taking the core switch as the upper level of a certain device sent by the other devices adjacent to the core switch, otherwise, not calculating the level of A, B, C;
when two ports are directly connected between the current switch B and the switch A, reading LACP configuration of the two switches in the network management system, judging whether the two switches belong to link aggregation, if so, judging that the two switches are in an effective adjacent relation, and otherwise, not processing the two switches.
In specific implementation, the uplink and downlink relation of each device in the topology can be determined according to a preset uplink and downlink judgment rule, and the specific steps are as follows:
f1. The connection relationship between the two parties can be judged only when node information of the opposite party equipment exists in NTTDP message data of the two parties. The connection relation between the two devices is determined according to whether the NTTDP message data is detected or not and the NTTDP information of the devices exchanged to the other party, if so, the connection relation between the devices is determined
f2. The connection relation is divided into two modes of direct connection and indirect connection, wherein the direct connection is the condition that no other device exists in the middle of a link of two devices, and the indirect connection is divided into two conditions of serial connection through a non-NTTDP switch in the middle of the link and serial connection through a LAN port of an arbitrary router (AP) device in the middle
f3. Indirectly connected devices will find one or more neighbors on their own ports that access the indirectly connected link
f4. Device connection status not determined as connection relationship: the routers are directly connected with an lan and an lan port, the routers are directly connected with wan and wan ports, the routers are directly connected with wan and wan ports, and the routers are directly connected with an wan and wan ports. As shown in fig. 2 (a), (b), (c), (d), (e) and (f).
f5. As shown in fig. 3, when the wan port of the current router B is directly connected to the lan port of the router a, a is the upper level of B.
f6. As shown in fig. 4, the wan port of the current router B is indirectly connected to the lan port of the router a through a non-NTTDP switch, and a is the upper level of B.
f7. As shown in fig. 5, the wan port of the current router B is directly connected to the lan port of the AP device, and a is the upper level of B.
f8. As shown in fig. 6, the wan port of the current router B is directly connected to the switch a, and a is the upper level of B.
f9. As shown in fig. 7, the WAN port of the current router B is indirectly connected to the switch a through a non-NTTDP switch, and a is the upper level of B.
f10. As shown in fig. 8, the wan port of the current router B is connected to the correspondent router a, and the lan port of a is connected to a plurality of devices: a is the upper level of B; a switch C is directly connected below the lan port of A, and A is the upper stage of C; the lower part of the lan port of A is indirectly connected with a router D through a non-nttdp switch, and A is the upper level of D; a is a higher-level device B, C, D, A, B, C, D are neighbors of each other, and E is not within the processing range.
f11. As shown in fig. 9, when the current routers B, C, D, and E are indirectly connected through the non-NTTDP router (AP) device, the B, C, D, E does not determine the upper-lower relationship, but are neighbors of each other.
f12. As shown in fig. 10, when the current routers B, C, D, and E are indirectly connected through the non-NTTDP switch device, the B, C, D, E are not in a lower relationship, but are neighbors of each other.
The network topology level decision process and conditions of the ap are the same as those of the router.
f14. As shown in fig. 11, when the current switch B is directly connected to the switch a and the switch B is not connected to other devices, the switch a is the upper stage of the switch B.
f15. As shown in fig. 12, when the current switch B is indirectly connected to the switch a through the LAN port of the router (AP) device D and the switch C is indirectly connected to the LAN port of the D through the intermediate non-NTTDP switch, D is the upper stage of A, B, C.
f16. As shown in fig. 13, the current switch B is indirectly connected to the switch a through the LAN port of the non-NTTDP router (AP) D, the switch C is connected to the LAN port of D through the intermediate non-NTTDP switch, A, B, C does not determine the upper-lower relationship and A, B, C are neighbors of each other.
f17. As shown in fig. 14, the current switch B is indirectly connected to the switch a through the LAN port of the non-NTTDP switch D, the switch C is indirectly connected to the switch D through the intermediate non-NTTDP switch, and A, B, C does not determine the upper-lower relationship and A, B, C are neighbors of each other.
f18. As shown in fig. 15, the current switch B is directly connected to the switch device D, the switch a is indirectly connected to D through an intermediate non-NTTDP switch, the switch C is indirectly connected to D through an intermediate non-NTTDP switch, there is no adjacent relationship between A, B, C, and A, B, C may be the upper level of each other, and needs to be determined according to specific situations.
f19. In the first two enumerated connection relationships, when at least one of A, B, C is connected to a router (AP), the rule calculation of the router portion is integrated, and the upper-lower relationship between adjacent devices of other routers (APs) is obtained.
f20. In the first two enumerated connections, when none of A, B, C is connected to other routers (APs): firstly, a three-layer core switch is found according to the equipment model in A, B, C, and if the three-layer core switch is the upper level of the other two switches; if the previous step is not finished, the three-layer core switch is found in other equipment adjacent to A, B, C according to the equipment model, and if the three-layer core switch is found, the core switch sends a higher level of a certain equipment to the equipment adjacent to the core switch. In other cases, the hierarchy of A, B, C is not computed.
f21. As shown in fig. 16, two ports between the current switch B and the switch a are both directly connected, and the LACP configuration of the two switches in the network management system is read to determine whether the network management system belongs to link aggregation. If so, judging that the adjacent relation is valid, otherwise, not processing.
Step 6, combining the top-level nodes of the uplink and downlink relation computing equipment in the topology to generate a network topology graph;
the step 6 specifically includes:
Step 6.1, monitoring or actively acquiring preset protocol data in the network management message of the equipment, then taking out the last message data of the equipment from the memory database and comparing the last message data with the current data message, if the last message data of the equipment are the same with the current data message, not triggering the change of the topology map of the network, otherwise, storing the current message in the memory database for preparing the execution of the subsequent flow;
step 6.2, using the device which triggers the topology change at present as an entry for discovering the topology, recursively traversing all the nodes of the detectable devices on the links of the entry according to the connection relation, and then calculating the upper and lower relation between the nodes and the adjacent nodes;
step 6.3, obtaining the corresponding equipment type through the equipment model information of the node, and calculating the terminal of the topological graph, or matching the terminal of the topological graph through a model comparison information table in a background server;
step 6.4, obtaining the corresponding equipment serial numbers through the equipment mac information of the nodes, wherein mac addresses of all equipment of the detectable links are required to be unique;
step 6.5, calculating the upper and lower relationship between adjacent devices through the steps, automatically increasing the number of times that the device is selected as the lower level of a certain adjacent device once in the calculation process, wherein the initial value is 0, recording a comparison relationship table between the device and the adjacent upper level for each device, and recording basic information and preset protocol information of each device at the same time;
Step 6.6, comparing and calculating the least times of selecting as the lower level in all discovered devices within the network topology boundary range, wherein the device corresponding to the times can be judged as the top-level device, and a plurality of top-level devices are allowed to be discovered in the network topology;
step 6.7, starting from each top-level device in sequence, recursively searching all the devices connected with the top-level device according to the comparison relation table recorded before and adjacent to the top-level device, and forming a topological link diagram;
step 6.8, in the process of calculating the topological link diagram from a certain top-level device, the level of the top-level device is 1, one level is added when the next-level device is found in a recursion mode, and when a certain device has a plurality of upper levels, only a large level result value in the calculation process is taken;
step 6.9, in the topological link diagram calculated from different top-level devices, comparing the level values in the topological link results of the devices, and taking only small level result values as actual level results of the devices in the current network topology;
step 6.10, when the adjacent relation of the devices is extremely individual and the network topology of the top-level devices cannot be accurately calculated, temporarily electing one top-level node to generate a topological link diagram, recording a special mark in the topological link diagram, and reminding or warning a user by using the application of the topological link diagram according to the existence of the mark to require manual confirmation of at least one top-level device;
And 6.11, executing the steps according to the calculation process, wherein all links, nodes, layers and top-level devices in the network topology are automatically generated and completed, so as to form a network topology graph.
In specific implementation, the calculation steps of the top-level node of the device in the topology are as follows:
g1. monitoring or actively acquiring NTTDP data in a network management message of the equipment, then taking out the last message data of the equipment from a memory database and comparing the last message data with a current data message, if the last message data is the same with the current data message, not triggering the change of a topology map of the network, otherwise, storing the current message in the memory database to prepare the execution of a subsequent flow
g2. Using the device triggering the topology change at present as a topology discovery entry, recursively traversing nodes of all detectable devices on links of the entry according to the connection relation, then calculating the upper and lower level relation between the nodes and adjacent nodes, wherein each traversed node only participates in the calculation process once, and the topology of the ring network can be calculated without the occurrence of the dead loop problem
g3. The corresponding equipment type can be obtained through the equipment model information of the node, and the optional equipment can be a switch, a router and an AP. The present calculation process does not deal with other types of terminals of non-network communication devices in the topology map. Model comparison information table is stored in terminal or background server for calculating topological graph
g4. The mac information of the node can obtain the corresponding equipment serial number, and the mac addresses of all the equipment of the detectable link are required to be unique.
g5. The upper and lower level relation between adjacent devices is basically calculated through the steps, and most importantly, the number of times that the device is selected as the lower level of a certain adjacent device is automatically increased once in the calculation process, and the initial value is 0. The above steps also record a table of the comparison between each device and the adjacent upper level, and the table may have multiple upper level device information. At the same time, the basic information and NTTDP information of each device are recorded
g6. And comparing the discovered devices within the network topology boundary range to calculate the least times of electing as the lower level, wherein the device corresponding to the times is judged to be the top-level device, and a plurality of top-level devices which are connected with an external network are allowed to be discovered in the network topology.
g7. And sequentially starting from each top-level device, recursively searching all the devices connected with the top-level device according to the comparison relation table recorded before and adjacent to the top-level device, and forming a topological link diagram. The nodes in the link can store the information of the corresponding devices, the level of the nodes in the topology, the connection types between adjacent nodes, the ports used between adjacent nodes, the VLAN used by the adjacent switch nodes, the online state of the corresponding devices of the nodes, and the like
g8. In the process of calculating the topological link map from a certain top-level device, the hierarchy of the top-level device is 1, and the hierarchy is increased by one when the next-level device is found in a recursion mode. When a certain device has multiple upper levels, the level of the device in the current calculation process may be calculated to obtain different results, and in this case, only the larger level result value in the current calculation process is obtained
g9. In the topological link map calculated from different top-level devices, the hierarchy of the downlinked devices may not be consistent, and thus the hierarchy may be rearranged: comparing the hierarchical values in the link results of each topology where the device is located, and taking the smaller hierarchical result value as the actual hierarchical result of the device in the current network topology
g10. When the adjacent relationship of the devices is extremely individual and network topology of the top-level devices cannot be accurately calculated, temporarily electing one top-level node to generate a topology link diagram, recording a special mark in the topology link diagram, and reminding or warning a user according to the mark by using the application of the topology link diagram to require manual confirmation of at least one top-level device
g11. And after the steps are executed according to the calculation process, all links, nodes, layers and top-level devices in the network topology are automatically generated and completed to form a network topology graph.
According to the network topology graph generation method, the hierarchy calculation and the root node self-election algorithm after the network topology links are discovered and generated among the network devices are realized by utilizing the preset protocol, the node of the actual exit device in the topology graph and the hierarchy of each device in the network are calculated according to the conditions of the device type, the product model, the connection relation, the physical port characteristics and the like, and the generation accuracy and the automation capability are improved.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the disclosure are intended to be covered by the protection scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (6)

1. A method for generating a network topology, comprising:
Step 1, defining a boundary range of network topology;
step 2, setting basic configuration requirements of equipment in a network topology boundary;
step 3, when the target network meets the boundary range and basic configuration requirements, acquiring and storing connection relation information among all devices in the target network;
step 4, setting a discovery capability rule of the equipment adjacent relation;
step 5, determining the uplink and downlink relation of each device in the topology according to the connection relation information, the discovery capability rule and the preset uplink and downlink judgment rule;
step 6, combining the top-level nodes of the uplink and downlink relation computing equipment in the topology to generate a network topology graph;
the step 6 specifically includes:
step 6.1, monitoring or actively acquiring preset protocol data in the network management message of the equipment, then taking out the last message data of the equipment from the memory database and comparing the last message data with the current data message, if the last message data of the equipment are the same with the current data message, not triggering the change of the topology map of the network, otherwise, storing the current message in the memory database for preparing the execution of the subsequent flow;
step 6.2, using the device which triggers the topology change at present as an entry for discovering the topology, recursively traversing all the nodes of the detectable devices on the links of the entry according to the connection relation, and then calculating the upper and lower relation between the nodes and the adjacent nodes;
Step 6.3, obtaining the corresponding equipment type through the equipment model information of the node, and calculating the terminal of the topological graph, or matching the terminal of the topological graph through a model comparison information table in a background server;
step 6.4, obtaining the corresponding equipment serial numbers through the equipment mac information of the nodes, wherein mac addresses of all equipment of the detectable links are required to be unique;
step 6.5, calculating the upper and lower relationship between adjacent devices through the steps, automatically increasing the number of times that the device is selected as the lower level of a certain adjacent device once in the calculation process, wherein the initial value is 0, recording a comparison relationship table between the device and the adjacent upper level for each device, and recording basic information and preset protocol information of each device at the same time;
step 6.6, comparing the discovered devices within the network topology boundary range to calculate the least times of election as the lower level, wherein the device corresponding to the times can be judged as the top-level device, and a plurality of top-level devices can be discovered in the network topology;
step 6.7, starting from each top-level device in sequence, recursively searching all the devices connected with the top-level device according to the comparison relation table recorded before and adjacent to the top-level device, and forming a topological link diagram;
Step 6.8, in the process of calculating the topological link diagram from a certain top-level device, the level of the top-level device is 1, one level is added when the next-level device is found in a recursion mode, and when a certain device has a plurality of upper levels, only a large level result value in the calculation process is taken;
step 6.9, in the topological link diagram calculated from different top-level devices, comparing the level values in the topological link results of the devices, and taking only small level result values as actual level results of the devices in the current network topology;
step 6.10, when the adjacent relation of the devices is extremely individual and the network topology of the top-level devices cannot be accurately calculated, temporarily electing one top-level node to generate a topological link diagram, recording a special mark in the topological link diagram, and reminding or warning a user by using the application of the topological link diagram according to the existence of the mark to require manual confirmation of at least one top-level device;
and 6.11, executing the steps according to the calculation process, wherein all links, nodes, layers and top-level devices in the network topology are automatically generated and completed, so as to form a network topology graph.
2. The method of claim 1, wherein the boundary range includes an egress device where the originating node in the upstream device is at least one top level detectable and an end node in the downstream device is a network communication device without other downstream devices.
3. The method of claim 2, wherein the basic configuration requirements include:
the devices in the network topology boundary are network communication devices working in two layers or three layers;
network equipment in the network topology boundary needs to support at least one interface for reporting the detection result of the adjacent node in an active or passive mode;
no MAC collision situation within the network topology boundary;
devices within the network topology boundary are capable of initiating a network request to a terminal providing node aggregation and topology computation services;
the device supports the function of discovering neighbor node information.
4. The method of claim 3, wherein the step of obtaining connection relationship information between devices in the target network comprises:
and acquiring the adjacent relation connection information of the equipment in a TR069 network management system message interaction mode, wherein the adjacent relation connection information comprises an interface identifier, an MAC address, a model and an interface IP address of the local equipment, and interface identifiers, MAC addresses, model, equipment types, interface IP addresses and VLAN numbers of one to a plurality of pieces of equipment at the opposite end.
5. The method of claim 4, wherein the discovery capability rule comprises:
The equipment meets the basic configuration requirement;
when the devices in the topology support a preset protocol, only one device closest to the device can be found in a certain link where the device is located;
when a plurality of devices supporting the preset protocol are indirectly connected through one or more switches not supporting the preset protocol, the devices supporting the preset protocol can mutually discover and exchange information, and the intermediate switch can only be identified as a switch device node with unknown information;
when the equipment supporting the preset protocol is directly connected to the WAN port of the router of which the opposite end does not support the preset protocol, the equipment connected under the LAN port of the router of the opposite end and the equipment supporting the preset protocol cannot mutually discover and exchange information;
when the equipment supporting the preset protocol is directly connected to the LAN port of the router which does not support the preset protocol at the opposite end, the equipment supporting the preset protocol can only mutually discover and exchange information with the nearest layer of equipment supporting the preset protocol in each link under the LAN port of the router at the opposite end, and the directly connected router can only be identified as a router equipment node of unknown information;
when the equipment supporting the preset protocol is directly connected to the switch of which the opposite end supports the preset protocol, the two parties can mutually discover and exchange protocol information, and the protocol information can not be mutually discovered and exchanged with other equipment in the current link;
When the equipment supporting the preset protocol is directly connected to the WAN port of the router supporting the preset protocol at the opposite end, the two parties can mutually find and exchange protocol information, but cannot mutually find and exchange protocol information with the equipment in all links below the LAN port of the opposite end router;
when the device supporting the preset protocol is directly connected to the LAN port of the router supporting the preset protocol at the opposite end, the two parties can mutually find and exchange protocol information, and the device supporting the preset protocol can also mutually find and exchange protocol information with the nearest layer of devices supporting the preset protocol in each link under the LAN port.
6. The method of claim 5, wherein the uplink and downlink determination rule comprises:
when the protocol message data of the two parties of the equipment have node information of the other party equipment, judging that the two parties have a connection relationship;
the connection relation comprises two modes of direct connection and indirect connection, wherein the direct connection means that no other equipment exists in the middle of a link of two devices, and the indirect connection comprises the series connection of switches which do not support a preset protocol through the middle of the link and the series connection of LAN ports through any router equipment in the middle;
the indirectly connected device discovers one to N neighbors under the port of the indirectly connected link, wherein N is a positive integer;
The equipment connection condition which is judged to be free of connection relation comprises that the routers are directly connected with a LAN port by using a LAN, the APs are directly connected with a LAN port by using a LAN, the routers are directly connected with the APs by using the LAN port by using a WAN, the routers are directly connected with a WAN port by using a WAN, the APs are directly connected with a WAN port by using a WAN, and the routers are directly connected with the APs by using the WAN and the WAN port by using a WAN;
the WAN port of the current router B is directly connected with the LAN port of the router A, wherein A is the upper level of B;
the WAN port of the current router B is indirectly connected with the LAN port of the router A through a switch which does not support a preset protocol, wherein A is the upper level of B;
the WAN port of the current router B is directly connected with the LAN port of the AP equipment, and the AP equipment is the upper level of the router B;
the WAN port of the current router B is directly connected with a switch A, wherein A is the upper level of B;
the WAN port of the current router B is indirectly connected with a switch A through a switch which does not support a preset protocol, wherein A is the upper level of B;
the WAN port of the current router B is connected with the opposite router a, and the LAN port of a is connected with a plurality of devices, which determines the result: a is the upper level of B; the lower part of the LAN port of A is directly connected with a switch C, and A is the upper stage of C; the LAN port of A is indirectly connected with a router D through a switch which does not support a preset protocol, wherein A is the upper level of D, then A is the upper level equipment of B, C, D, and A, B, C, D are neighbors of each other;
When the current router B, the switch C, the router D and the switch E are indirectly connected through router equipment which does not support a preset protocol, the B, C, D, E does not judge the upper and lower relationships, but are neighbors of each other;
when the current router B, the switch C, the router D and the switch E realize indirect connection through the switch equipment which does not support the preset protocol, the B, C, D, E do not judge the lower relationship, but are neighbors of each other;
when the current switch B is directly connected with the switch A and the switch B is not connected with other equipment, the switch A is the upper stage of the switch B;
the current switch B is indirectly connected with the switch A through a LAN port of the router device D, and the switch C is indirectly connected with the LAN port of the switch D through a switch which does not support a preset protocol in the middle, so that the switch D is a superior stage of A, B, C;
the current switch B is indirectly connected with the switch A through a LAN port of a router D which does not support a preset protocol, the switch C is connected with the LAN port of the router D through a switch which does not support the preset protocol in the middle, A, B, C does not judge the upper-lower relationship and A, B, C are neighbors;
the current switch B is indirectly connected with the switch A through a LAN port of the switch D which does not support a preset protocol, the switch C is indirectly connected with the switch D through a switch which does not support the preset protocol in the middle, A, B, C does not judge the upper-lower relationship and A, B, C are neighbors;
The current switch B is directly connected with the switch device D, the switch A is indirectly connected with the switch D through a switch which does not support a preset protocol in the middle, the switch C is indirectly connected with the switch D through a switch which does not support the preset protocol in the middle, and A, B, C has no adjacent relation;
when at least one of the switches A, B, C is connected with the router, the rule calculation of the router part is synthesized, and the upper and lower level relation between adjacent devices of other routers is obtained;
when the switch A, B, C is not connected to other routers, judging whether three layers of core switches exist in A, B, C according to the equipment model, if so, taking the three layers of core switches as the upper stages of the other two switches, if not completed in the last step, continuing to judge whether the three layers of core switches exist in other independent adjacent equipment of A, B, C according to the equipment model, if so, taking the adjacent switches of the core switches as the upper stages of the other two switches, and otherwise, not calculating the level of A, B, C;
when two ports are directly connected between the current switch B and the switch A, reading LACP configuration of the two switches in the network management system, judging whether the two switches belong to link aggregation, if so, judging that the two switches are in an effective adjacent relation, and otherwise, not processing the two switches.
CN202310519403.6A 2023-05-10 2023-05-10 Network topology graph generation method Active CN116319362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310519403.6A CN116319362B (en) 2023-05-10 2023-05-10 Network topology graph generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310519403.6A CN116319362B (en) 2023-05-10 2023-05-10 Network topology graph generation method

Publications (2)

Publication Number Publication Date
CN116319362A CN116319362A (en) 2023-06-23
CN116319362B true CN116319362B (en) 2023-07-28

Family

ID=86790819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310519403.6A Active CN116319362B (en) 2023-05-10 2023-05-10 Network topology graph generation method

Country Status (1)

Country Link
CN (1) CN116319362B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118075032B (en) * 2024-04-19 2024-07-19 湖南天冠电子信息技术有限公司 Virtual local area network security risk prediction method based on artificial intelligence

Citations (11)

* 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
CN102404159A (en) * 2011-12-30 2012-04-04 南京邮电大学 Method for discovering cognitive network topology based on event triggering
US8873431B1 (en) * 2010-04-08 2014-10-28 Adtran, Inc. Communications system and method for maintaining topology in a VLAN environment
CN106571967A (en) * 2016-11-09 2017-04-19 上海斐讯数据通信技术有限公司 Multi-level network topology management method and device
CN107294745A (en) * 2016-03-30 2017-10-24 中国移动通信集团四川有限公司 Automatic topology discovery method and device
CN107634842A (en) * 2016-07-18 2018-01-26 阿里巴巴集团控股有限公司 Method for discovering network topology and device
CN108282362A (en) * 2017-12-29 2018-07-13 武汉璞华大数据技术有限公司 A kind of network topology generation method, device and equipment
CN110855464A (en) * 2018-08-21 2020-02-28 国网天津市电力公司 Network topology structure adjusting method and device
CN112217555A (en) * 2020-08-24 2021-01-12 成都天奥集团有限公司 Formation satellite routing method based on SDN architecture and adopting SR routing protocol
US11088937B1 (en) * 2014-05-08 2021-08-10 Google Llc System and method for synchronized route update
CN115695204A (en) * 2022-10-09 2023-02-03 湖南天冠电子信息技术有限公司 Method, system and storage medium for automatically discovering network equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2672763A1 (en) * 2006-12-20 2008-06-26 Telefonaktiebolaget L M Ericsson (Publ) Method for discovering the physical topology of a telecommunications network
US9973390B2 (en) * 2015-05-08 2018-05-15 Fixstream Networks Inc. Method of discovering network topology
US10320619B2 (en) * 2016-11-12 2019-06-11 Solana Networks Inc. Method and system for discovery and mapping of a network topology
US10848416B2 (en) * 2017-10-17 2020-11-24 Juniper Networks, Inc. Reduced configuration for multi-stage network fabrics

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8873431B1 (en) * 2010-04-08 2014-10-28 Adtran, Inc. Communications system and method for maintaining topology in a VLAN environment
CN102143007A (en) * 2011-05-03 2011-08-03 中国南方电网有限责任公司 Distribution-based hierarchical network topology discovery method
CN102404159A (en) * 2011-12-30 2012-04-04 南京邮电大学 Method for discovering cognitive network topology based on event triggering
US11088937B1 (en) * 2014-05-08 2021-08-10 Google Llc System and method for synchronized route update
CN107294745A (en) * 2016-03-30 2017-10-24 中国移动通信集团四川有限公司 Automatic topology discovery method and device
CN107634842A (en) * 2016-07-18 2018-01-26 阿里巴巴集团控股有限公司 Method for discovering network topology and device
CN106571967A (en) * 2016-11-09 2017-04-19 上海斐讯数据通信技术有限公司 Multi-level network topology management method and device
CN108282362A (en) * 2017-12-29 2018-07-13 武汉璞华大数据技术有限公司 A kind of network topology generation method, device and equipment
CN110855464A (en) * 2018-08-21 2020-02-28 国网天津市电力公司 Network topology structure adjusting method and device
CN112217555A (en) * 2020-08-24 2021-01-12 成都天奥集团有限公司 Formation satellite routing method based on SDN architecture and adopting SR routing protocol
CN115695204A (en) * 2022-10-09 2023-02-03 湖南天冠电子信息技术有限公司 Method, system and storage medium for automatically discovering network equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
快速园区网拓扑发现方法;李晓歌;王辉;张宾;秦董洪;;应用科学学报(06);122-131 *

Also Published As

Publication number Publication date
CN116319362A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
KR102480708B1 (en) Fault root cause determining method and apparatus, and computer storage medium
KR100878109B1 (en) Topology discovery by partitioning multiple discovery techniques
KR100793530B1 (en) Using link state information to discover ip network topology
CN102801567B (en) Method for automatically discovering hierarchical network topology and method for establishing hierarchical network topology
JP6193473B2 (en) Computer-implemented method, computer program product and computer
US7200122B2 (en) Using link state information to discover IP network topology
US7292541B1 (en) Methods and systems for unnumbered network link discovery
CN116319362B (en) Network topology graph generation method
US20060256733A1 (en) Methods and devices for discovering the topology of large multi-subnet LANs
CN107104824A (en) A kind of network topology determines method and apparatus
CN111934921A (en) Network topology discovery method and device, equipment and storage medium
CN101304333A (en) Method for establishing network topology in network management system
CN110932906A (en) Data center network topology structure discovery method based on SNMP technology and topology structure discovery system thereof
CN116545861A (en) Network topology graph generation method, device and equipment
CN113542015A (en) Method for automatically drawing network physical link
CN113612646B (en) Neighborhood network topology visualization method based on neighbor discovery
CN104579979A (en) Network topology discovery method based on MAC information
CN110730093B (en) Metropolitan area network topology mapping method and device
CN114666227B (en) Network topology detection method under non-cooperative condition
US11595292B2 (en) Dynamic node cluster discovery in an unknown topology graph
CN102075364B (en) Method and equipment for determining direct link
TW202320515A (en) Loop detection method and loop cancellation method for mesh network
Andreev et al. An algorithm for building an enterprise network topology using widespread data sources
Zhang et al. A physical topology discovery method based on AFTs of down constraint.
TWI788154B (en) Topology path obtaining method of mesh network and system thereof

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