CN117527596A - Multi-level network topology automatic discovery method and device - Google Patents

Multi-level network topology automatic discovery method and device Download PDF

Info

Publication number
CN117527596A
CN117527596A CN202311659908.9A CN202311659908A CN117527596A CN 117527596 A CN117527596 A CN 117527596A CN 202311659908 A CN202311659908 A CN 202311659908A CN 117527596 A CN117527596 A CN 117527596A
Authority
CN
China
Prior art keywords
equipment
address
information
network
topology
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.)
Pending
Application number
CN202311659908.9A
Other languages
Chinese (zh)
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.)
709th Research Institute of CSSC
Original Assignee
709th Research Institute of CSSC
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 709th Research Institute of CSSC filed Critical 709th Research Institute of CSSC
Priority to CN202311659908.9A priority Critical patent/CN117527596A/en
Publication of CN117527596A publication Critical patent/CN117527596A/en
Pending legal-status Critical Current

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
    • 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/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/695Types of network addresses using masks or ranges of addresses

Landscapes

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

Abstract

The invention relates to the technical field of network communication, and provides a method and a device for automatically discovering multi-level network topology. The invention marks the initial network equipment as seed equipment by determining the initial IP address of the initial network equipment, and automatically discovers multi-level network topology information of the seed equipment according to the initial IP address; and performing flooding expansion type search according to the multi-level network topology information of the seed equipment to generate multi-level network topology. Because the invention starts from the initial network equipment and collects the multi-level network topology information of each network equipment in a flooding expansion mode based on the flooding expansion algorithm, the invention has higher automatic discovery efficiency, does not need to continuously perform ping detection, inquiry and communication network equipment in a given network segment range, is convenient for discovering the link relation among the network equipment crossing the network segments (namely generating heterogeneous network topology), and can discover other deep data information related to the network equipment.

Description

