CN105162615A - Snmp single-chip microcomputer implementing method - Google Patents
Snmp single-chip microcomputer implementing method Download PDFInfo
- Publication number
- CN105162615A CN105162615A CN201510426439.5A CN201510426439A CN105162615A CN 105162615 A CN105162615 A CN 105162615A CN 201510426439 A CN201510426439 A CN 201510426439A CN 105162615 A CN105162615 A CN 105162615A
- Authority
- CN
- China
- Prior art keywords
- snmp
- value
- length
- oid
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a snmp single-chip microcomputer implementing method. The method is characterized by dividing an object identifier OID in a dot manner from the top of the OID and enabling all MIB variables to start from a 1.3.6.1.2.1 identifier; converting the OID and a value to be transferred into a TLV format and the sending the TLV format by using a packaging algorithm; enabling the packaging to be performed from low addresses to high addresses and enabling the sending to be performed from high addresses to low addresses; at a data receiving end, enabling a de-packaging algorithm to separate the OID from the value, wherein when de-packaging is performed, whether a synchronization bit, an address, and CRC verification are correct are determined first, then analysis is performed according to a SNMP data format from front to back according to a length and values are assigned to corresponding variable values. The method achieves data packaging, sending, receiving and de-packing functions by using a single-chip microcomputer, improves the network management efficiency of a network administrator, timely finds out and solves network problems, plans network increase, and acquires network problems by using a SNMP to receive the notification messages and alarm event reports of network nodes.
Description
Technical field
The present invention relates to technical field of computer network management, be specifically related to a kind of chip microcontroller method of snmp.
Background technology
Simple Network Management Protocol (SNMP) is the network management standard based on TCP/IP protocol suite, is a kind of standard agreement of managing network node in an ip network.SNMP can make network manager improve network management usefulness, and Timeliness coverage also solves the growth of network problem and planning network.Notification message and alarm event report etc. that network manager can also receive network node by SNMP know network produced problem.
SNMP realizes the information interaction between managing process and agent process by definition get-request, get-next-request, set-request, get-response and trap five kinds of operations.When network normally works, SNMP can realize the functions such as statistics, configuration and test; And when network failure, various error detection occurs and restore funcitons can be realized.
Summary of the invention
The technical problem to be solved in the present invention is: the present invention is based on 5 kinds of operations that SNMP defines, and utilizes single-chip microcomputer to realize the group bag of data, transmission, reception conciliate packet function.Use single-chip microcomputer to do SNMP data processing, completing the group bag of data by expanding external RAM, sending, receive and unpacking.
The technical solution adopted in the present invention is:
A chip microcontroller method of snmp, object identifier OID starts with a separation from top, all mib variables are all from 1.3.6.1.2.1 mark; Anti-histamine release converts OID to TLV form with the value value that will transmit and sends; Group bag, from low address to high address, carries out from high address to low address during transmission; Wherein, in TLV form, T is data type, and L is byte number shared after data V conversion, and V is data value; At data receiver, unpack algorithm and OID and value are separated, first judge when unpacking that whether sync bit, address and CRC check be correct, then analyze according to SNMP data format from front to back according to length, and give corresponding variate-value assignment.
Described method specific implementation step is as follows:
1) in anti-histamine release, first data length conversion is carried out, it is the byte number after TLV form shared by V that length represents data transformations, if this value is less than 128, then represent length by a byte, if length is more than or equal to 128, need to represent length by multiple byte; Wherein first character joint first place puts 1, after byte number needed for 7 bit representation data, the physical length of byte representation data subsequently;
2) value transmitted in system, all with character style transmission, directly send 04H character types, 01H length byte, then the value that will send directly sends when responding;
3) public SNMP stem and get/set stem are added to Variable-Bindings part, composition SNMP layer, when being free from mistakes, only need moving hand on one side, while corresponding variate-value is assigned in the address of pointer indication, then SNMP is put into MAC layer, carry out the calculating of CRC check value, send to host computer;
4) unpack algorithm OID and value are separated, first judge when unpacking that whether sync bit, address and CRC check be correct, then analyze according to SNMP data format from front to back according to length, and give corresponding variate-value assignment.
The message format of described SNMP comprises: version, community, PDU type, request identifier, error state, error index, wherein:
Version field writes the version-1 of SNMP used;
Community is the plaintext password between managing process and agent process;
PDU field, according to the type of PDU, inserts a numeral in 0 ~ 4;
Request identifier is the integer value arranged by managing process, and agent process also will return this request identifier when sending get-response message;
A numeral in corresponding states 0 ~ 5 is inserted when error state is and is answered by agent process;
Error index field is an integer shifts, indicates when there being mistake to occur, and which parameter is mistake occur in.
Beneficial effect of the present invention is:
The present invention is based on 5 kinds of operations that SNMP defines, utilize single-chip microcomputer to realize the group bag of data, transmission, reception conciliate packet function, network manager is made to improve network management usefulness, Timeliness coverage also solves the growth of network problem and planning network, and the notification message and alarm event report etc. that can also receive network node by SNMP know network produced problem.
Accompanying drawing explanation
Fig. 1 is SNMP message format schematic diagram;
Fig. 2 is system realization flow figure;
Fig. 3 is for unpacking algorithm flow chart.
Embodiment
With reference to the accompanying drawings, by embodiment, the present invention is further described:
Embodiment 1:
A chip microcontroller method of snmp, object identifier OID starts with a separation from top, all mib variables are all from 1.3.6.1.2.1 mark; Anti-histamine release converts OID to TLV form with the value value that will transmit and sends; Group bag, from low address to high address, carries out from high address to low address during transmission; Wherein, in TLV form, T is data type, and L is byte number shared after data V conversion, and V is data value; At data receiver, unpack algorithm and OID and value are separated, first judge when unpacking that whether sync bit, address and CRC check be correct, then analyze according to SNMP data format from front to back according to length, and give corresponding variate-value assignment.
Embodiment 2:
As shown in Figure 2, on the basis of embodiment 1, described in the present embodiment, method specific implementation step is as follows:
1) in anti-histamine release, first data length conversion is carried out, it is the byte number after TLV form shared by V that length represents data transformations, if this value is less than 128, then represent length by a byte, if length is more than or equal to 128, need to represent length by multiple byte; Wherein first character joint first place puts 1, after byte number needed for 7 bit representation data, the physical length of byte representation data subsequently;
2) value transmitted in system, all with character style transmission, directly send 04H character types, 01H length byte, then the value that will send directly sends when responding;
3) public SNMP stem and get/set stem are added to Variable-Bindings part, composition SNMP layer, when being free from mistakes, only need moving hand on one side, while corresponding variate-value is assigned in the address of pointer indication, then SNMP is put into MAC layer, carry out the calculating of CRC check value, send to host computer;
4) unpack algorithm OID and value are separated, first judge when unpacking that whether sync bit, address and CRC check be correct, then analyze according to SNMP data format from front to back according to length, and give corresponding variate-value assignment, the whole process unpacked as shown in Figure 3.
Embodiment 3:
As shown in Figure 1, on the basis of embodiment 1 or 2, described in the present embodiment, the message format of SNMP comprises: version, community, PDU type, request identifier, error state, error index, wherein:
Version field writes the version-1 of SNMP used, namely for SNMPv1, then needs to insert 0 value;
Community is the plaintext password between managing process and agent process, usually write " public ";
PDU field, according to the type of PDU, inserts a numeral in 0 ~ 4;
Request identifier is the integer value arranged by managing process, and agent process also will return this request identifier when sending get-response message;
A numeral in corresponding states 0 ~ 5 is inserted when error state is and is answered by agent process;
Error index field is an integer shifts, indicates when there being mistake to occur, and which parameter is mistake occur in.
Above execution mode is only for illustration of the present invention; and be not limitation of the present invention; the those of ordinary skill of relevant technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all equivalent technical schemes also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (3)
1. a chip microcontroller method of snmp, is characterized in that: object identifier OID starts with a separation from top, and all mib variables are all from 1.3.6.1.2.1 mark; Anti-histamine release converts OID to TLV form with the value value that will transmit and sends; Group bag, from low address to high address, carries out from high address to low address during transmission; At data receiver, unpack algorithm and OID and value are separated, first judge when unpacking that whether sync bit, address and CRC check be correct, then analyze according to SNMP data format from front to back according to length, and give corresponding variate-value assignment.
2. the chip microcontroller method of a kind of snmp according to claim 1, is characterized in that, described method specific implementation step is as follows:
1) in anti-histamine release, first carry out data length conversion, if length is less than 128, then represent length by a byte, if length is more than or equal to 128, need to represent length by multiple byte; Wherein first character joint first place puts 1, after byte number needed for 7 bit representation data, the physical length of byte representation data subsequently;
2) value transmitted in system, all with character style transmission, directly send 04H character types, 01H length byte, then the value that will send directly sends when responding;
3) public SNMP stem and get/set stem are added to Variable-Bindings part, composition SNMP layer, when being free from mistakes, only need moving hand on one side, while corresponding variate-value is assigned in the address of pointer indication, then SNMP is put into MAC layer, carry out the calculating of CRC check value, send to host computer;
4) unpack algorithm OID and value are separated, first judge when unpacking that whether sync bit, address and CRC check be correct, then analyze according to SNMP data format from front to back according to length, and give corresponding variate-value assignment.
3. the chip microcontroller method of a kind of snmp according to claim 1 and 2, is characterized in that: the message format of described SNMP comprises: version, community, PDU type, request identifier, error state, error index, wherein:
Version field writes the version-1 of SNMP used;
Community is the plaintext password between managing process and agent process;
PDU field, according to the type of PDU, inserts a numeral in 0 ~ 4;
Request identifier is the integer value arranged by managing process, and agent process also will return this request identifier when sending get-response message;
A numeral in corresponding states 0 ~ 5 is inserted when error state is and is answered by agent process;
Error index field is an integer shifts, indicates when there being mistake to occur, and which parameter is mistake occur in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510426439.5A CN105162615A (en) | 2015-07-20 | 2015-07-20 | Snmp single-chip microcomputer implementing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510426439.5A CN105162615A (en) | 2015-07-20 | 2015-07-20 | Snmp single-chip microcomputer implementing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105162615A true CN105162615A (en) | 2015-12-16 |
Family
ID=54803379
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510426439.5A Pending CN105162615A (en) | 2015-07-20 | 2015-07-20 | Snmp single-chip microcomputer implementing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105162615A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107733669A (en) * | 2016-08-11 | 2018-02-23 | 中兴通讯股份有限公司 | SNMP server management methods and system based on request ID |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050180447A1 (en) * | 2004-02-12 | 2005-08-18 | Samsung Electronics Co., Ltd. | Multicast method in zigbee network |
CN101197703A (en) * | 2006-12-08 | 2008-06-11 | 华为技术有限公司 | Method, system and equipment for managing Zigbee network |
CN103117872A (en) * | 2012-12-31 | 2013-05-22 | 广东东研网络科技股份有限公司 | Method for improving data transmission efficiency of simple network management protocol (SNMP) |
-
2015
- 2015-07-20 CN CN201510426439.5A patent/CN105162615A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050180447A1 (en) * | 2004-02-12 | 2005-08-18 | Samsung Electronics Co., Ltd. | Multicast method in zigbee network |
CN101197703A (en) * | 2006-12-08 | 2008-06-11 | 华为技术有限公司 | Method, system and equipment for managing Zigbee network |
CN103117872A (en) * | 2012-12-31 | 2013-05-22 | 广东东研网络科技股份有限公司 | Method for improving data transmission efficiency of simple network management protocol (SNMP) |
Non-Patent Citations (1)
Title |
---|
陈航: "《SNMP 报文格式分析及实现》", 《计算机与现代化》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107733669A (en) * | 2016-08-11 | 2018-02-23 | 中兴通讯股份有限公司 | SNMP server management methods and system based on request ID |
CN107733669B (en) * | 2016-08-11 | 2023-03-14 | 中兴通讯股份有限公司 | SNMP server management method and system based on request ID |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11272396B2 (en) | Frame aggregation method, network setting frame sending method, and device | |
CN112822276B (en) | Substation control layer communication method and system, electronic equipment and storage medium | |
US20230145471A1 (en) | Systems and methods for discovering and monitoring devices using search patterns for object identifers and values | |
US20090282291A1 (en) | Internal maintenance association end point (mep) for sharing state information | |
WO2015143810A1 (en) | Node fault detection method and apparatus | |
WO2018010176A1 (en) | Method and device for acquiring fault information | |
US8321544B2 (en) | Method and system for the transfer of communication network administration information | |
US8392548B1 (en) | Method and apparatus for generating diagnostic information for errors detected in a network management protocol | |
CN105262740A (en) | Big data transmission method and system | |
CN103269277B (en) | For finding method and system, the first network element and the webmaster equipment of link | |
CN113691408A (en) | Power data communication network simulation method and device and computer equipment | |
CN105162615A (en) | Snmp single-chip microcomputer implementing method | |
CN108259442B (en) | Slow protocol message processing method and related device | |
CN103647667A (en) | Self-trapping Trap message processing method, management end and self-trapping Trap message processing system | |
CN111447110A (en) | Data monitoring method and system | |
US20120066323A1 (en) | Providing information corresponding to a data group identifier for a network interconnect device | |
CN102594611B (en) | Trap session chain table updating method for webmaster agent | |
CN102170371B (en) | Method for collecting important information of network equipment on the basis of centralized management | |
KR101206159B1 (en) | Management system and method for smart grid network having private ip | |
CN114006651A (en) | Satellite internet transmission method suitable for multiple protocols | |
Cisco | Simple Network Management Protocol (SNMP) | |
WO2016202025A1 (en) | Trap message processing method and apparatus | |
CN102684924A (en) | Network management workstation and debugging method of network management software | |
EP2749007B1 (en) | Managed object manipulation | |
Kastenholz | Definitions of managed objects for the Ethernet-like interface types |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20151216 |
|
RJ01 | Rejection of invention patent application after publication |