Use of SNMP protocol OID

Source: Internet
Author: User

The Simple Network Management Protocol (SNMP) is a Protocol used by the Network Management System (NMS) to monitor the status of Network devices. It is a de facto standard for Network Management, if network devices do not support the SNMP protocol, it will take a lot of effort to persuade NMS vendors to support your devices. This is not worth the candle. The Operations and operation methods supported by SNMP are very simple (of course, the Protocol itself is not simple ). SNMP operations: GET, GETNEXT, SET, and trap snmp will be managed objects organized in a tree, and managed objects will be represented by OID (for children's shoes that cannot be understood, check Google Baidu for snmp first ), you can use the snmp operation oid to obtain network management data. The oid length is ". "subtree 1-> 3-> 6-> 1-> 2-> 1-> 1-> 2 oid design, properly design the OID in the Development of snmp agent to enable it to provide powerful query functions. (1) GET. from the root node to the leaf node (2) Search for the object values in the table [the table is very expressive. Think about the database as a table], of course, the snmp protocol uses tables to organize so much managed data, and get getnext oid can be used to query table data vehicles in various forms, (Of course, only the data of one managed object can be found at a time, so it is relatively simple ). Query GET through two-dimensional table positioning. the second to last of row-index is the index of the column name. The last one is the index of the row through a field such as the ID number, which can be like GET. id. length. aa. aa ..... in aa, length is the length of the name string ,. aa. aa ..... the ascii code of the name. GETNEXT. index. If no value exists, return. first-row-index (the value of the first row and oid in the table) is used to traverse all the field values whose IP address is in the table. (3) Type of the key word combination for multiple query keywords: int32: use directly, for example, 123 IP Address: can also be used directly, that is, the combination of four int32, such as string: use the number of strings + the ascii code of the strings. Aa indicates that the query rules for "2.97.97" must be set, and the order cannot be changed. The string is best placed on the last one. For example, you can query the online time of a user whose user name is aa on ip address ". online time. "You can also define the keyword type, such as 1 = int32, 2 = IP address, 3 = string, you can" ". online time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.