Multi-level network topology automatic discovery method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for automatically discovering a multi-level network topology.
Background
The network topology, namely the physical structure hierarchy and connection relation of the networking network, can assist in network management, performance analysis and network fault location.
In order to better manage and maintain a network, a network administrator is often required to discover information about network structure, network device connection relationships, and performance status. Automatically discovering the network topology, namely automatically searching and discovering the physical structure of the current networking network at a network management end; based on the automatically discovered relationship data of the network topology, basic hierarchical, structural and state information of the network can be displayed on a human-computer interface in an intuitive graphical image mode. The network topology automatic discovery improves the efficiency and accuracy of network management, helps a network administrator to better know and manage the network, greatly reduces the workload of manually collecting and arranging network information, and improves the working efficiency. And the change and the fault in the network can be found in time, a network manager is reminded to process, and the fault response and the processing efficiency are improved. In addition, through automatically discovering the network topology, the connection relation and state information of the network equipment can be better known, and management work such as network planning and capacity planning can be facilitated.
In the network topology discovery method in the prior art, ping (testing whether internet connection is successful) is continuously performed to detect and inquire network equipment connected in a given network segment range, so that data information of related network equipment is acquired and acquired to acquire a link relation between the network equipment, and finally a topology relation diagram of networking network equipment is generated. The useless IP detection in this process is much and the support for network device discovery across segments is poor, resulting in low auto discovery efficiency. And generally, only a topological relation diagram of a network device layer can be generated, and other deep data information related to the network device cannot be found.
In view of this, overcoming the drawbacks of the prior art is a problem to be solved in the art.
Disclosure of Invention
The invention aims to provide a method and a device for automatically discovering a multi-level network topology, which can realize efficient and rapid automatic discovery of a multi-level network topology structure, acquire and identify attribute, structure and level information of a network in a deep level, and solve the problems that the automatic discovery efficiency is low and other deep-level data information related to network equipment cannot be discovered in the automatic discovery process in the prior art.
The invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for automatically discovering a multi-level network topology, including:
determining an initial IP address of initial network equipment, and marking the initial network equipment as seed equipment;
automatically discovering multi-level network topology information of the seed equipment according to the initial IP address;
and performing flooding expansion type search according to the multi-level network topology information of the seed equipment to generate multi-level network topology.
Further, the performing the flooding expansion search according to the multi-level network topology information of the seed device, and generating the multi-level network topology includes:
judging whether opposite-end neighbor equipment exists in the seed equipment according to the link layer topology in the multi-level network topology information; when the opposite-end neighbor equipment exists, the neighbor IP address of the opposite-end neighbor equipment is obtained according to the equipment layer information in the multi-level network topology information;
updating the seed equipment to the opposite-end neighbor equipment; updating the device layer topology and the resource layer topology according to the neighbor IP address, and updating the lower hanging terminal layer topology when the seed device is a two-layer device;
Updating the link layer topology according to the updated device layer topology, the resource layer topology and the underhung terminal layer topology to update the seed device until the seed device does not have opposite-end neighbor devices;
generating a multi-level network topology according to the current equipment layer topology, the current resource layer topology, the current underhung terminal layer topology and the current link layer topology.
Further, the updating the device layer topology according to the neighbor IP address includes:
acquiring system information of the opposite-end neighbor equipment according to the neighbor IP address;
and storing the system information into a node equipment table in a network management information base, and updating the equipment layer topology based on the node equipment table.
Further, the automatically discovering the multi-level network topology information of the seed device according to the initial IP address includes:
obtaining route identification information of the seed equipment according to the initial IP address; when the seed equipment is two-layer equipment, generating a down-hanging terminal layer topology according to the initial IP address;
respectively obtaining system information and resource information of the seed equipment according to the route identification information; generating a device layer topology according to the system information; generating a resource layer topology according to the resource information;
Calculating neighbor equipment information of the seed equipment, and generating a link layer topology according to the neighbor equipment information;
and obtaining multi-level network topology information according to the equipment layer topology, the resource layer topology, the underhung terminal layer topology and the link layer topology.
Further, the routing identification information of the seed equipment is obtained according to the initial IP address; when the seed equipment is two-layer equipment, generating the down-hanging terminal layer topology according to the initial IP address comprises:
acquiring the route identification information based on the initial IP address, and acquiring the route forwarding identification node data of the seed equipment based on a network management information base; when the route forwarding identification node data is not a preset three-layer equipment value, marking the seed equipment as two-layer equipment;
obtaining a terminal IP address of the hanging terminal of the seed equipment according to the initial IP address;
based on a protocol address information base, obtaining address binding data of the hanging terminal according to the IP address of the terminal; based on a forwarding address information base, obtaining interface forwarding address data of the hanging terminal according to the IP address of the terminal; obtaining the information of the down-hanging terminal according to the address binding data and the interface forwarding address data;
And storing the information of the down-hanging terminal into a node terminal table in a network management information base, and generating a topology of the down-hanging terminal layer based on the node terminal table.
Further, the system information and the resource information of the seed equipment are respectively obtained according to the route identification information; generating a device layer topology according to the system information; generating a resource layer topology according to the resource information comprises:
acquiring system information and resource information of the seed equipment according to the route identification information based on a network management information base;
according to the system OID in the system information, matching the equipment information of the seed equipment in a network management information base; storing the equipment information into a node equipment table, and generating equipment layer topology based on the node equipment table;
and storing port resource information, slot resource information, power resource information and fan resource information in the resource information into a node resource table of the network management information base, and generating a resource layer topology based on the node resource table.
Further, the calculating the neighbor device information of the seed device, and generating the link layer topology according to the neighbor device information includes:
Collecting the equipment name and interface data of the seed equipment based on a network management information base; collecting the equipment name and interface data of opposite-end neighbor equipment of the seed equipment based on a network management information base, and taking the equipment name and interface data of the seed equipment and the equipment name and interface data of the opposite-end neighbor equipment as neighbor equipment information;
generating link layer information of the seed equipment according to the neighbor equipment information based on a protocol address information base; and storing the link layer information into a node link table of the network management information base, and generating the link layer topology based on the node link table.
Further, the determining the initial IP address of the initial network device includes:
acquiring an IP address to be judged of the initial network equipment, and judging whether the IP address to be judged is a preset legal IP address or not;
if the IP address is the preset legal IP address, the IP address to be judged is used as an initial IP address;
if the IP address is not the preset legal IP address, the initial IP address of the initial network equipment is automatically detected according to the equipment IP address and mask information of the network management end.
Further, if the initial IP address is not the preset legal IP address, automatically detecting the initial IP address of the initial network device according to the device IP address and mask information of the network management end includes:
Calculating a network management IP range according to the equipment IP address and mask information of the network management end;
and polling the IP address in the network management IP range until the network management end can acquire the system information which is not empty through the IP address, marking the network equipment corresponding to the IP address as initial network equipment, and taking the IP address as the initial IP address.
In a second aspect, the present invention further provides a multi-level network topology automatic discovery device, for implementing the multi-level network topology automatic discovery method according to the first aspect, where the multi-level network topology automatic discovery device includes
At least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, the instructions being executable by the processor to perform the multi-level network topology auto-discovery method of the first aspect.
In a third aspect, the present invention also provides a non-volatile computer storage medium storing computer executable instructions for execution by one or more processors to perform the multi-level network topology auto-discovery method of the first aspect.
Unlike the prior art, the invention has at least the following beneficial effects:
the invention marks the initial network equipment as seed equipment by determining the initial IP address of the initial network equipment, and automatically discovers multi-level network topology information of the seed equipment according to the initial IP address; and performing flooding expansion type search according to the multi-level network topology information of the seed equipment to generate multi-level network topology. Because the invention starts from the initial network equipment and collects the multi-level network topology information of each network equipment in a flooding expansion mode based on the flooding expansion algorithm, the invention has higher automatic discovery efficiency, does not need to continuously perform ping detection, inquiry and communication network equipment in a given network segment range, is convenient for discovering the link relation among the network equipment crossing the network segments (namely generating heterogeneous network topology), and can discover other deep data information related to the network equipment.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an overall flow diagram of a multi-level network topology automatic discovery method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of step 10 according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of step 103 according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of acquiring an initial IP address according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of step 20 according to an embodiment of the present invention;
FIG. 6 is a schematic diagram showing a specific flow of step 201 according to an embodiment of the present invention;
FIG. 7 is a schematic flow chart of step 202 according to an embodiment of the present invention;
FIG. 8 is a schematic flow chart of step 203 according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of discovering multi-layer network topology information based on seed device seed according to an embodiment of the present invention;
FIG. 10 is a schematic flow chart of step 30 according to an embodiment of the present invention;
fig. 11 is a schematic diagram of automatic discovery of a flooding expansion network topology based on seed equipment seed according to an embodiment of the present invention;
fig. 12 is a flowchart of automatic discovery of a flooding expansion network topology based on seed equipment seed according to an embodiment of the present invention;
FIG. 13 is a flow chart of a monitoring task based on network device type policy matching provided by an embodiment of the present invention;
FIG. 14 is a flowchart of a method for performing task distribution monitoring according to an embodiment of the present invention;
fig. 15 is a schematic architecture diagram of a multi-level network topology auto-discovery device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The terms "first," "second," and the like herein are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", etc. may explicitly or implicitly include one or more such feature. In the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
In the present invention, unless explicitly specified and limited otherwise, the term "connected" is to be construed broadly, and for example, "connected" may be either fixedly connected, detachably connected, or integrally formed; can be directly connected or indirectly connected through an intermediate medium. In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
Example 1:
in the network topology discovery method in the prior art, ping detection needs to be continuously performed on network equipment IP within a specified IP network segment range, and if a certain network equipment IP within the IP network segment range can be ping-enabled, network management data information of the network equipment is collected. The method can simply find out network equipment in the network segment range, and further manually acquire the link relation between the network equipment. Although a topology map of the networking network devices can be generated, this approach has limitations:
(1) The automatic discovery is inefficient and not efficient. Because the network equipment which is continuously communicated with the ping detection query is required to be in a given network segment range, the data information of the related network equipment is acquired and acquired to generate a topological relation diagram. This approach is an exhaustive approach, so there is a large number of detections of unwanted network device IP. And because detection is done through exhaustion every time within a given network segment, discovery of network devices across network segments that are capable of communicating is inconvenient.
(2) The network topology has few layers and insufficient integrity. Because the method only queries the communicated network equipment by performing ping detection, only the topological relation diagram of the equipment layer can be obtained. Network administrators often have a need to perform network management according to the discovered network topology, and to implement network management, they also need to acquire data of the network, devices, links, resources, attributes, and terminal layers, and relationships, hierarchies, and resources between them.
In order to solve the above problems, as shown in fig. 1, an embodiment of the present invention provides a method for automatically discovering a multi-level network topology, including:
step 10: an initial IP address of an initial network device is determined, and the initial network device is marked as a seed device.
The embodiment of the invention determines an initial network device as seed device based on a Flood expansion (Flood Fill) algorithm, namely, a starting point of the Flood expansion algorithm, so that the Flood expansion search is performed based on the Flood expansion algorithm from the starting point, and finally, a multi-level network topology comprising a plurality of network devices is generated.
In an alternative embodiment, the marked seed devices may be added to the queue in the form of a queue data structure, so that each time a multi-level network topology of one network device is automatically found, the network device is popped up; and after each time of determining the opposite-end neighbor equipment of the seed equipment, adding the opposite-end neighbor equipment into a queue so as to be used as the seed equipment later.
Step 20: and automatically discovering multi-level network topology information of the seed equipment according to the initial IP address.
The embodiment of the invention automatically discovers multi-level network topology information of each network device; network equipment for continuously carrying out ping detection inquiry communication in a given network segment range is not required; and starting from the seed equipment, obtaining the data information of the related network equipment of the current network equipment by only using the link layer information in the multi-level network topology information of the current network equipment at a time.
Step 30: and performing flooding expansion type search according to the multi-level network topology information of the seed equipment to generate multi-level network topology.
The invention marks the initial network equipment as seed equipment by determining the initial IP address of the initial network equipment, and automatically discovers multi-level network topology information of the seed equipment according to the initial IP address; and performing flooding expansion type search according to the multi-level network topology information of the seed equipment to generate multi-level network topology. Because the invention starts from the initial network equipment and collects the multi-level network topology information of each network equipment in a flooding expansion mode based on the flooding expansion algorithm, the invention has higher automatic discovery efficiency, does not need to continuously perform ping detection, inquiry and communication network equipment in a given network segment range, is convenient for discovering the link relation among the network equipment crossing the network segments (namely generating heterogeneous network topology), and can discover other deep data information related to the network equipment.
As shown in fig. 2, in step 10, the determining an initial IP address of an initial network device includes:
step 101: and acquiring the IP address to be judged of the initial network equipment, and judging whether the IP address to be judged is a preset legal IP address or not.
The IP address to be judged is an IP address obtained by a mode of user input; when the IP address input by the user cannot be acquired, the IP address to be judged is empty and does not accord with the preset legal IP range. The decision rule for presetting the legal IP address is selected by those skilled in the art according to specific network configuration and requirements, and is not limited herein. In an alternative embodiment, the determination rule of the preset legal IP address is determined according to the device IP address and the mask information of the network management end.
Step 102: and if the IP address is the preset legal IP address, taking the IP address to be judged as an initial IP address.
Step 103: if the IP address is not the preset legal IP address, the initial IP address of the initial network equipment is automatically detected according to the equipment IP address and mask information of the network management end.
When a preset legal IP address cannot be given, an initial IP address which accords with the judging rule is automatically detected.
To automatically probe the initial IP address, as shown in fig. 3, the step 103 includes:
step 1031: and calculating the network management IP range according to the equipment IP address and the mask information of the network management end.
In an alternative embodiment, the network management end performs data collection on the network device based on a simple network management protocol (Simple Network Management Protocol, abbreviated as SNMP) interface, so that it is necessary to determine the network management IP address.
Step 1032: and polling the IP address in the network management IP range until the network management end can acquire the system information which is not empty through the IP address, marking the network equipment corresponding to the IP address as initial network equipment, marking the network equipment as initial network equipment, and taking the IP address as the initial IP address.
When the network management end is based on the SNMP protocol, in order to select an initial IP address, polling the IP address in the network management IP range, acquiring SNMP system information, and when the SNMP system information can be acquired (i.e. the SNMP system information is not empty), determining the corresponding network equipment as seed equipment and marking. The order of polling is selected by one skilled in the art according to the specific use scenario, and is not limited herein.
As shown in fig. 4, when an IP address to be determined, which is a preset legal IP address, can be obtained, the IP address to be determined is directly used as an initial IP address, and the initial network device is used as a seed device; when an initial network equipment IP address cannot be given correctly, determining a network management IP range according to the equipment IP address and mask information of the network management end, polling the IP address in the network management IP range, taking the network equipment which can acquire SNMP system information of the IP address by the first network management end in distress as seed equipment and storing, taking the IP address as the initial IP address, and exiting polling.
In order to automatically discover multi-level network topology information of the seed device, as shown in fig. 5, the step 20 includes:
step 201: obtaining route identification information of the seed equipment according to the initial IP address; and when the seed equipment is two-layer equipment, generating an underhung terminal layer topology according to the initial IP address.
The embodiment of the invention marks the seed equipment as three-layer equipment or two-layer equipment by finding the network hierarchy information of the seed equipment. When the seed equipment is three-layer equipment, only the seed equipment is stored as three-layer equipment, and when the seed equipment is two-layer equipment, the existence of the seed equipment is described as the existence of the down-hanging terminal equipment, so that the topology of the down-hanging terminal layer needs to be acquired.
Step 202: respectively obtaining system information and resource information of the seed equipment according to the route identification information; generating a device layer topology according to the system information; and generating a resource layer topology according to the resource information.
The system information is equipment layer information of seed equipment, and comprises information such as a system object identifier (Object Identifier, abbreviated as OID), the type of network equipment and the like; the resource information is resource layer information of seed equipment, and comprises information such as ports, power supplies, fans, slots and the like.
Step 203: and calculating neighbor equipment information of the seed equipment, and generating a link layer topology according to the neighbor equipment information.
The neighbor device information refers to network link layer information, and comprises information such as network devices and interfaces of the links of the home terminal and the opposite terminal.
Step 204: and obtaining multi-level network topology information according to the equipment layer topology, the resource layer topology, the underhung terminal layer topology and the link layer topology.
The embodiment of the invention deeply discovers and displays various layers of data information related to network equipment by generating the network topological relations of the equipment layer, the resource layer, the underhung terminal layer and the link layer among the networking network equipment. According to the multi-level network topology information, a multi-level network topology map can be efficiently and rapidly generated.
The following further details the specific operation of automatically discovering multi-level network topology information, specifically, as shown in fig. 6, the step 201 includes:
step 2011: acquiring the route identification information based on the initial IP address, and acquiring the route forwarding identification node data of the seed equipment based on a network management information base; and when the route forwarding identification node data is not the preset three-layer equipment value, marking the seed equipment as two-layer equipment.
Wherein the three-layer device value is 1, representing the seed device as three-layer device.
The embodiment of the invention performs data acquisition of network equipment based on a network management information base (Management Information Base); the network management information base is a database used for storing management object information in SNMP, and the management object information can be hardware configuration, software version, running state, network connection and the like of the network equipment; each management object in the network management information base has a unique OID for identifying the management object; the network administrator can acquire and set management object information in the network device through the SNMP, thereby managing and monitoring the network device.
Acquiring SNMP data acquisition objects (i.e. management objects) based on the initial IP address of the seed equipment; and acquiring the route forwarding identification node data of the seed equipment based on the network IP route management information base-iproute. Mib in the network management information base. If the acquired route forwarding identification node data is 1, the seed equipment is three-layer equipment; otherwise, the seed device is a two-layer device. And storing the network level data of the seed equipment into a node equipment table (namely a node equipment table) of the network management information base to generate network level information.
Step 2012: and obtaining the terminal IP address of the hanging terminal of the seed equipment according to the initial IP address.
If the seed equipment is two-layer equipment, the lower hanging terminal layer of the seed equipment is found, and the information comprises the interface, the IP address, the MAC address and the like of the lower hanging terminal. Specifically, in an alternative embodiment, SNMP data collection objects may be obtained based on the initial IP address; based on a protocol address information base of an address resolution protocol (Address Resolution Protocol, abbreviated as ARP), collecting ARP address binding data of an IP address and an MAC address of seed equipment; the address resolution protocol is a network protocol for resolving an IP address into a corresponding MAC address.
Step 2013: based on a protocol address information base, obtaining address binding data of the hanging terminal according to the IP address of the terminal; based on a forwarding address information base, obtaining interface forwarding address data of the hanging terminal according to the IP address of the terminal; and obtaining the information of the down-hanging terminal according to the address binding data and the interface forwarding address data.
In an alternative embodiment, the data such as interface forwarding data, IP address, MAC address and the like of the seed device may be collected based on the Qbridge forwarding address information base. And synthesizing ARP address binding data and interface forwarding address data to generate information of the hanging terminal of the seed equipment, wherein the information comprises interface forwarding data, IP address, MAC address and the like.
Step 2014: and storing the information of the down-hanging terminal into a node terminal table in a network management information base, and generating a topology of the down-hanging terminal layer based on the node terminal table.
The node terminal table is a nodeTerminal table.
The specific operation of automatically discovering the device layer topology and the resource layer topology is further refined, specifically, as shown in fig. 7, the step 202 includes:
step 2021: based on a network management information base, acquiring the system information and the resource information of the seed equipment according to the route identification information.
Based on the initial IP address, SNMP data acquisition objects are acquired. Based on the system management information base-system. Mix, data such as the device name of the seed device, the system OID, etc. are collected.
Step 2022: according to the system OID in the system information, matching the equipment information of the seed equipment in a network management information base; and storing the equipment information into a node equipment table, and generating equipment layer topology based on the node equipment table.
Wherein the node device table is a node device table. And inquiring the type and model of the network management information base matched with the corresponding network equipment according to the acquired system OID based on the equipment template database of the network management information base so as to match the equipment information of the seed equipment.
Step 2023: and storing port resource information, slot resource information, power resource information and fan resource information in the resource information into a node resource table of the network management information base, and generating a resource layer topology based on the node resource table.
Wherein the node resource table is a nodeResource table.
In an alternative embodiment, the SNMP data collection object may be obtained based on the initial IP address. Acquiring port resource information of seed equipment based on a port management information base-if. Mix of a network management information base; the port resource information includes the name, index number, and port bandwidth information of the port.
Similarly, slot position resource information of seed equipment is obtained based on a slot position management information base of a network management information base; the slot resource information includes the name and index number information of the slot, and is stored in a node resource (i.e., nodeResource) table.
Likewise, acquiring power resource information of the equipment based on a power management information base of the network management information base; the power source resource information comprises the name and index number information of the power source and is stored in the node resource table.
Likewise, fan resource information of the equipment is obtained based on a fan management information base of the network management information base; the fan resource information comprises the name and index number information of the fan and is stored in the node resource table.
And generating a resource layer topology based on the device resource node resource table.
The specific operation of automatically discovering the link layer topology is further refined, specifically, as shown in fig. 8, the step 203 includes:
step 2031: collecting the equipment name and interface data of the seed equipment based on a network management information base; collecting the device name and interface data of the opposite-end neighbor device of the seed device based on a network management information base, and taking the device name and interface data of the seed device and the device name and interface data of the opposite-end neighbor device as neighbor device information.
In an alternative embodiment, the SNMP data collection object is obtained based on the initial IP address. Based on a network management information base using a link layer discovery protocol (Link Layer Discovery Protocol, abbreviated LLDP), data of the own, opposite device names, interfaces, etc. of the seed device are collected.
Step 2032: generating link layer information of the seed equipment according to the neighbor equipment information based on a protocol address information base; and storing the link layer information into a node link table of the network management information base, and generating the link layer topology based on the node link table.
The node link table is a nodeLink table.
In an alternative embodiment, the ARP protocol address management information base of the device is integrated, and network link layer information of the device is generated, including data such as a link device name, a device IP, a device port, and the like.
As shown in fig. 9, after determining the seed device, the embodiment of the present invention obtains resource information (port resource information, power resource information, fan resource information, and slot resource information) of the resource layer to generate a resource layer topology by generating a device layer topology of the seed device each time; because the seed equipment is two-layer equipment, the information of the down-hanging terminal layer (a host, a display and a printer are hung under the seed equipment) is also acquired to generate the topology of the down-hanging terminal layer; and finally, generating a link layer topology of the seed equipment and the opposite-end neighbor equipment by acquiring links between the seed equipment and the opposite-end neighbor equipment so as to realize the discovery of multi-level network topology information of the seed equipment.
The flooding expansion algorithm is an expansion algorithm for color filling in computer graphics, and the algorithm uses a certain specific color block as a seed starting point seed to continuously expand and fill the neighborhood direction and the region around, and after the neighborhood is filled, the newly filled region is continuously expanded to the neighborhood direction and the region by using the newly filled region as a new seed starting point seed, and the flooding is the same until the boundary of the filled region is reached. To further refine the process of automatically discovering the flooding expanded topology to the neighborhood network starting from the initial seed device, as shown in fig. 10, the step 30 includes:
Step 301: judging whether opposite-end neighbor equipment exists in the seed equipment according to the link layer topology in the multi-level network topology information; and when the opposite-end neighbor equipment exists, obtaining the neighbor IP address of the opposite-end neighbor equipment according to the equipment layer information in the multi-level network topology information.
Step 302: updating the seed equipment to the opposite-end neighbor equipment; and updating the device layer topology and the resource layer topology according to the neighbor IP address, and updating the down-hanging terminal layer topology when the seed device is a two-layer device.
It should be noted that, since the process of determining the seed device according to the flooding expansion algorithm is a loop iteration process, determining one seed device each time, obtaining a multi-level network topology of the seed device, obtaining an opposite-end neighbor device of the seed device, and taking the opposite-end neighbor device as the next seed device. In an alternative embodiment, when there is more than one peer neighbor device, the peer neighbor devices are sequentially added to the queue in the order in which the peer neighbor devices are found, and one network device is taken out of the queue as a seed device at a time.
For convenience of description, the embodiment of the invention regards seed equipment, equipment layer topology, resource layer topology and underhung terminal layer topology as variables respectively, and updates the variables according to new seed equipment after updating multi-level network topology data in each loop iteration process.
And acquiring the system information of the opposite-end neighbor device according to the neighbor IP address after acquiring the neighbor device information according to the link layer of the seed device every time. And storing the system information into a node equipment table in a network management information base, and updating the equipment layer topology based on the node equipment table.
Step 303: and updating the link layer topology according to the updated device layer topology, the resource layer topology and the underhung terminal layer topology so as to update the seed device until the seed device does not have opposite-end neighbor devices.
For convenience of description, the embodiment of the invention regards the link layer topology as a variable, and the seed equipment, the equipment layer topology, the resource layer topology and the underhung terminal layer topology are managed in the same way. In an alternative embodiment, however, the process may be characterized as eliminating the original seed device each time a flooding expanded search is performed, marking the newly discovered peer neighbor device as a seed device, and the queue removing the original device.
As shown in fig. 11, when there is a newly discovered peer neighbor device, the embodiment of the present invention uses the peer neighbor device as a seed device, and generates a multi-level network topology of the seed device, so as to continuously flood the peer neighbor device of the extended type automatic discovery seed device. When no newly discovered opposite-end neighbor equipment exists, the connection relation between the network equipment corresponding to all legal IP addresses in the network management IP range is established, so that the automatic discovery is ended.
Step 304: generating a multi-level network topology according to the current equipment layer topology, the current resource layer topology, the current underhung terminal layer topology and the current link layer topology.
After the automatic discovery is finished, generating a multi-level network topological graph according to all current network topological relations, and realizing the visual display of each level, structure and state information of the network on a human-computer interface.
As shown in fig. 12, the embodiment of the invention achieves deep acquisition and identification of the attribute, structure and level information of the network by acquiring the multi-level network topology, and solves the problem that the prior art cannot generate a topological relation diagram outside the device layer by detecting the IP address of the network device through continuous ping; and determining the opposite-end neighbor equipment based on the link layer topology, and using the opposite-end neighbor equipment as seed equipment of the next time each time based on a flooding expansion algorithm, thereby solving the problems of low automatic discovery efficiency and more useless IP detection in the prior art.
The monitoring expansibility of the heterogeneous network equipment in the prior art is poor, the processing efficiency is low, and the alarm state monitoring requirement of the complex multi-level network topology cannot be satisfied, and the embodiment of the invention also provides a fault monitoring method of the multi-level network topology, which comprises the following steps:
In step 40, corresponding monitoring policy models are respectively established according to the types of the network devices in the multi-level network topology. According to the embodiment of the invention, different types of heterogeneous network equipment are respectively classified into corresponding monitoring strategy models, so that the monitoring of real-time performance data of the heterogeneous network equipment is conveniently realized based on the different monitoring strategy models.
As shown in fig. 13, for example, based on the type of the network device of brand a, a monitoring policy model of the network device of the corresponding type of brand a is established; based on the type of the network equipment of the brand B, establishing a monitoring strategy model of the network equipment of the corresponding type of the brand B; based on the type of the network equipment of the brand C, establishing a monitoring strategy model of the network equipment of the corresponding type of the brand C; and establishing a monitoring strategy model of the network equipment of the corresponding type based on other network equipment types.
The data of the monitoring policy model is selected by a person skilled in the art according to a specific use scenario, and is not limited herein; in an alternative embodiment, the data of the monitoring policy model may include a type of the network device, a preset OID element, a historical data comparison identifier, a data calculation expression, a preset fault determination condition, and a preset alarm level. And carrying out fault monitoring on the corresponding network equipment by using the data. After the monitoring strategy model is determined according to the type of the network equipment, the embodiment of the invention stores the data of the monitoring strategy model into the network management information base.
In step 50, a matched monitoring policy model is obtained according to the type of the network equipment, and a corresponding monitoring task is generated according to the monitoring policy model. Based on the model of the network equipment, inquiring a monitoring strategy model database table in a network management information base, generating a corresponding monitoring task, and storing the monitoring task into the network management information base for inquiring.
As shown in fig. 13, in an alternative embodiment, the preset generated monitoring tasks are as follows: 1) Port state monitoring tasks; 2) Port rate monitoring tasks; 3) Port packet loss rate monitoring tasks; 4) A power state monitoring task; 5) Fan status monitoring tasks; 6) A slot position state monitoring task; 7) Other monitoring tasks.
In step 60, the monitoring task is executed, and based on the network management information base, fault alarm state information of the multi-level network topology is obtained. According to the embodiment of the invention, the monitoring tasks are obtained from the network management information base, the monitoring tasks of data acquisition, calculation processing and fault judgment of each level are executed in parallel based on the multi-task concurrent thread pool, the performance analysis and fault monitoring are performed on heterogeneous network equipment and multi-level network topology in real time and efficiently, and the fault alarm reminding and real-time state display of the multi-level network topology are realized.
According to the invention, the seed equipment is used for carrying out flooding expansion type search to generate a multi-level network topology, so that the efficient and rapid automatic discovery of the multi-level network topology structure is realized, and the problems that the automatic discovery efficiency is low and deep data information cannot be discovered in the prior art are solved; according to the types of network equipment in the multi-level network topology, respectively establishing corresponding monitoring strategy models, and modifying the corresponding monitoring strategy models by classifying heterogeneous network equipment, so that parameters required to be monitored can be expanded, and the monitoring efficiency is improved; according to the type of the model of the network equipment, a matched monitoring strategy model is obtained, a corresponding monitoring task is generated, and the fault alarm state information of each level in the multi-level network topology is dynamically displayed together by executing the monitoring task respectively, so that the processing efficiency is greatly improved.
In step 501, a monitoring policy model of a corresponding type is queried in a monitoring policy model database table according to the model of the network device. In step 502, a monitoring task is generated that calculates real-time performance data based on the data of the monitoring policy model.
As shown in fig. 14, in step 601, a monitoring task thread pool is initialized according to a preset periodic timing value, and the monitoring task thread pool performs monitoring tasks in parallel. Wherein the preset period timing value is selected by one skilled in the art according to the specific use scenario, and is not limited herein.
In an alternative embodiment, the monitoring platform may be initialized and distributed to perform the monitoring task; initializing a Redis cache database and a data distribution queue, and storing a monitoring task of the network equipment; the monitoring task thread pool distributes and executes each monitoring task. Based on the monitoring strategy model, the processing efficiency is improved by executing the monitoring tasks in parallel through multiple threads.
In step 602, real-time performance data of a device layer, a resource layer and a link layer of the multi-level network topology is collected according to the multi-level network topology based on the network management information base.
And obtaining real-time performance data based on the network management information base. In an alternative embodiment, the network management information base can be accessed and managed through SNMP, and real-time performance data of the monitoring task is collected by acquiring SNMP data collection objects of the network device.
In step 603, corresponding fault alarm state information is generated according to the corresponding preset fault determination conditions, preset alarm levels and real-time performance data of the device layer, the resource layer and the link layer. And generating the fault alarm state information according to the preset fault judgment condition, the preset alarm level and the real-time performance data of the monitoring task.
Comparing the real-time performance data of each level with preset fault judgment conditions of the corresponding level to generate current fault alarm data; comparing the real-time performance data of each level with the preset alarm level of the corresponding level to generate the current alarm level; wherein the fault alarm data and the alarm level are fault alarm state information.
After corresponding fault alarm state information is generated, the fault alarm state information can be persisted, pushed and displayed. Specifically, the current fault alarm data and the current alarm level corresponding to each level are cached by using a preset cache form. And acquiring current fault alarm data and current alarm levels of all levels from the cache, and pushing the current fault alarm data and the current alarm levels to corresponding all levels in the multi-level network topology interface for display respectively.
And caching the current fault alarm data and the current alarm level corresponding to each level into a cache space by using a preset cache form. The preset buffer form is selected by those skilled in the art according to specific usage scenarios, and is not limited herein. In an alternative embodiment, the preset buffer form may be a Zset data structure form of Redis; after determining the current fault alarm data and the current alarm level each time, storing the current fault alarm data and the current alarm level into a Redis cache database (namely a cache space) by using a Zset data structure form based on different layers such as a device layer, a link layer and a resource layer so as to realize the persistence of fault alarm state information.
And acquiring current fault alarm data and current alarm levels of all levels from the cache, and pushing the current fault alarm data and the current alarm levels into a multi-level network topology interface respectively for display.
Based on the current fault alarm data and the current alarm level in the cache space, generating fault alarm state information of different layers such as a device layer, a resource layer and a link layer according to the network topology layer of the current seed device, pushing and displaying the fault alarm state information to an interface of a network management system, wherein the interface presents the comprehensive state of the network layer, the device layer and the resource layer.
By means of data query and pushing, warning reminding and early warning are carried out on network equipment on a network management system, real-time fault warning data, warning level and other fault warning state information of the network equipment can be visually presented in an interface and frame message mode, and dynamic display of multi-level network topology is supported.
In order to acquire real-time performance data of the multi-level network topology, in step 6021, a data acquisition object of the network device is acquired. And acquiring real-time performance data of a device layer, a resource layer and a link layer of the multi-level network topology based on the multi-level network topology relation. In step 6022, the OID element data corresponding to the monitoring task is obtained based on the network management information base. In step 6023, a data calculation expression is determined based on the monitoring task. In step 6024, real-time performance data is obtained according to the data calculation expression and the preset OID element. Specifically, real-time performance data is calculated based on the data calculation expression; in an alternative embodiment, the Redis data cache is stored. And generating acquisition data based on the multi-level preset OID elements according to the preset OID elements and the data calculation expression. And when the historical data comparison mark exists, acquiring the latest performance data from the cache, and comparing and calculating the latest performance data with the acquired data to generate real-time performance data of the monitoring task. The specific implementation of the comparison calculation is selected by those skilled in the art, and is not limited herein.
Example 2:
fig. 15 is a schematic structural diagram of a control device in the multi-level network topology automatic discovery apparatus according to the embodiment of the invention. The control device of the present embodiment includes one or more processors 31 and a memory 32. In fig. 15, a processor 31 is taken as an example.
The processor 31 and the memory 32 may be connected by a bus or otherwise, which is illustrated in fig. 15 as a bus connection.
The memory 32 is used as a non-volatile computer readable storage medium for storing non-volatile software programs and non-volatile computer executable programs, such as the multi-level network topology auto-discovery method of embodiment 1. The processor 31 performs the multi-layered network topology auto-discovery method by running non-volatile software programs and instructions stored in the memory 32.
The memory 32 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 32 may optionally include memory located remotely from processor 31, which may be connected to processor 31 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in the memory 32, which when executed by the one or more processors 31, perform the multi-level network topology auto-discovery method of embodiment 1 described above, for example, performing the steps shown in fig. 1-3, 5-8, and 10 described above.
It should be noted that, because the content of information interaction and execution process between modules and units in the above-mentioned device and system is based on the same concept as the processing method embodiment of the present invention, specific content may be referred to the description in the method embodiment of the present invention, and will not be repeated here.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the embodiments may be implemented by a program that instructs associated hardware, the program may be stored on a computer readable storage medium, the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (10)

