CN114745249B - Method for generating management information base and electronic equipment - Google Patents
Method for generating management information base and electronic equipment Download PDFInfo
- Publication number
- CN114745249B CN114745249B CN202210334310.1A CN202210334310A CN114745249B CN 114745249 B CN114745249 B CN 114745249B CN 202210334310 A CN202210334310 A CN 202210334310A CN 114745249 B CN114745249 B CN 114745249B
- Authority
- CN
- China
- Prior art keywords
- oid
- object description
- target
- library
- target network
- 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
Images
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/0213—Standardised network management protocols, e.g. simple network management protocol [SNMP]
-
- 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/0893—Assignment of logical groups to network elements
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application relates to the technical field of network equipment management, and provides a method for generating a management information base, which comprises the following steps: acquiring a first OID of target network equipment; inquiring an object description corresponding to the first OID in a public library; when the object description corresponding to the first OID is queried in the public library, writing the object description corresponding to the first OID into the MIB of the target network equipment; when the object description corresponding to the first OID is not queried in the public library, querying the object description corresponding to the first OID in the target private library; when the object description corresponding to the first OID is queried in the target private library, the object description corresponding to the first OID is written into the MIB of the target network device, wherein the target private library contains the OID and the object description of the network device belonging to the same manufacturer. The method can enable the SNMP network management system to comprehensively monitor and manage the target network equipment.
Description
Technical Field
The present disclosure relates to the field of network device management technologies, and in particular, to a method for generating a management information base and an electronic device.
Background
As is well known, in a network management system based on a simple network management protocol (Simple Network Management Protocol, SNMP), i.e. an SNMP network management system, a plurality of managed data variables of a managed network device are each abstracted into a plurality of managed objects, which constitute a management information base (Management Information Base, MIB), wherein each managed object in the MIB has a unique corresponding object identifier (Object Identifier, OID), and the SNMP network management system manages each managed object through the OID. For an unknown network device (i.e., a target network device) newly added in the network, the SNMP network management system must know the MIB of the target network device to manage the target network device; however, in most cases, MIB libraries of network devices of different manufacturers and different models are not provided externally, so that the SNMP network management system cannot fully monitor and manage the target network device.
Therefore, how to make the SNMP network management system comprehensively monitor and manage the target network device is a current urgent problem to be solved.
Disclosure of Invention
The application provides a method and electronic equipment for generating a management information base, which can enable an SNMP network management system to comprehensively monitor and manage target network equipment.
In a first aspect, a method for generating a management information base is provided, including: acquiring a first OID of target network equipment; querying object descriptions corresponding to the first OID in a public library, wherein the public library comprises OIDs and object descriptions of network devices belonging to a plurality of manufacturers; when the object description corresponding to the first OID is queried in the public library, writing the object description corresponding to the first OID into the MIB of the target network equipment; when the object description corresponding to the first OID is not queried in the public library, querying the object description corresponding to the first OID in a target private library; when the object description corresponding to the first OID is queried in the target private library, the object description corresponding to the first OID is written into the MIB of the target network device, wherein the target private library contains the OID and the object description of the network device belonging to the same manufacturer.
The above method may be performed by an electronic device or a chip in an electronic device. The public library contains common object descriptions, but lacks some specific object descriptions (such as the manufacturer's private object description), and the target private library contains specific object descriptions that complement the public library. The electronic equipment firstly inquires the public library, and obtains the needed object description with high probability, so that the MIB of the target network equipment can be quickly generated; when the required object description is not found in the public library, the electronic equipment queries in the target private library again, so that the SNMP network management system can obtain the required object description, and the SNMP network management system can be ensured to comprehensively monitor and manage the running condition of the target network equipment.
Optionally, the querying the object description corresponding to the first OID in the target private library includes: determining the target private library from a plurality of private libraries according to the manufacturer of the first OID; and inquiring the object description corresponding to the first OID in the target private library according to the equipment type and/or the communication protocol version number of the target network equipment.
In this embodiment, when the electronic device queries that the plurality of private libraries each contain the object description corresponding to the first OID according to the first OID, the electronic device determines the target private library according to the manufacturer corresponding to the first OID, and then determines the object description corresponding to the first OID according to the device type and/or the communication protocol version number. Compared with the method for directly inquiring the object description corresponding to the first OID from the plurality of private libraries, the method for inquiring the object description has the advantages that the number of the inquired objects is small, and the inquiring efficiency is higher.
Optionally, the querying, in the target private library, the object description corresponding to the first OID according to the device type and/or the communication protocol version number of the target network device includes: and when the target private library contains a plurality of object descriptions, and when the device type corresponding to the plurality of object descriptions is the same as the device type of the target network device, inquiring the object description corresponding to the first OID from the plurality of object descriptions according to the communication protocol version number of the target network device.
In this embodiment, when the electronic device cannot determine which of the plurality of object descriptions is the object description corresponding to the first OID according to the device type, the object description corresponding to the first OID may be determined from the plurality of object descriptions through the communication protocol version number; compared with the mode that the electronic equipment directly determines the object description corresponding to the first OID through one side, the electronic equipment queries the object description corresponding to the first OID in multiple aspects (such as equipment type and communication protocol version number), the number of the queried objects is less, and the query efficiency is higher.
Optionally, the querying, in the target private library, the object description corresponding to the first OID according to the device type and/or the communication protocol version number of the target network device includes: and when the target private library contains a plurality of object descriptions, and when the communication protocol version numbers corresponding to the plurality of object descriptions are the same as the communication protocol version numbers of the target network equipment, inquiring the object description corresponding to the first OID from the plurality of object descriptions according to the equipment type of the target network equipment.
In this embodiment, when the electronic device cannot determine which of the plurality of object descriptions is the object description corresponding to the first OID according to the communication protocol version number, the object description corresponding to the first OID may be determined from the plurality of object descriptions by the device type; compared with the mode that the electronic equipment directly determines the object description corresponding to the first OID through one side, the electronic equipment queries the object description corresponding to the first OID in multiple aspects (such as equipment type and communication protocol version number), the number of the queried objects is less, and the query efficiency is higher.
Optionally, the querying, in the target private library, the object description corresponding to the first OID according to the device type and/or the communication protocol version number of the target network device further includes: and when the object description corresponding to the first OID is not queried in the object descriptions, generating prompt information, wherein the prompt information is used for prompting that the object description of the first OID is not queried.
In this embodiment, when the object description corresponding to the first OID cannot be determined from the multiple object descriptions according to the device type and/or the communication protocol version number, the electronic device may generate a prompting message to prompt a user to perform manual analysis, so as to ensure that the SNMP network management system can obtain the required object description, and thus ensure that the SNMP network management system comprehensively monitors and manages the operation condition of the target network device.
Optionally, the public library is: RFC standard documents.
In a second aspect, there is provided an electronic device comprising a processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program from the memory, causing the electronic device to perform the method of any of the first aspects.
In a third aspect, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the method of any one of the first aspects.
Advantageous effects in the second and third aspects of the present application see the advantageous effects of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for generating a management information base according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a method for generating a management information base according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
As is well known, SNMP network management systems require knowledge of MIB libraries of each network device in a management network for each network device. For an unknown network device (i.e., a target network device) newly added in the network, the SNMP network management system cannot monitor and manage the target network device because the SNMP network management system does not have the MIB of the target network device. At present, in most cases, MIB libraries of network devices of different manufacturers and different models are not provided externally, and the SNMP network management system can only search the object description corresponding to the partial OID of the newly added unknown network device (i.e. the target network device) through the public library, but the object description corresponding to other OID of the target network device except the object description corresponding to the partial OID queried by the public library cannot be obtained, so that the SNMP network management system cannot better manage the target network device. Therefore, how to better manage the target network device is a problem that needs to be solved currently.
The present application is described in further detail below with reference to the drawings and specific examples.
Fig. 1 is a flow chart of a method for generating a management information base, which may be performed by an electronic device or a chip on the electronic device. The method is suitable for some application scenes needing to know the MIB library of the network equipment. The method comprises the following steps:
s101, acquiring a first OID of target network equipment.
Illustratively, the target network device generally refers to network devices that are not aware of the MIB; the electronic equipment extracts all OIDs of the target network equipment by using a snmpwalk tool; the OID extracted by the snmpwalk tool only has a path and a data value and does not have an object description corresponding to each OID; the first OID is any one of all OIDs of the target network device. For example, the five OIDs of the target network device are extracted by using the snmpflk tool as follows: 1.3.6.1.2.1.1, 1.3.6.1.2.1.2, 1.3.6.1.2.1.3, 1.3.6.1.2.1.4 and 1.3.6.1.2.1.5.
S102, inquiring object description corresponding to the first OID in a public library, wherein the public library comprises OIDs and object description of network devices belonging to a plurality of manufacturers.
The electronic device, after extracting all the OIDs of the target network device, searches the public library for the object description corresponding to each OID in all the OIDs. The public library is that a plurality of manufacturers make unified agreements on the OID and the corresponding object description of part of the network equipment for other manufacturers in the industry to use. Other manufacturers may employ OIDs already specified in the common library when producing network devices (e.g., target network devices); for OIDs not specified in public libraries, individual manufacturers can design themselves. The public library includes: RF C standard documents, which are also called request for comments (Request For Comments, RF C) standard documents, are used for recording information about the internet, for example, basic internet communication protocols are described in detail in the RFC standard documents. The above object description refers to the names of specific functions and descriptions of specific functions of the target network device corresponding to the OID.
For example, the electronic device extracts all of the OIDs of the target network device 6 using the snmpwalk tool, and the 6 OIDs are as follows: 1.3.6.1.2.1.1,1.3.6.1.2.1.2,1.3.6.1.2.1.3,1.3.6.1.2.1.4,1.3.6.1.2.3.1 and 1.3.6.1.2.3.2. The electronic equipment traverses and searches the 6 OIDs in the RFC standard file, and finally finds four OIDs and corresponding object description; the four OIDs and corresponding objects are described as follows: the object description corresponding to 1.3.6.1.2.1.1 is a host (name) and a host related description (description), the object description corresponding to 1.3.6.1.2.1.2 is a network interface (name) and a network interface related description (description), the object description corresponding to 1.3.6.1.2.1.3 is IP address information (name) and an IP address information related description (description), and the object description corresponding to 1.3.6.1.2.1.4 is protocol software (name) and a protocol software related description (description). The object descriptions corresponding to the remaining 2 OIDs in the target network device do not appear in the public library, and at this time, the electronic device may search for the corresponding object descriptions in some collected private libraries.
And S103, when the object description corresponding to the first OID is queried in the public library, writing the object description corresponding to the first OID into the MIB of the target network equipment.
The MIB of the target network device is used for storing all OIDs of the target network device and object descriptions corresponding to all OIDs. The SNMP management system may monitor and manage the target network device by accessing the MIB of the target device. And the electronic equipment traverses and searches all the OIDs of the target network equipment in the public library. The first OID is any one of all OIDs. And the electronic equipment inquires the object description corresponding to the first OID in the public library according to the first OID. When the electronic equipment searches the object description corresponding to the first OID in the public library, the electronic equipment writes the first OID into the MIB of the target network equipment. For example, the electronic device finds the following two OIDs and corresponding object descriptions in the public library: 1.3.6.1.2.1.1 is a host (name) and host-related description (description), 1.3.6.1.2.1.2 is a network interface (name) and network interface-related description (description); the electronic device writes the two OIDs and the corresponding object descriptions thereof into the MIB of the target network device.
S104, when the object description corresponding to the first OID is not queried in the public library, querying the object description corresponding to the first OID in the target private library; when the object description corresponding to the first OID is queried in the target private library, the object description corresponding to the first OID is written into the MIB of the target network device, wherein the target private library contains the OID and the object description of the network device belonging to the same manufacturer.
For example, since only the OID and the corresponding object description that are partially common to the network device are stored in the public library, as the functions of the target network device are diversified, the target network devices produced by different manufacturers may have some OIDs that are not recorded in the public library. The private libraries of some manufacturers may be queried for partial OIDs that are not recorded in the public libraries. After the electronic device traverses all the OIDs of the target network device in the public library, one part of the OIDs inquire the corresponding object description in the public library, and the other part of the OIDs do not inquire the corresponding object description in the public library. At this time, the electronic device queries another part of OID from the target private library.
The manufacturer of the network equipment corresponding to the target private library is the same as the manufacturer of the target network equipment; for example, the target private library is MIB of the network device M1 produced by the manufacturer W; the target network device is also a network device manufactured by the manufacturer W, where the network device M1 and the target network device may be the same or different, for example, the network device M1 is a switch manufactured by the manufacturer W, the target network device is a router manufactured by the manufacturer W, and an object description corresponding to a first OID of the router may also be queried in an MIB library of the switch manufactured by the manufacturer W, where the first OID is any one of all OIDs of the router.
For example, the target network device is a switch X1 produced by a manufacturer a, the target private base is a MIB of a switch Y1 produced by the manufacturer a, and the first OID is any one of all OIDs of the switch. The first OID is 1.3.6.1.2.3.1, and the electronic device searches the corresponding object description in the public library according to 1.3.6.1.2.3.1 in a traversing way, but does not search the corresponding object description; at this time, the electronic device 1.3.6.1.2.3.1 queries the MIB of the switch X for the corresponding object description, and the object description corresponding to 1.3.6.1.2.3.1 is the frame forwarding rate (name) and the explanation (description) related to the frame forwarding rate; the electronic device will write the first OID (i.e., 1.3.6.1.2.3.1) and its corresponding object description (i.e., frame forwarding rate and its corresponding associated interpretation) into the MIB of the target network device.
Optionally, querying the object description corresponding to the first OID in the target private library includes: determining a target private library from a plurality of private libraries according to the manufacturer of the first OID; and inquiring the object description corresponding to the first OID in the target private library according to the equipment type and/or the communication protocol version number of the target network equipment.
For example, after the electronic device traverses and queries all OIDs of the target network device in the public library, the manufacturer of the target network device, the device type of the target network device and the communication protocol version number of the target network device are determined according to the partial OIDs queried in the public library, wherein the communication protocol version number of the target network device refers to the version number of the SNMP protocol adopted by the target network device, and the current SNMP protocol is divided into 3 versions, namely version1 (i.e. version 1), version2c (i.e. version2 c) and version3 (i.e. version 3). Since some of the OIDs in the target network device have queried the corresponding object description in the public library, the public library records the OID of which device type (such as a switch, a router, a firewall, etc.) each OID belongs to, and the manufacturer and the communication protocol version number corresponding to the device type, in addition to the own name and the own function description of each OID.
The electronic device queries a private library (i.e., a target private library) from among a plurality of known private libraries according to the manufacturer of the target network device that is the same as the manufacturer of the target network device. After the electronic device determines the target private library, the electronic device queries the object description corresponding to the first OID in the target private library according to the device type, or the communication protocol version number, or the device type and the communication protocol version number of the target network device. For example, three private libraries a, B, and C are known, where private library a is MIB of a router produced by manufacturer X1, private library B is MIB of a firewall produced by manufacturer X2, private library C is MIB of a switch produced by manufacturer X1, and the target network device is a switch produced by manufacturer X1; the electronic equipment determines that the target private libraries are a private library A and a private library C according to a manufacturer X1 of the target network equipment; the electronic equipment traverses and inquires the corresponding object description of the first OID in the private library A and the private library C respectively; if the electronic equipment only searches the object description corresponding to the first OID in one private library of the private library A and the private library C, the electronic equipment writes the first OID and the object description corresponding to the first OID into the MIB of the target network equipment; if the electronic equipment respectively searches the object description corresponding to the first OID in the private library A and the private library C, the electronic equipment determines to write the object description corresponding to the first OID inquired in the private library C into the MIB of the target network equipment according to the equipment type (namely the switch) of the target network equipment; at this time, the electronic device writes the first OID and the object description corresponding to the first OID into the MIB of the target network device.
For another example, three private libraries A1, A2, and A3 are known, where the private library A1 is MIB of a router produced by the manufacturer K1, and the version number of the communication protocol used by the router is version2c; the private library A2 is the MIB of the router produced by the manufacturer K1, and the version number of the communication protocol used by the router is version1; the private library A3 is MIB of the switch manufactured by the manufacturer K2, and the communication protocol version number used by the switch is version2c; the target network equipment is a router produced by a manufacturer K1, and the version number of a communication protocol used by the router is version1; the electronic equipment determines that the target private library is a private library A1 and a private library A2 according to a manufacturer K1 of the target network equipment; the electronic equipment traverses and inquires the corresponding object description of the first OID in the private library A1 and the private library A2 respectively; if the electronic equipment only finds the object description corresponding to the first OID in one private library of the private libraries A1 and the private library A2, the electronic equipment writes the first OID and the object description corresponding to the first OID into the MIB of the target network equipment; if the electronic device searches the object description corresponding to the first OID in the private library A1 and the private library A2 respectively, the electronic device queries in which private library the object description corresponding to the first OID should be written into the MIB of the target network device according to the device type (i.e., router) of the target network device; because the device types (i.e. routers) of the target network device are the same as the device types corresponding to the private library A1 and the private library A2, the electronic device determines to write the object description corresponding to the first OID queried in the private library A2 into the MIB of the target network device according to the communication protocol version number (i.e. version 1) of the target network device; at this time, the electronic device writes the first OID and the object description corresponding to the first OID into the MIB of the target network device.
In this embodiment, when the electronic device queries that the plurality of private libraries each contain the object description corresponding to the first OID according to the first OID, the electronic device determines the target private library according to the manufacturer corresponding to the first OID, and then determines the object description corresponding to the first OID according to the device type and/or the communication protocol version number. Compared with the method for directly inquiring the object description corresponding to the first OID from the plurality of private libraries, the method for inquiring the object description has the advantages that the number of the inquired objects is small, and the inquiring efficiency is higher.
Optionally, querying the object description corresponding to the first OID in the target private library according to the device type and/or the communication protocol version number of the target network device includes: when the target private library contains a plurality of object descriptions, and when the device type corresponding to the plurality of object descriptions is the same as the device type of the target network device, the object description corresponding to the first OID is queried from the plurality of object descriptions according to the communication protocol version number of the target network device.
Illustratively, the target private library is a MIB produced by a manufacturer of OIDs of the same network device and its corresponding object description. For example, the target private library a is known to be MIB of routers of two different communication protocol version numbers produced by manufacturer K, wherein the communication protocol version number used by the first router includes version2c; the version number of the communication protocol used by the second router is version1; the target network device is a router produced by a manufacturer K, and the version number of a communication protocol used by the router is version2c; the electronic equipment traverses and inquires the corresponding object description of the first OID in the private library A; the electronic equipment searches object descriptions corresponding to two first OIDs in the private library A, wherein one object description is an object description N1, the other object description is an object description N2, the object description N1 belongs to the object description corresponding to the first OID under the first router, and the object description N2 belongs to the object description corresponding to the first OID under the second router; since the manufacturer K1 and the device type of the target network device are the same as the manufacturer of the target private library (i.e., manufacturer K) and the device type corresponding to the target private library (i.e., router), the electronic device determines to write the object description N1 into the MIB of the target network device according to the communication protocol version number (i.e., version2 c) of the target network device; at this time, the electronic device writes the first OID and the corresponding object description N1 into the MIB of the target network device.
The target private library comprises a plurality of private libraries, and the electronic device queries a plurality of object descriptions corresponding to a certain OID from the target private library. For example, the target private library comprises a private library B1, a private library B2 and a private library B3, wherein the private library B1 is a MIB of a router produced by a manufacturer H1, and the version number of a communication protocol used by the router is version2c; the private library B2 is a MIB of a router produced by the manufacturer H1, and the version number of a communication protocol used by the router is version1; the private library B3 is MIB of the router produced by the manufacturer H1, and the communication protocol version number used by the switch is version3; the target network device is a router produced by the manufacturer H1, and the version number of a communication protocol used by the router is version3; the electronic equipment traverses and inquires the corresponding object description of the first OID in the private library B1, the private library B2 and the private library B3 respectively; the electronic equipment searches three object descriptions corresponding to the first OID in the private library B1, the private library B2 and the private library B3, wherein the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B1 is P1, the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B2 is P2, and the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B3 is P3; because the device types (i.e. routers) of the target network device are the same as the device types corresponding to the private library B1, the private library B2 and the private library B3, the electronic device determines to write the object description P3 corresponding to the first OID queried in the private library B3 into the MIB of the target network device according to the communication protocol version number (i.e. version 3) of the target network device; at this time, the electronic device writes the first OID and the object description P3 corresponding to the first OID into the MIB of the target network device.
In this embodiment, when the electronic device cannot determine which of the plurality of object descriptions is the object description corresponding to the first OID according to the device type, the object description corresponding to the first OID may be determined from the plurality of object descriptions through the communication protocol version number; compared with the mode that the electronic equipment directly determines the object description corresponding to the first OID through one side, the electronic equipment queries the object description corresponding to the first OID in multiple aspects (such as equipment type and communication protocol version number), the number of the queried objects is less, and the query efficiency is higher.
Optionally, querying the object description corresponding to the first OID in the target private library according to the device type and/or the communication protocol version number of the target network device includes: when the target private library contains a plurality of object descriptions, and when the communication protocol version numbers corresponding to the plurality of object descriptions are the same as the communication protocol version numbers of the target network device, the object description corresponding to the first OID is queried from the plurality of object descriptions according to the device type of the target network device.
Illustratively, the target private library is a MIB produced by a manufacturer of OIDs and their corresponding object descriptions of multiple network devices using the same communication protocol version number. For example, the target private library a is known to be MIB of a router and a firewall, which are both version3 in communication protocol version numbers produced by the manufacturer K; the target network device is a firewall produced by a manufacturer K, and the version number of a communication protocol used by the firewall is version3; the electronic equipment traverses and inquires the corresponding object description of the first OID in the private library A; the electronic equipment searches object descriptions corresponding to two first OIDs in a private library A, wherein one object description is an object description M1, the other object description is an object description M2, the object description M1 belongs to the object description corresponding to the first OID under the router, and the object description M2 belongs to the object description corresponding to the first OID under the firewall; since the manufacturer K1 and the communication protocol version number of the target network device are the same as the manufacturer (i.e., manufacturer K) and the communication protocol version number (i.e., version 3) of the target private library, the electronic device determines to write the object description M2 into the MIB of the target network device according to the device type (i.e., firewall) of the target network device; at this time, the electronic device writes the first OID and the corresponding object description M2 into the MIB of the target network device.
The target private library comprises a plurality of private libraries, and the electronic device queries a plurality of object descriptions corresponding to a certain OID from the target private library. For example, the target private library comprises a private library B1 and a private library B2, wherein the private library B1 is a MIB of a router produced by a manufacturer H1, and the version number of a communication protocol used by the router is version2c; the private library B2 is the MIB of the switch produced by the manufacturer H1, and the communication protocol version number used by the switch is version2c; the target network device is a router produced by the manufacturer H1, and the version number of the communication protocol used by the router is version2c; the electronic equipment traverses and inquires the corresponding object description of the first OID in the private library B1 and the private library B2 respectively; the electronic equipment searches object descriptions corresponding to the two first OIDs in the private library B1 and the private library B2, wherein the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B1 is F1, and the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B2 is F2; because the communication protocol version number (i.e. version2 c) of the target network device is the same as the device types corresponding to the private base B1 and the private base B2, the electronic device determines to write the object description F1 corresponding to the first OID queried in the private base B1 into the MIB of the target network device according to the device type (i.e. router) of the target network device; at this time, the electronic device writes the first OID and the object description F1 corresponding to the first OID into the MIB of the target network device.
In this embodiment, when the electronic device cannot determine which of the plurality of object descriptions is the object description corresponding to the first OID according to the communication protocol version number, the object description corresponding to the first OID may be determined from the plurality of object descriptions by the device type; compared with the mode that the electronic equipment directly determines the object description corresponding to the first OID through one side, the electronic equipment queries the object description corresponding to the first OID in multiple aspects (such as equipment type and communication protocol version number), the number of the queried objects is less, and the query efficiency is higher.
Optionally, querying the object description corresponding to the first OID in the target private library according to the device type and/or the communication protocol version number of the target network device, and further includes: and when the object description corresponding to the first OID is not queried in the object descriptions, generating prompt information, wherein the prompt information is used for prompting that the object description of the first OID is not queried.
The target private library comprises a plurality of private libraries, and the electronic device queries a plurality of object descriptions corresponding to a certain OID from the target private library. For example, the target private library comprises a private library B1, a private library B2 and a private library B3, wherein the private library B1 is a MIB of a router produced by a manufacturer H1, and the version number of a communication protocol used by the router is version1; the private library B2 is a MIB of a router produced by the manufacturer H1, and the version number of a communication protocol used by the router is version1; the private library B3 is MIB of the router produced by the manufacturer H1, and the communication protocol version number used by the switch is version1; the target network equipment is a router produced by a manufacturer H1, and the version number of a communication protocol used by the router is version1; the electronic equipment traverses and inquires the corresponding object description of the first OID in the private library B1, the private library B2 and the private library B3 respectively; the electronic equipment searches three object descriptions corresponding to the first OID in the private library B1, the private library B2 and the private library B3, wherein the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B1 is D1, the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B2 is D2, and the object description corresponding to the first OID which is inquired by the electronic equipment from the private library B3 is D3; since the device type (i.e., router), manufacturer and communication protocol version numbers of the target network device are the same as the device types, manufacturer and communication protocol version numbers corresponding to the private library B1, the private library B2 and the private library B3, the electronic device cannot determine which object description should be written in the MIB of the target network device from the object description D1, the object description D2 and the object description D3, that is, the electronic device cannot determine the object description corresponding to the first OID from the plurality of object descriptions; at this time, the electronic device may generate a prompt message to inform the user that the electronic device does not query the object description corresponding to the first OID currently, and prompt the user to perform manual analysis. In this embodiment, when the object description corresponding to the first OID cannot be determined from the multiple object descriptions according to the device type and/or the communication protocol version number, the electronic device may generate a prompting message to prompt a user to perform manual analysis, so as to ensure that the SNMP network management system can obtain the required object description, and thus ensure that the SNMP network management system comprehensively monitors and manages the operation condition of the target network device.
In summary, the public repository contains common object descriptions, but lacks some specific object descriptions (e.g., private object descriptions of the manufacturer), and the target private repository contains specific object descriptions that complement the public repository. The electronic equipment firstly inquires the public library, and obtains the needed object description with high probability, so that the MIB of the target network equipment can be quickly generated; when the required object description is not found in the public library, the electronic equipment queries in the target private library again, so that the SNMP network management system can obtain the required object description, and the SNMP network management system can be ensured to comprehensively monitor and manage the running condition of the target network equipment.
For ease of understanding, the overall flow steps of the method for generating a management information base set forth in the present application are described below in conjunction with fig. 2. Industrial network devices include, but are not limited to, switches, routers, and firewalls. Take the example of the target network device being a router.
(1) The electronic device obtains all OIDs in the target network device (i.e., router) using a standard snmpwalk tool, e.g., the electronic device obtains all OIDs of the target network device as 1.3.6.1.2.1, … …, 1.3.6.1.2.1.1.
(2) The electronic device traverses and searches the object description corresponding to each OID in a public library (such as RFC standard file), and writes the object description corresponding to the first part of OID found in the public library into the MIB of the router, for example, the first part of OID is 1.3.6.1.2.1, 1.3.6.1.3.1, wherein the object description corresponding to 1.3.6.1.2.1 is a message protocol (name) and a message protocol related interpretation (description), and the object description corresponding to 1.3.6.1.3.1 is a transmission medium (name) and a transmission medium related interpretation (description).
(3) The electronic device searches the second part of OID which is not found in the public library for the object description corresponding to the second part of OID in the known plurality of private libraries, and writes the object description corresponding to the third part of OID which is found in the second part of OID into the MIB of the router, for example, the third part of OID is 1.4.1.5 and 1.4.1.2.3.1, wherein the object description corresponding to 1.4.1.5 is a protocol (name) and a protocol related explanation (description), and the object description corresponding to 1.4.1.2.3.1 is a switching rate (name) and a switching rate related explanation (description).
(4) After the electronic equipment processes all the OIDs in the step (2) and the step (3), if part of OIDs still exist in all the OIDs, the corresponding object description cannot be queried; at this time, the electronic device generates prompt information to prompt the user that the user has some OIDs incapable of inquiring the corresponding object description; at this time, the user can determine the object description corresponding to the partial OID through manual analysis.
Fig. 3 shows a schematic structural diagram of an electronic device provided in the present application. The dashed line in fig. 3 indicates that the unit or the module is optional. The electronic device 300 may be used to implement the methods described in the method embodiments described above. The electronic device 300 may be a server or a chip.
The electronic device 300 includes one or more processors 301, which one or more processors 301 may support the electronic device 300 to implement the method of the corresponding method embodiment of fig. 1. Processor 301 may be a general purpose processor or a special purpose processor. For example, the processor 301 may be a central processing unit (Central Processing Unit, CPU). The CPU may be used to control the electronic device 300, execute software programs, and process data of the software programs. The electronic device 300 may further comprise a communication unit 305 for enabling input (reception) and output (transmission) of signals.
For example, the electronic device 300 may be a chip, the communication unit 305 may be an input and/or output circuit of the chip, or the communication unit 305 may be a communication interface of the chip, which may be an integral part of the electronic device.
For another example, the communication unit 305 may be a transceiver of the electronic device 300, or the communication unit 305 may be a transceiver circuit of the electronic device 300.
The electronic device 300 may include one or more memories 302 having a program 304 stored thereon, the program 304 being executable by the processor 301 to generate instructions 303 such that the processor 301 performs the methods described in the method embodiments described above in accordance with the instructions 303. Optionally, the memory 302 may also have data stored therein. Alternatively, the processor 301 may also read data stored in the memory 302, which may be stored at the same memory address as the program 304, or which may be stored at a different memory address than the program 304.
The processor 301 and the memory 302 may be provided separately or may be integrated together, for example, on a System On Chip (SOC) of the electronic device.
The specific manner in which the processor 301 performs the method of generating the management information base may be found in the relevant description of the method embodiments.
It should be understood that the steps of the above-described method embodiments may be accomplished by logic circuitry in the form of hardware or instructions in the form of software in the processor 301. The processor 301 may be a CPU, digital signal processor (Digital Signal Processor, DSP), field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device such as discrete gates, transistor logic, or discrete hardware components.
The present application also provides a computer program product which, when executed by the processor 301, implements the method of any of the method embodiments of the present application.
The computer program product may be stored in the memory 302, for example, the program 304, and the program 304 is finally converted into an executable object file capable of being executed by the processor 301 through preprocessing, compiling, assembling, and linking.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a computer, implements the method of any of the method embodiments of the present application. The computer program may be a high-level language program or an executable object program.
The computer readable storage medium is, for example, memory 302. The memory 302 may be either volatile memory or nonvolatile memory, or the memory 302 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic random access memory (DynamicRAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DRRAM).
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes and technical effects of the apparatus and device described above may refer to corresponding processes and technical effects in the foregoing method embodiments, which are not described in detail herein.
In several embodiments provided in the present application, the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, some features of the method embodiments described above may be omitted, or not performed. The above-described apparatus embodiments are merely illustrative, the division of units is merely a logical function division, and there may be additional divisions in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the elements or the coupling between the elements may be direct or indirect, including electrical, mechanical, or other forms of connection.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may be modified or some technical features may be replaced with other technical solutions, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and all the modifications or replacements are included in the protection scope of the present application.
Claims (7)
1. A method of generating a management information base, the method comprising:
acquiring a first OID of target network equipment;
querying object descriptions corresponding to the first OID in a public library, wherein the public library comprises OIDs and object descriptions of network devices belonging to a plurality of manufacturers;
when the object description corresponding to the first OID is queried in the public library, writing the object description corresponding to the first OID into the MIB of the target network equipment;
when the object description corresponding to the first OID is not queried in the public library, determining a target private library from a plurality of private libraries according to the manufacturer of the first OID; inquiring an object description corresponding to the first OID in the target private library according to the equipment type and/or the communication protocol version number of the target network equipment; when the object description corresponding to the first OID is queried in the target private library, the object description corresponding to the first OID is written into the MIB of the target network device, wherein the target private library contains the OID and the object description of the network device belonging to the same manufacturer.
2. The method according to claim 1, wherein the querying the object description corresponding to the first OID in the target private library according to the device type and/or the communication protocol version number of the target network device comprises:
And when the target private library contains a plurality of object descriptions, and when the device type corresponding to the plurality of object descriptions is the same as the device type of the target network device, inquiring the object description corresponding to the first OID from the plurality of object descriptions according to the communication protocol version number of the target network device.
3. The method according to claim 1, wherein the querying the object description corresponding to the first OID in the target private library according to the device type and/or the communication protocol version number of the target network device comprises:
and when the target private library contains a plurality of object descriptions, and when the communication protocol version numbers corresponding to the plurality of object descriptions are the same as the communication protocol version numbers of the target network equipment, inquiring the object description corresponding to the first OID from the plurality of object descriptions according to the equipment type of the target network equipment.
4. A method according to claim 2 or 3, wherein the querying the target private library for the object description corresponding to the first OID according to the device type and/or the communication protocol version number of the target network device further comprises:
And when the object description corresponding to the first OID is not queried in the object descriptions, generating prompt information, wherein the prompt information is used for prompting that the object description of the first OID is not queried.
5. A method according to any one of claims 1 to 3, wherein the public library is: RFC standard documents.
6. An electronic device comprising a processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program from the memory, causing the electronic device to perform the method of any one of claims 1 to 5.
7. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, which, when being executed by a processor, causes the processor to perform the method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210334310.1A CN114745249B (en) | 2022-03-31 | 2022-03-31 | Method for generating management information base and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210334310.1A CN114745249B (en) | 2022-03-31 | 2022-03-31 | Method for generating management information base and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114745249A CN114745249A (en) | 2022-07-12 |
CN114745249B true CN114745249B (en) | 2023-06-20 |
Family
ID=82280031
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210334310.1A Active CN114745249B (en) | 2022-03-31 | 2022-03-31 | Method for generating management information base and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114745249B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744519A (en) * | 2005-08-18 | 2006-03-08 | 杭州华为三康技术有限公司 | Management method for obtaining equipment MIB support capability |
CN101582806A (en) * | 2009-06-17 | 2009-11-18 | 杭州华三通信技术有限公司 | Method for MIB management of multi-vendor equipment and device |
CN101815012A (en) * | 2009-02-20 | 2010-08-25 | 中兴通讯股份有限公司 | Method and device for acquiring performance data |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7664886B2 (en) * | 2006-09-08 | 2010-02-16 | Ricoh Co., Ltd. | System, method, and computer program product using an SNMP implementation to obtain vendor information from remote devices |
CN103457768B (en) * | 2013-08-26 | 2017-12-01 | 上海斐讯数据通信技术有限公司 | A kind of local network management system and method |
CN104506366B (en) * | 2014-12-29 | 2017-11-14 | 瑞斯康达科技发展股份有限公司 | A kind of method and apparatus in maintenance management information MIB storehouses |
-
2022
- 2022-03-31 CN CN202210334310.1A patent/CN114745249B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744519A (en) * | 2005-08-18 | 2006-03-08 | 杭州华为三康技术有限公司 | Management method for obtaining equipment MIB support capability |
CN101815012A (en) * | 2009-02-20 | 2010-08-25 | 中兴通讯股份有限公司 | Method and device for acquiring performance data |
CN101582806A (en) * | 2009-06-17 | 2009-11-18 | 杭州华三通信技术有限公司 | Method for MIB management of multi-vendor equipment and device |
Non-Patent Citations (2)
Title |
---|
基于SNMP的管理信息库(MIB)的研究;周晓芬;;科技广场(第01期);全文 * |
面向互联网服务的OID信息库研究与实现;阮晓龙;冯顺磊;;计算机与网络(第08期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114745249A (en) | 2022-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111930780B (en) | Data query method and system | |
US8392567B2 (en) | Discovering and identifying manageable information technology resources | |
US8589589B2 (en) | Method and system for creating an overlay structure for management information bases | |
US7707269B2 (en) | Interfacing between a command line interface-based application program and a remote network device | |
US11940778B2 (en) | Method of commissioning a field device in an industrial system network | |
CN111177043B (en) | Method, system, device and medium for accelerating reading of field replaceable unit information | |
CN112436964B (en) | Equipment adaptation method and network management device | |
US20090287800A1 (en) | Method, device and system for managing network devices | |
US10382387B2 (en) | OID configuration, resolution method, client, node, database and storage medium | |
CN108924215B (en) | Service discovery processing method and device based on tree structure | |
US11379530B2 (en) | Leveraging references values in inverted indexes to retrieve associated event records comprising raw machine data | |
CN101035133B (en) | Network management method, system and device | |
CN113704790A (en) | Abnormal log information summarizing method and computer equipment | |
US8880578B2 (en) | Hardware independent simple network management protocol based on a generic data collection scheme | |
US20030237081A1 (en) | Updating an application using database replication | |
CN114745249B (en) | Method for generating management information base and electronic equipment | |
CN110750690B (en) | Method and system for quickly searching monitoring index of management information base | |
KR101368500B1 (en) | Method for providing database history management and the database management system thereof | |
US7856344B2 (en) | Method for transforming overlapping paths in a logical model to their physical equivalent based on transformation rules and limited traceability | |
JP2003248635A (en) | Database accessing method and system in management information base of network management protocol | |
US20230308933A1 (en) | Data transmission method, related network node and storage medium | |
CN114826877B (en) | Asset alarm processing method, device, computer equipment and storage medium | |
CN112445851A (en) | Plug-in ORM framework implementation method and device, electronic equipment and storage medium | |
CN116016196A (en) | Method and system for constructing system architecture topology in real time | |
US20070299819A1 (en) | Resource discovery and enumeration in meta-data driven instrumentation |
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 |