CN115242595B - Network device discovery method, device, electronic device and storage medium - Google Patents
Network device discovery method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN115242595B CN115242595B CN202210843161.1A CN202210843161A CN115242595B CN 115242595 B CN115242595 B CN 115242595B CN 202210843161 A CN202210843161 A CN 202210843161A CN 115242595 B CN115242595 B CN 115242595B
- Authority
- CN
- China
- Prior art keywords
- network
- address
- equipment
- network equipment
- information
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000013507 mapping Methods 0.000 claims description 51
- 238000012544 monitoring process Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims 2
- 238000007726 management method Methods 0.000 description 116
- 238000002955 isolation Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/024—Standardisation; Integration using relational databases for representation of network management data, e.g. managing via structured query language [SQL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the application discloses a network device discovery method, a network device discovery device, electronic equipment and a storage medium. Sending an internet protocol address (IP) address list query instruction to at least two network management ends, and receiving an IP address list of network equipment of a self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different; and comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment. The embodiment of the application improves the effectiveness of network equipment discovery.
Description
Technical Field
The embodiment of the application relates to computer technology, in particular to a network device discovery method, a network device discovery device, electronic equipment and a storage medium.
Background
When the development of the internet is rapid, as the service demand increases, network devices are continuously expanded, and the network devices are timely found to be the first step for effectively monitoring the network devices.
In the prior art, due to isolation between different network segments, a network server cannot effectively discover network devices in the different network segments.
Disclosure of Invention
The application provides a network device discovery method, a network device discovery device, an electronic device and a storage medium, so as to improve the effectiveness of network device discovery.
In a first aspect, an embodiment of the present application provides a network device discovery method, applied to a network server, where the network device discovery method includes:
Sending an internet protocol address (IP) address list query instruction to at least two network management ends, and receiving an IP address list of network equipment of a self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different;
and comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment.
In a second aspect, an embodiment of the present application provides a network device discovery method, applied to a network management end, where the network device discovery method includes:
acquiring an IP address list query instruction sent by a network server;
The IP address list of the network equipment of the network segment managed by the network server is fed back to the network server, so that the network server compares the IP address list fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment;
wherein, the network segments managed by different network management terminals are different.
In a third aspect, an embodiment of the present application further provides a network device discovery apparatus configured at a network server, where the network device discovery apparatus includes:
The IP address list acquisition module is used for sending an Internet protocol address IP address list query instruction to at least two network management ends and receiving an IP address list of the network equipment of the self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different;
And the IP address adding module is used for comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment.
In a fourth aspect, an embodiment of the present application provides a network device discovery apparatus configured at a network management end, where the network device discovery method includes:
The query instruction acquisition module acquires an IP address list query instruction sent by the network server;
The IP address list feedback module feeds back the IP address list of the network equipment of the network segment managed by the IP address list feedback module to the network server, so that the network server compares the IP address list fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment;
wherein, the network segments managed by different network management terminals are different.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
a storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement any of the network device discovery methods as provided by the embodiments of the present application.
In a sixth aspect, embodiments of the present application also provide a storage medium comprising computer-executable instructions, which when executed by a computer processor, are configured to perform any of the network device discovery methods as provided by the embodiments of the present application.
The application sends the inquiry instruction of the IP address list of the Internet protocol address to at least two network management ends and receives the IP address list of the network equipment of the self management network segment fed back by the corresponding network management ends, wherein the network segments managed by different network management ends are different, so that the IP address list of the network equipment in different network segments can be obtained, and the isolation among different network segments is overcome. Comparing the IP address list corresponding to each network management end with the IP addresses of the network devices stored locally, finding out the IP addresses which are not existed in the IP addresses of the network devices stored locally by the network service end through comparison, obtaining the IP addresses of the newly-added network devices, and finding out the newly-added network devices through the IP addresses of the network devices according to the corresponding relation between the IP addresses and the network devices. The method solves the problem that the network server cannot effectively discover the network equipment in the isolation area due to the isolation among different network segments in the prior art, and achieves the effect of improving the discovery availability of the network equipment.
Drawings
Fig. 1 is a flowchart of a network device discovery method according to a first embodiment of the present application;
fig. 2 is a flowchart of a network device discovery method in a second embodiment of the present application;
fig. 3 is a flowchart of a network device discovery method in a third embodiment of the present application;
Fig. 4 is a flowchart of a network device discovery method in a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a network device discovery apparatus in a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a network device discovery apparatus in a sixth embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device in a seventh embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first" and "second" and the like in the description and the claims of the present application and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a network device discovery method according to an embodiment of the present application, where the embodiment is applicable to a case of discovering newly added network devices, and the method may be performed by a network device discovery apparatus, and the apparatus may be implemented by software and/or hardware and specifically configured in a network server.
Referring to the network device discovery method shown in fig. 1, the network device discovery method is applied to a network server, and specifically includes the following steps:
s110, sending an Internet protocol address (IP) address list query instruction to at least two network management ends, and receiving an IP address list of network equipment of a self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different.
The network management end is a server end for managing network devices in different network segments, and each network segment corresponds to one network management end respectively. The network management end monitors the network equipment in the management network segment, when the network equipment is connected to the network or the error occurs, the network management end automatically generates a notification message of a corresponding type and sends the notification message to the network management end of the corresponding network segment, and after the network management end receives the notification message of the network equipment, the network management end extracts an IP address (Internet Protocol Address, an Internet protocol address) in the notification message and generates an IP address list.
The network server sends an IP address list query instruction to the network management end according to a preset period, the number of the network management ends is at least 2, and specifically, the number of the network management ends is determined by the number of network segments in the monitoring range of the network server. The preset period may be set according to actual needs, and exemplary periods may be 8 hours, 1 day, 1 week, etc., and may be set according to the number of network management ends and the increasing frequency of the network devices, etc., which is not specifically limited in the present application. After receiving the query instruction sent by the network server, the network management end sends the IP address list of the network equipment of the self management network segment to the network server, and the network server receives the corresponding IP address list fed back by each network management end.
A network may be divided into a plurality of segments, and network devices in different segments have regional isolation, so that it is difficult and time-efficient to discover network devices in a plurality of isolated regions. Because the network segments managed by different network management ends are different, the network service end can overcome the problem that the network devices in different network segments have regional isolation by receiving the IP address list of the network devices of the self-management network segment fed back by the different network management ends.
S120, comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network devices to obtain the IP addresses of the newly added network devices.
The locally stored network device IP address is a network device IP address stored in the network server, that is, the network server discovers and stores the network device IP address before receiving the IP address list of the network device fed back by each network management end.
The network server compares the IP address list corresponding to each network management end with the IP address of the locally stored network equipment, when the IP address which does not exist in the locally stored IP address of the network equipment is obtained through comparison, the IP address is the logic address of the network equipment in the network, and when the newly-increased IP address appears in the network, the newly-increased network equipment exists in the network, so that the IP address is the IP address of the newly-increased network equipment.
In an alternative embodiment, comparing the list of corresponding IP addresses of each network management end with the IP addresses of the network devices locally stored in the network service end includes: performing duplication removal on the IP addresses in each IP address list to obtain IP addresses to be analyzed; and taking the IP address to be analyzed which does not exist in the IP addresses of the network devices stored locally by the network server as the IP address of the newly added network device.
Multiple repeated IP addresses may appear in the IP address list, which increases the workload of subsequent comparison with the network device IP address stored locally at the server, and reduces the discovery efficiency of the new device. Therefore, the network server performs de-duplication on the IP addresses in each IP address list, that is, removes the repeated IP addresses in each IP address list, and uses the IP address after de-duplication processing of each IP address list as the IP address to be analyzed.
And comparing the IP address to be analyzed with the IP address of the network equipment locally stored in the network server. Specifically, if the comparison result is that the IP address to be analyzed exists in the IP addresses of the network devices locally stored by the network server, the IP address to be analyzed is not the IP address of the newly added network device, and no processing is needed; if the comparison result shows that the IP address to be analyzed does not exist in the IP addresses of the network devices locally stored by the network server, the IP address to be analyzed is the IP address of the newly-added network device, the IP address to be analyzed is used as the IP address of the newly-added network device, and the IP address to be analyzed is locally stored at the network server.
By performing de-duplication on the IP addresses in each IP address list, the redundant workload of the subsequent comparison process can be reduced, the comparison efficiency is improved, when the comparison finds that the IP addresses to be analyzed are not present in the network device IP addresses stored locally by the network server, it is indicated that the IP addresses are newly allocated in the network, that is, new network devices are added in the network, the IP addresses to be analyzed are not present in the network device IP addresses stored locally by the network server, that is, the IP addresses of the newly added network devices are the IP addresses of the newly added network devices, and according to the uniqueness of the IP addresses, the monitoring of the newly added network devices is realized, and the newly added network devices are found timely.
According to the technical scheme of the embodiment, the IP address list query instruction is sent to at least two network management ends, and the IP address list of the network equipment of the self-management network segment fed back by the corresponding network management ends is received, wherein the network segments managed by different network management ends are different, so that the IP address list of the network equipment in different network segments can be obtained, and isolation among different network segments is overcome. Comparing the IP address list corresponding to each network management end with the IP addresses of the network devices stored locally, finding out the IP addresses which are not existed in the IP addresses of the network devices stored locally by the network service end through comparison, obtaining the IP addresses of the newly-added network devices, and finding out the newly-added network devices through the IP addresses of the network devices according to the corresponding relation between the IP addresses and the network devices. The method solves the problem that the network service end cannot effectively discover the network equipment in different network segments due to isolation among different network segments in the prior art, and achieves the effect of improving the discovery availability of the network equipment.
Example two
Fig. 2 is a flowchart of a flowchart method of a network device discovery method according to a second embodiment of the present application, where the technical solution of the present embodiment is further refined on the basis of the technical solution.
Further, the network device discovery method further includes: acquiring association information of newly-added network equipment, wherein the association information comprises at least one of equipment name, serial number and equipment model; establishing a mapping relation between the association information and the IP address corresponding to the newly added network equipment; and determining the network equipment clusters with the same IP address according to the mapping relation.
Referring to fig. 2, a network device discovery method includes:
s210, sending an Internet protocol address (IP) address list query instruction to at least two network management ends, and receiving an IP address list of network equipment of a self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different.
S220, comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network devices to obtain the IP addresses of the newly added network devices.
S230, acquiring association information of the newly-added network equipment, wherein the association information comprises at least one of equipment name, serial number and equipment model.
The association information is device identification information associated with the network device. For example, the association information may be at least one of a device name, a serial number, a device model number, etc., where the serial number may uniquely identify the network device, and the serial number may be preferentially selected as the association information. After the network server obtains the IP address of the newly-added network device, the network server sends an associated information inquiry instruction of the newly-added network device to the network management end according to the IP address of the newly-added network device, and the associated information of the newly-added network device is obtained.
S240, establishing a mapping relation between the association information and the IP address corresponding to the newly added network equipment.
And establishing a mapping relation with the corresponding IP address according to the acquired association information, and storing the mapping relation in a local database. The information such as the name, serial number and equipment model number of the network equipment corresponding to the IP address can be recorded through the mapping relation, and the number of the network equipment is at least one.
S250, determining the network equipment clusters with the same IP address according to the mapping relation.
The network device cluster is a cluster formed by a plurality of network devices. The same IP address can establish a mapping relation with at least one network device, when the same IP address and a plurality of network devices establish the mapping relation, the plurality of network devices share one IP address at the moment, and a network device cluster with the same IP address is determined according to the mapping relation.
According to the technical scheme, the association information of the newly-added network equipment is obtained, the mapping relation between the association information and the IP address corresponding to the newly-added network equipment is established, the association information can uniquely identify the equipment information of the network equipment, the network equipment clusters with the same IP address are determined through the mapping relation, and the network equipment information corresponding to the IP address of the newly-added network equipment is perfected.
In an alternative embodiment, the network device discovery method further includes: monitoring association information of each network device in the locally stored network device IP address, wherein the association information comprises at least one of a device name, a serial number and a device model; if new association information exists under the same IP address, establishing a mapping relation between the new association information and the corresponding IP address; and determining newly added network equipment in the network equipment cluster with the same IP address according to the mapping relation.
The network server monitors the association information of each network device in the locally stored network device IP address according to a preset period, that is, obtains the association information of each network device in the locally stored network device IP address without finding the newly added network device IP address. The period of monitoring the association information of each network device in the locally stored IP address of the network device may be the same as or different from the period of acquiring the IP address list, which is not particularly limited in the present application.
If new association information, such as a new serial number, exists under the same IP address, which indicates that the network device is newly added under the IP address, a mapping relationship is established between the new association information and the corresponding IP address. The association information includes at least one of a device name, a serial number, and a device model number. And the network equipment corresponding to the new association information and the original network equipment under the P address form a network equipment cluster of the IP address, and the newly added network equipment in the network equipment cluster with the same IP address is determined according to the mapping relation.
It should be noted that, if the original association information in the IP address does not exist, that is, it is monitored that the original association information does not exist under the IP address, it is indicated that the network device corresponding to the association information has been removed from the network device cluster corresponding to the IP address, and the association information is deleted at this time, so that storage resources of the network server can be saved, and timely update of the network device information can be realized. By deleting the non-existing association information and establishing the mapping relation between the new association information and the corresponding IP address, the corresponding association information can be automatically updated under the condition of network equipment replacement, and the accuracy of the mapping relation between the association information stored by the network server and the corresponding IP address is ensured.
By monitoring the association information of each network device in the locally stored network device IP address, new association information can be found out in time under the IP address, newly-added network devices under the same IP address can be found out effectively, meanwhile, when the network devices under the same IP address are replaced, the association information of the replaced new network devices can be found out in time, the association information of the network devices in the network device cluster of the same IP address is automatically updated, manual modification is not needed, labor cost is saved, and the discovery efficiency of the newly-added network devices is improved.
Example III
Fig. 3 is a flowchart of a network device discovery method according to a third embodiment of the present application, where the present embodiment is applicable to a case of discovering newly added network devices, and the method may be performed by a network device discovery apparatus, and the apparatus may be implemented by software and/or hardware and specifically configured in a network management end.
S310, acquiring an IP address list query instruction sent by the network server.
The network management end receives an IP address list query instruction sent by the network server end and queries an IP address list in the local database.
In an alternative embodiment, the list of IP addresses is generated based on the following: acquiring a notification message which is sent by network equipment in a managed network segment based on a simple network management protocol SNMP and comprises IP address information; IP address information is extracted from the notification message and stored in a device information base.
SNMP (Simple network management protocol ) is an application layer protocol defined by the internet architecture committee in RFC 1157. SNMP is used to exchange management information between network devices. Net-SNMP is an open source SNMP implementation that can provide two applications.
The network device is provided with a snmpd (an application program provided by Net-SNMP AGENT, net-SNMP) and is an SNMP agent, and can intercept SNMP requests. Specifically, a snmpd automatic triggering function can be set, and the snmpd automatic triggering function is used for connecting network equipment to a network segment managed by a network management end and sending a notification message of a corresponding type which is automatically triggered to the network management end when certain errors occur. The network management end is provided with snmptrapd (an application program provided by Net-SNMP for intercepting incoming SNMP notification messages) and is configured with corresponding network segment authorities for receiving notification messages sent by network devices installed in the managed network segments. The UDP 162 port is used for communication between the network management end and the network equipment, so that the communication efficiency is improved.
The device information base is a MYSQL (a database name) database for storing a list of IP addresses of network devices installed in the managed network segment. The network manager is provided with SNMPTT (SNMP Trap Translator, an SNMP notification message handler written in Perl) for converting the received SNMP notification message into a network device IP address. The network device sends a notification message based on SNMP (simple network management protocol) comprising IP address information, and after the network management terminal obtains the notification message, the network management terminal extracts the IP address information in the notification message through SNMPTT and stores the IP address information in a MYSQL database to form an IP address list.
The network equipment automatically sends the notification message to the network management terminal based on the SNMP, so that the message omission can be prevented, and the integrity and the instantaneity of the IP address list obtained in the later stage are ensured. And converting the notification message into an IP address, storing the IP address into a database to form an IP address list, and providing a data basis for data comparison of the later network server.
S320, feeding back an IP address list of network equipment of a network segment managed by the network server to the network server so that the network server compares the IP address list fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment; wherein, the network segments managed by different network management terminals are different.
The network management end responds to the acquired IP address list query instruction sent by the network server end, and feeds back the IP address list of the network equipment of the network segment managed by the network management end to the network server end. The network server compares the IP address list fed back by different network management ends with the locally stored IP address of the network equipment to obtain the IP address of the newly added network equipment; wherein, the network segments managed by different network management terminals are different.
According to the technical scheme of the embodiment, the network management end feeds back the IP address list of the network equipment of the network segment managed by the network management end to the network service end by receiving the IP address list query instruction sent by the network service end, and can timely feed back the IP address list stored in the network management end, so that the network service end compares the IP address lists fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly-added network equipment.
Example IV
Fig. 4 is a flowchart of a flowchart method of a network device discovery method according to a fourth embodiment of the present application, where the technical solution of the present embodiment is further refined on the basis of the technical solution.
Further, the network device discovery method further includes: responding to an associated information query instruction of the network equipment to be queried, and acquiring associated information of the network equipment to be queried; the method comprises the steps of feeding back association information of the network equipment to be queried to a network server side, so that the network server side establishes a mapping relation between the association information and the network equipment to be queried, and the mapping relation is used for determining newly added network equipment in a network equipment cluster; wherein the association information includes at least one of a device name, a serial number, and a device model number.
Referring to fig. 4, a network device discovery method includes:
S410, acquiring an IP address list query instruction sent by the network server.
S420, feeding back an IP address list of network equipment of a network segment managed by the network server to the network server so that the network server compares the IP address list fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment; wherein, the network segments managed by different network management terminals are different.
S430, responding to the associated information query instruction of the network equipment to be queried, and acquiring the associated information of the network equipment to be queried.
The network equipment to be queried is network equipment corresponding to the network equipment IP address locally stored by the network server and the IP address of the newly added network equipment. After acquiring the network equipment association information query instruction of the network server, the network management end queries association information of a corresponding IP address according to the IP address in the instruction, and acquires the association information of the network equipment to be queried.
In an alternative embodiment, obtaining the association information of the network device to be queried includes: sending an information inquiry command to the network equipment to be inquired based on SNMP; and acquiring the equipment identification information returned by the network equipment to be queried based on the SNMP, and acquiring the association information of the equipment to be queried.
The network management end sends an information inquiry command to the network equipment to be inquired based on the SNMP, wherein the information inquiry command can be the type of inquired equipment information and can also comprise state information and the like. Illustratively, the device information type includes at least one of a device name, a serial number, and a device model number. And acquiring the corresponding numerical value of the equipment identification information returned by the network equipment to be queried based on the SNMP, namely the equipment information type and the like, and acquiring the association information of the equipment to be queried.
The information inquiry instruction is sent to the network equipment to be inquired based on the SNMP, equipment identification information returned by the network equipment to be inquired based on the SNMP is obtained, and further the associated information of the equipment to be inquired is obtained, so that the accuracy of the associated information of the network equipment to be inquired can be improved.
S440, the association information of the network equipment to be queried is fed back to the network server, so that the network server establishes a mapping relation between the association information and the network equipment to be queried, and the mapping relation is used for determining newly added network equipment in the network equipment cluster; wherein the association information includes at least one of a device name, a serial number, and a device model number.
The network management end feeds the acquired association information of the network equipment to be queried back to the network server end, so that the network server end can establish a mapping relation between the association information and the network equipment to be queried, and the mapping relation is used for determining newly-added network equipment in the network equipment cluster. Specifically, the newly added network device may be a newly added network device corresponding to the newly added IP address, or may be a newly added network device corresponding to the IP address of the network device locally stored at the network server. Wherein the association information includes at least one of a device name, a serial number, and a device model number.
According to the technical scheme, the association information of the network equipment to be queried is acquired from the network equipment to be queried by responding to the association information query instruction of the network equipment to be queried, and the association information of the network equipment to be queried is fed back to the network server side, so that the association information of the network equipment to be queried can be accurately acquired, the network server side is enabled to establish a mapping relation corresponding to the association information and the network equipment to be queried, the mapping relation is used for determining newly-added network equipment in the network equipment cluster, and efficiency of the newly-added network equipment is improved.
Example five
Fig. 5 is a schematic structural diagram of a network device discovery apparatus according to a fifth embodiment of the present application, where the embodiment is applicable to a case of discovering newly added network devices, and is configured at a network server, and the specific structure of the network device discovery apparatus is as follows:
The IP address list obtaining module 510 is configured to send an IP address list query instruction to at least two network management ends, and receive an IP address list of a network device of a self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different;
The IP address adding module 520 is configured to compare the IP address list corresponding to each network management end with the locally stored IP addresses of the network devices, so as to obtain the IP address of the newly added network device.
According to the technical scheme of the embodiment, the IP address list query instruction is sent to at least two network management ends, and the IP address list of the network equipment of the self-management network segment fed back by the corresponding network management ends is received, wherein the network segments managed by different network management ends are different, so that the IP address list of the network equipment in different network segments can be obtained, and isolation among different network segments is overcome. Comparing the IP address list corresponding to each network management end with the IP addresses of the network devices stored locally, finding out the IP addresses which are not existed in the IP addresses of the network devices stored locally by the network service end through comparison, obtaining the IP addresses of the newly-added network devices, and finding out the newly-added network devices through the IP addresses of the network devices according to the corresponding relation between the IP addresses and the network devices. The method solves the problem that the network service end cannot effectively discover the network equipment in different network segments due to isolation among different network segments in the prior art, and achieves the effect of improving the discovery availability of the network equipment.
Optionally, the IP address adding module 520 includes:
The IP address deduplication unit is used for deduplicating the IP addresses in each IP address list to obtain the IP addresses to be analyzed;
And the IP address adding unit is used for taking the IP address to be analyzed which does not exist in the network equipment IP addresses locally stored by the network server as the IP address of the newly added network equipment.
Optionally, the network device discovery apparatus further includes:
the system comprises an association information acquisition module, a network device management module and a network device management module, wherein the association information acquisition module is used for acquiring association information of newly-added network devices, and the association information comprises at least one of device names, serial numbers and device models;
The mapping relation establishing module is used for establishing a mapping relation between the association information and the IP address corresponding to the newly-added network equipment;
and the device cluster determining module is used for determining the network device clusters with the same IP address according to the mapping relation.
Optionally, the network device discovery apparatus further includes:
the system comprises a correlation information monitoring module, a network equipment management module and a network equipment management module, wherein the correlation information monitoring module is used for monitoring correlation information of each network equipment in a locally stored network equipment IP address, and the correlation information comprises at least one of equipment names, serial numbers and equipment models;
The mapping relation increasing module is used for establishing a mapping relation between the new association information and the corresponding IP address if the new association information exists under the same IP address;
And the stacking device newly-added module is used for determining newly-added network device clusters in the determined stacking device with the same IP address according to the mapping relation.
The network equipment discovery device provided by the embodiment of the application can execute the network equipment discovery method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example six
Fig. 6 is a schematic structural diagram of a network device discovery apparatus according to a sixth embodiment of the present application, where the embodiment is applicable to a case of discovering newly added network devices, and is configured at a network management end, and the specific structure of the network device discovery apparatus is as follows:
a query instruction obtaining module 610, configured to obtain an IP address list query instruction sent by a network server;
The IP address list feedback module 620 is configured to feed back an IP address list of a network device of a network segment managed by the network server to the network server, so that the network server compares the IP address list fed back by different network management ends with a locally stored IP address of the network device to obtain an IP address of a newly added network device; wherein, the network segments managed by different network management terminals are different.
According to the technical scheme of the embodiment, the network management end feeds back the IP address list of the network equipment of the network segment managed by the network management end to the network service end by receiving the IP address list query instruction sent by the network service end, and can timely feed back the IP address list stored in the network management end, so that the network service end compares the IP address lists fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly-added network equipment.
Optionally, the network device discovery apparatus further includes:
The association information query module is used for responding to an association information query instruction of the network equipment to be queried and acquiring association information of the network equipment to be queried;
The mapping relation feedback module is used for feeding back the association information of the network equipment to be queried to the network server side so that the network server side establishes a mapping relation corresponding to the association information and the network equipment to be queried and is used for determining newly added network equipment in the network equipment cluster; wherein the association information includes at least one of a device name, a serial number, and a device model number.
Optionally, the network device discovery apparatus includes:
a notification message acquisition module, configured to acquire a notification message including IP address information sent by a network device in a managed network segment based on a simple network management protocol SNMP;
And the IP address list information extraction module is used for extracting the IP address list information from the notification message and storing the IP address list information in the equipment information base.
Optionally, the association information query module includes:
the information inquiry instruction sending unit is used for sending an information inquiry instruction to the network equipment to be inquired based on the SNMP;
the association information acquisition unit is used for acquiring the equipment identification information returned by the network equipment to be queried based on the SNMP to obtain the association information of the equipment to be queried.
The network equipment discovery device provided by the embodiment of the application can execute the network equipment discovery method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example seven
Fig. 7 is a schematic structural diagram of an electronic device according to a seventh embodiment of the present application, as shown in fig. 7, the electronic device includes a processor 710, a memory 720, an input device 730, and an output device 740; the number of processors 710 in the electronic device may be one or more, one processor 710 being taken as an example in fig. 7; the processor 710, memory 720, input device 730, and output device 740 in the electronic device may be connected by a bus or other means, for example in fig. 7.
The memory 720 is a computer-readable storage medium, and may be used to store a software program, a computer-executable program, and modules, such as program instructions/modules (e.g., the IP address list obtaining module 510 and the IP address adding module 520) corresponding to the network device discovery method in the embodiment of the present application. The processor 710 executes various functional applications of the electronic device and data processing, i.e., implements the network device discovery method described above, by running software programs, instructions, and modules stored in the memory 720.
Memory 720 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 720 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 examples, memory 720 may further include memory remotely located relative to processor 710, which may be connected to the electronic device 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 input device 730 may be used to receive input character information and to generate key signal inputs related to user settings and function control of the electronic device. The output device 740 may include a display device such as a display screen.
Example eight
An eighth embodiment of the present application also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a network device discovery method, applied to a network server, the method comprising: sending an internet protocol address (IP) address list query instruction to at least two network management ends, and receiving an IP address list of network equipment of a self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different; and comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment.
The embodiment of the application also provides another storage medium containing computer executable instructions, which when executed by a computer processor, are used for executing a network device discovery method, applied to a network management end, and the method comprises the following steps: acquiring an IP address list query instruction sent by a network server; the IP address list of the network equipment of the network segment managed by the network server is fed back to the network server, so that the network server compares the IP address list fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment; wherein, the network segments managed by different network management terminals are different.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present application is not limited to the method operations described above, and may also perform the related operations in the network device discovery method provided in any embodiment of the present application.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, etc., and include several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present application.
It should be noted that, in the above-mentioned embodiments of the search apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.
Claims (8)
1. The network equipment discovery method is characterized by being applied to a network server and comprising the following steps:
Sending an internet protocol address (IP) address list query instruction to at least two network management ends, and receiving an IP address list of network equipment of a self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different; the IP address list is generated by the network manager based on the following manner: acquiring a notification message which is sent by network equipment in a managed network segment based on a simple network management protocol SNMP and comprises IP address information; extracting IP address list information from the notification message and storing the information in a device information base;
Comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment;
The method further comprises the steps of:
Monitoring association information of each network device in a locally stored network device IP address, wherein the association information comprises at least one of a device name, a serial number and a device model;
if new association information exists under the same IP address, establishing a mapping relation between the new association information and the corresponding IP address;
Determining newly added network equipment in the network equipment cluster with the same IP address according to the mapping relation;
the method further comprises the steps of:
acquiring the association information of the newly-added network equipment, wherein the association information comprises at least one of equipment name, serial number and equipment model;
Establishing a mapping relation between the association information and the IP address corresponding to the newly-added network equipment;
and determining the network equipment clusters with the same IP address according to the mapping relation.
2. The method of claim 1, wherein comparing the list of corresponding IP addresses of each network manager with the IP addresses of the network devices stored locally at the network server comprises:
Performing duplication removal on the IP addresses in each IP address list to obtain IP addresses to be analyzed;
And taking the IP address to be analyzed which does not exist in the IP addresses of the network devices stored locally by the network server as the IP address of the newly added network device.
3. The network equipment discovery method is characterized by being applied to a network management end and comprising the following steps of:
acquiring an IP address list query instruction sent by a network server;
the IP address list of the network equipment of the network segment managed by the network server is fed back to the network server, so that the network server compares the IP address list fed back by different network management ends with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment;
wherein, the network segments managed by different network management terminals are different;
The list of IP addresses is generated based on the following:
Acquiring a notification message which is sent by network equipment in a managed network segment based on a simple network management protocol SNMP and comprises IP address information;
Extracting IP address list information from the notification message and storing the information in a device information base;
The method further comprises the steps of:
responding to an associated information query instruction of network equipment to be queried, and acquiring associated information of the network equipment to be queried;
The association information of the network equipment to be queried is fed back to the network service end, so that the network service end establishes a mapping relation corresponding to the association information and the network equipment to be queried and is used for determining newly added network equipment in a network equipment cluster; wherein the association information includes at least one of a device name, a serial number, and a device model number; the network server side obtains the association information of the newly-added network equipment, wherein the association information comprises at least one of equipment name, serial number and equipment model; establishing a mapping relation between the association information and the IP address corresponding to the newly-added network equipment; and determining the network equipment clusters with the same IP address according to the mapping relation.
4. The method of claim 3, wherein the obtaining the association information of the network device to be queried comprises:
Sending an information inquiry command to the network equipment to be inquired based on SNMP;
And acquiring the equipment identification information returned by the network equipment to be queried based on the SNMP, and acquiring the association information of the equipment to be queried.
5. A network device discovery apparatus, configured at a network server, comprising:
the IP address list acquisition module is used for sending an Internet protocol address IP address list query instruction to at least two network management ends and receiving an IP address list of the network equipment of the self-management network segment fed back by the corresponding network management end; wherein, the network segments managed by different network management terminals are different; the list of IP addresses is generated based on the following: acquiring a notification message which is sent by network equipment in a managed network segment based on a simple network management protocol SNMP and comprises IP address information; extracting IP address list information from the notification message and storing the information in a device information base;
the IP address adding module is used for comparing the IP address list corresponding to each network management end with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment;
The apparatus further comprises:
the system comprises an associated information monitoring module, a network equipment management module and a network equipment management module, wherein the associated information monitoring module is used for monitoring associated information of each network equipment in a locally stored network equipment IP address, and the associated information comprises at least one of equipment name, serial number and equipment model;
The mapping relation increasing module is used for establishing a mapping relation between the new association information and the corresponding IP address if the new association information exists under the same IP address;
a stacking device adding module, configured to determine, according to the mapping relationship, newly added network devices in a network device cluster having the same IP address;
the association information acquisition module is used for acquiring association information of the newly-added network equipment, wherein the association information comprises at least one of equipment name, serial number and equipment model;
the mapping relation establishing module is used for establishing a mapping relation between the association information and the IP address corresponding to the newly-added network equipment;
and the equipment cluster determining module is used for determining the network equipment clusters with the same IP address according to the mapping relation.
6. A network device discovery apparatus, configured at a network management end, comprising:
The query instruction acquisition module is used for acquiring an IP address list query instruction sent by the network server;
the IP address list feedback module is used for feeding back the IP address list of the network equipment of the network segment managed by the network server side to the network server side so that the network server side compares the IP address list fed back by different network management sides with the locally stored IP addresses of the network equipment to obtain the IP address of the newly added network equipment;
wherein, the network segments managed by different network management terminals are different;
The list of IP addresses is generated based on the following:
Acquiring a notification message which is sent by network equipment in a managed network segment based on a simple network management protocol SNMP and comprises IP address information;
Extracting IP address list information from the notification message and storing the information in a device information base;
The apparatus further comprises:
the association information query module is used for responding to an association information query instruction of the network equipment to be queried and acquiring association information of the network equipment to be queried;
The mapping relation feedback module is used for feeding back the association information of the network equipment to be queried to the network server side so that the network server side establishes a mapping relation corresponding to the association information and the network equipment to be queried and is used for determining newly added network equipment in a network equipment cluster; wherein the association information includes at least one of a device name, a serial number, and a device model number; the network server side obtains the association information of the newly-added network equipment, wherein the association information comprises at least one of equipment name, serial number and equipment model; establishing a mapping relation between the association information and the IP address corresponding to the newly-added network equipment; and determining the network equipment clusters with the same IP address according to the mapping relation.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the network device discovery method of any one of claims 1-2 when the program is executed by the processor; and/or implementing a network device discovery method according to any of claims 3-4.
8. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a network device discovery method according to any of claims 1-2; and/or implementing the network device discovery method of any of claims 3-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210843161.1A CN115242595B (en) | 2022-07-18 | 2022-07-18 | Network device discovery method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210843161.1A CN115242595B (en) | 2022-07-18 | 2022-07-18 | Network device discovery method, device, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115242595A CN115242595A (en) | 2022-10-25 |
CN115242595B true CN115242595B (en) | 2024-08-06 |
Family
ID=83673436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210843161.1A Active CN115242595B (en) | 2022-07-18 | 2022-07-18 | Network device discovery method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115242595B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101257406A (en) * | 2008-04-14 | 2008-09-03 | 中兴通讯股份有限公司 | Method and system for discovering net elements |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5185860A (en) * | 1990-05-03 | 1993-02-09 | Hewlett-Packard Company | Automatic discovery of network elements |
US7307962B2 (en) * | 2001-03-02 | 2007-12-11 | Hewlett-Packard Development Company, L.P. | System for inference of presence of network infrastructure devices |
US8676923B2 (en) * | 2005-03-08 | 2014-03-18 | International Business Machines Corporation | Use of discovery scanning and method of IP only communication to identify owners and administrators of network attached devices |
CN101083557B (en) * | 2007-06-29 | 2010-05-26 | 中兴通讯股份有限公司 | A Method of IP Network Cluster Management Based on SNMP |
CN101478419B (en) * | 2008-01-03 | 2011-04-20 | 中兴通讯股份有限公司 | Network equipment management method and system thereof |
CN101345657B (en) * | 2008-08-28 | 2012-03-07 | 中兴通讯股份有限公司 | Method and system for cluster management of multiple network elements based on simple network management protocol |
CN101404587B (en) * | 2008-11-04 | 2011-12-21 | 中国电信股份有限公司 | Proxy equipment management method based on simple network management protocol and equipment thereof |
CN101635732B (en) * | 2009-08-27 | 2013-06-05 | 迈普通信技术股份有限公司 | Network management system integrated with IP network and cluster network as well as method thereof |
US9455872B2 (en) * | 2010-12-31 | 2016-09-27 | Open Invention Network, Llc | Method and apparatus of discovering and monitoring network devices |
CN105450442B (en) * | 2015-11-06 | 2019-02-15 | 广东电网有限责任公司电力科学研究院 | A kind of network topology investigation method and its system |
CN110932906A (en) * | 2019-12-02 | 2020-03-27 | 合肥城市云数据中心股份有限公司 | Data center network topology structure discovery method based on SNMP technology and topology structure discovery system thereof |
CN111949396B (en) * | 2020-07-28 | 2024-08-20 | 深圳供电局有限公司 | Network equipment monitoring method and system and computer readable storage medium thereof |
-
2022
- 2022-07-18 CN CN202210843161.1A patent/CN115242595B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101257406A (en) * | 2008-04-14 | 2008-09-03 | 中兴通讯股份有限公司 | Method and system for discovering net elements |
Also Published As
Publication number | Publication date |
---|---|
CN115242595A (en) | 2022-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112199419B (en) | A distributed time series database, storage method, device and storage medium | |
US11586673B2 (en) | Data writing and reading method and apparatus, and cloud storage system | |
CN108234170B (en) | Monitoring method and device for server cluster | |
CN108696581B (en) | Distributed information caching method and device, computer equipment and storage medium | |
CN112506670B (en) | Multi-node automatic operation and maintenance task processing method, system and storage medium | |
CN111078504A (en) | Distributed call chain tracking method and device, computer equipment and storage medium | |
CN107800565B (en) | Inspection method, inspection device, inspection system, computer equipment and storage medium | |
US9454575B2 (en) | Processing a metric of a component of a software-defined network | |
CN109714188B (en) | Configuration data management method, device and storage medium based on Zookeeper | |
CN104486125A (en) | Backup method and device of configuration files | |
CN107451254B (en) | Method for generating unique identifier of database table data | |
CN111404978B (en) | Data storage method and cloud storage system | |
CN103716384A (en) | Method and device for realizing cloud storage data synchronization in cross-data-center manner | |
CN110336752B (en) | Method and system for improving local broadcast push efficiency | |
CN113946583A (en) | Primary key generation method and device | |
CN111104250B (en) | Method, apparatus and computer readable medium for data processing | |
CN110990415A (en) | Data processing method and device, electronic equipment and storage medium | |
CN110798358B (en) | Distributed service identification method and device, computer readable medium and electronic equipment | |
CN113765690A (en) | Cluster switching method, system, device, terminal, server and storage medium | |
CN102118274A (en) | State monitoring method, device and system | |
CN110290163B (en) | Data processing method and device | |
CN110798492B (en) | Data storage method and device and data processing system | |
CN115242595B (en) | Network device discovery method, device, electronic device and storage medium | |
CN114880717A (en) | Data archiving method and device | |
CN112866011B (en) | Method, device, equipment and medium for determining network topology structure |
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 |