1. A method for automatically discovering a multi-level network topology, comprising:
determining an initial IP address of initial network equipment, and marking the initial network equipment as seed equipment;
automatically discovering multi-level network topology information of the seed equipment according to the initial IP address;
and performing flooding expansion type search according to the multi-level network topology information of the seed equipment to generate multi-level network topology.
2. The method of claim 1, wherein the performing a flooding expansion search according to the multi-level network topology information of the seed device, and generating the multi-level network topology comprise:
judging whether opposite-end neighbor equipment exists in the seed equipment according to the link layer topology in the multi-level network topology information; when the opposite-end neighbor equipment exists, the neighbor IP address of the opposite-end neighbor equipment is obtained according to the equipment layer information in the multi-level network topology information;
updating the seed equipment to the opposite-end neighbor equipment; updating the device layer topology and the resource layer topology according to the neighbor IP address, and updating the lower hanging terminal layer topology when the seed device is a two-layer device;
Updating the link layer topology according to the updated device layer topology, the resource layer topology and the underhung terminal layer topology to update the seed device until the seed device does not have opposite-end neighbor devices;
generating a multi-level network topology according to the current equipment layer topology, the current resource layer topology, the current underhung terminal layer topology and the current link layer topology.
3. The method of claim 2, wherein updating the device layer topology based on the neighbor IP addresses comprises:
acquiring system information of the opposite-end neighbor equipment according to the neighbor IP address;
and storing the system information into a node equipment table in a network management information base, and updating the equipment layer topology based on the node equipment table.
4. The method of claim 1, wherein automatically discovering the multi-level network topology information of the seed device according to the initial IP address comprises:
obtaining route identification information of the seed equipment according to the initial IP address; when the seed equipment is two-layer equipment, generating a down-hanging terminal layer topology according to the initial IP address;
Respectively obtaining system information and resource information of the seed equipment according to the route identification information; generating a device layer topology according to the system information; generating a resource layer topology according to the resource information;
calculating neighbor equipment information of the seed equipment, and generating a link layer topology according to the neighbor equipment information;
and obtaining multi-level network topology information according to the equipment layer topology, the resource layer topology, the underhung terminal layer topology and the link layer topology.
5. The method for automatically discovering multi-level network topology according to claim 4, wherein the route identification information of the seed device is obtained according to the initial IP address; when the seed equipment is two-layer equipment, generating the down-hanging terminal layer topology according to the initial IP address comprises:
acquiring the route identification information based on the initial IP address, and acquiring the route forwarding identification node data of the seed equipment based on a network management information base; when the route forwarding identification node data is not a preset three-layer equipment value, marking the seed equipment as two-layer equipment;
obtaining a terminal IP address of the hanging terminal of the seed equipment according to the initial IP address;
Based on a protocol address information base, obtaining address binding data of the hanging terminal according to the IP address of the terminal; based on a forwarding address information base, obtaining interface forwarding address data of the hanging terminal according to the IP address of the terminal; obtaining the information of the down-hanging terminal according to the address binding data and the interface forwarding address data;
and storing the information of the down-hanging terminal into a node terminal table in a network management information base, and generating a topology of the down-hanging terminal layer based on the node terminal table.
6. The method for automatically discovering multi-level network topology according to claim 4, wherein the system information and the resource information of the seed device are obtained according to the route identification information; generating a device layer topology according to the system information; generating a resource layer topology according to the resource information comprises:
acquiring system information and resource information of the seed equipment according to the route identification information based on a network management information base;
according to the system OID in the system information, matching the equipment information of the seed equipment in a network management information base; storing the equipment information into a node equipment table, and generating equipment layer topology based on the node equipment table;
And storing port resource information, slot resource information, power resource information and fan resource information in the resource information into a node resource table of the network management information base, and generating a resource layer topology based on the node resource table.
7. The method of claim 4, wherein calculating neighbor device information of the seed device, and generating a link layer topology based on the neighbor device information comprises:
collecting the equipment name and interface data of the seed equipment based on a network management information base; collecting the equipment name and interface data of opposite-end neighbor equipment of the seed equipment based on a network management information base, and taking the equipment name and interface data of the seed equipment and the equipment name and interface data of the opposite-end neighbor equipment as neighbor equipment information;
generating link layer information of the seed equipment according to the neighbor equipment information based on a protocol address information base; and storing the link layer information into a node link table of the network management information base, and generating the link layer topology based on the node link table.
8. The method of claim 1, wherein determining the initial IP address of the initial network device comprises:
Acquiring an IP address to be judged of the initial network equipment, and judging whether the IP address to be judged is a preset legal IP address or not;
if the IP address is the preset legal IP address, the IP address to be judged is used as an initial IP address;
if the IP address is not the preset legal IP address, the initial IP address of the initial network equipment is automatically detected according to the equipment IP address and mask information of the network management end.
9. The method for automatically discovering a multi-layer network topology according to claim 8, wherein if the network address is not the preset legal IP address, automatically detecting the initial IP address of the initial network device according to the device IP address and the mask information of the network management terminal comprises:
calculating a network management IP range according to the equipment IP address and mask information of the network management end;
and polling the IP address in the network management IP range until the network management end can acquire the system information which is not empty through the IP address, marking the network equipment corresponding to the IP address as initial network equipment, and taking the IP address as the initial IP address.
10. A multi-level network topology auto-discovery apparatus comprising at least one processor and a memory, the at least one processor and the memory being connected by a data bus, the memory storing instructions executable by the at least one processor, the instructions, when executed by the processor, for implementing the multi-level network topology auto-discovery method of any of claims 1-9.
CN202311659908.9A 2023-12-06 2023-12-06 Multi-level network topology automatic discovery method and device Pending CN117527596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311659908.9A CN117527596A (en) 2023-12-06 2023-12-06 Multi-level network topology automatic discovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311659908.9A CN117527596A (en) 2023-12-06 2023-12-06 Multi-level network topology automatic discovery method and device

Publications (1)

Publication Number Publication Date
CN117527596A true CN117527596A (en) 2024-02-06

Family

ID=89758729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311659908.9A Pending CN117527596A (en) 2023-12-06 2023-12-06 Multi-level network topology automatic discovery method and device

Country Status (1)

Country Link
CN (1) CN117527596A (en)

Similar Documents

Publication Publication Date Title
CN110661669B (en) Network topology automatic discovery method of network equipment based on ICMP, TCP and UDP protocols
JP4647234B2 (en) Method and apparatus for discovering network devices
CN100456687C (en) Network failure real-time relativity analysing method and system
US20050047350A1 (en) Apparatus and methods for discovery of network elements in a network
US8639802B2 (en) Dynamic performance monitoring
US20030225876A1 (en) Method and apparatus for graphically depicting network performance and connectivity
US7307962B2 (en) System for inference of presence of network infrastructure devices
US11509552B2 (en) Application aware device monitoring correlation and visualization
CN107733713B (en) Method, system, device and storage medium for acquiring network topology in hybrid network
US8625457B2 (en) Method and apparatus for concurrent topology discovery
US20050066020A1 (en) Method and system for managing a network of nodes
CN112187512B (en) Port automatic expansion method, device and equipment based on flow monitoring
CN108900421A (en) A kind of Topological Structure Generation of distributed memory system, apparatus and system
CN113542015A (en) Method for automatically drawing network physical link
US7185109B2 (en) Recursive discovery of CDP type of nodes in a network of various node types
CN113452561A (en) Topology generation method, device and equipment and readable storage medium
CN112822053A (en) SNMP-based link layer network topology structure discovery method and system
US11032124B1 (en) Application aware device monitoring
CN104579978A (en) Link-layer topology discovery method for dynamic network
CN116545861A (en) Network topology graph generation method, device and equipment
CN106982164A (en) A kind of method for discovering network topology and equipment
CN115314392A (en) Automatic network topology generation system and method based on network equipment resource discovery algorithm
CN113612646B (en) Neighborhood network topology visualization method based on neighbor discovery
CN116827801B (en) Network topology construction method, device, computer equipment and readable storage medium
US9087299B2 (en) Inferring connectivity in the presence of conflicting network data

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