Use mib_builder 4.0 of MG-SOFT to write MIB files

Source: Internet
Author: User

1. click File> New... in the menu. In the displayed dialog box, select "version 1" or "version 2". Select "version 2 ".
2. Enter the module name in the module name: edit box. Note that all letters must be in uppercase. Enter "LIUZY-TEST-MIB" here ".
3. Import the MIB module where the parent OID node is located. Here I need to create a private node 39988 located under "Enterprises", so I need to import the module SNMPv2-SMI where "Enterprises" is located:
Click the menu file-> Import..., select "SNMPv2-SMI.my" in the pop-up module selection box, then the MIB tree on the left to see the enterprises node.
4. Insert the "Enterprises" node into our own module:
Method 1:
1). Right-click the replicises node of the imported SNMPv2-SMI module and execute the "copy" command in the pop-up menu;
2) Click the menu window-> LIUZY-TEST-MIB, switch to the MIB module we are editing;
3 ). right-click the root node "MIB Tree" and execute the "Paste" command in the pop-up menu. The system will prompt that "node cannot be linked to the tree, because there is no parent node of this node, do you want to import all lost parent nodes? ", Select" yes "to import the specified ISES node to our file;
Method 2:
1). Click the menu bar rightmost "downward restore" button, so that the imported SNMPv2-SMI module and LIUZY-TET-MIB module are visible at the same time;
2 ). hold down the enterprises node of the SNMPv2-SMI module, and drag it to the "MIB Tree" node of the LIUZY-TEST-MIB, the system will prompt that "node cannot be linked to the tree, because there is no parent node of the node, import all lost parent nodes? ", Select" yes "to import the specified ISES node to our file;
5. Create a module:
5. Create a non-leaf node:
Drag "object identifier" under "smiv1 components" on the right to the desired node, such as "Enterprises". In the Name edit box, enter the desired name, for example, "liuzytest ", in the child edit box, enter the expected OID value, for example, 39988.
6. Create a leaf node:
Drag "Object-type (scalar)" under "smiv1 components" on the right to the desired node, such as "liuzytest". Enter the desired name in the name edit box, for example, "liuzyleaf ", in the child edit box, enter the expected OID value, such as 1, and set other attributes as needed.
7. Create a new table:
1 ). drag "Object-type (table)" under "smiv1 components" on the right to the desired node, such as "liuzytest". In the Name edit box, enter the desired name, such as "liuzytable ", in the child edit box, enter the expected OID value, such as 2, and set other attributes as needed. Note that the node name must end with "table.
2 ). drag "Object-type (ROW)" under "smiv1 components" on the right to the "liuzytable" Node created in the previous step. The name and child edit boxes are not allowed. They are set by default, you can set other attributes as needed.
3 ). drag "Object-type (columnar)" under "smiv1 components" on the right to the "liuzyentry" Node created in the previous step. Enter the expected name in the name edit box, for example, "liuzycolumn1 ", in the child edit box, enter the expected OID value, such as 1, and set other attributes as needed.
4) Repeat Step 3rd to add other column nodes.
8. Create a new notification:
Drag "Notification-type" under "smiv2 components" to the desired node, such as "liuzytest". In the Name edit box, enter the expected name, for example, "liuzynotification ", in the child edit box, enter the expected OID value, such as 3, and set other attributes as needed.

So far, we have generated a MIB file.

9. Check the correctness:
Click the "check MIB Tree" button on the toolbar to view the check result in the "log" window:
Error: No indexes defined for row "liuzyentry ".
Warning: Object-type "liuzyleaf" is not contained in any group defined in the current module.
Warning: Object-type "liuzycol1" is not contained in any group defined in the current module.
Warning: Object-type "liuzycol2" is not contained in any group defined in the current module.
Warning: Notification-type "liuzynotification" is not contained in any group defined in the current module.
Warning: This MIB module doesn't contain any MODULE-IDENTIY construct.

For the MIB file created above, you can see one error message and five warnings. The following will eliminate these problems in sequence:
> Correct error:
1) Select the "liuzyentry" node;
2 ). select "Index" in the drop-down box in the lower left corner of the property settings window on the right, and click the Browse button on the right, in the displayed dialog box, select the node you want to index to the "selected indexes" list box, and click OK;
> Correct 5th Warnings:
1 ). drag "module-Identity" under "smiv2 components" on the right to the desired node, such as "Enterprises". In the Name edit box, enter the expected name, for example, "liuzymodule ", in the child edit box, enter the expected OID value, for example, 39988, and set other attributes as needed.
2) drag the existing "liuzytest" node to "liuzymodule", and its child value will change to 1. You can change it to another value. Now we keep 1 unchanged.
> Correct 2nd Warnings:
1 ). drag "Object-group" under "smiv2 components" on the right to the "liuzytest" node. In the Name edit box, enter the expected name, for example, "liuzyleafgroup ", in the child edit box, enter the expected OID value (for example, 4) and click "objects". In the displayed dialog box, delete "object1" in the list box on the right ", add "liuzyleaf" in the list box on the left to the list box on the right, and set other attributes as needed.
> Correct 2nd and 3 warnings:
1 ). drag "Object-group" under "smiv2 components" on the right to the "liuzytest" node. In the Name edit box, enter the expected name, for example, "liuzytablegroup ", in the child edit box, enter the expected OID value, for example, 5, and click "objects". In the displayed dialog box, delete "object1" in the list box on the right ", add "liuzycol1" and "liuzycol2" in the list box on the left to the list box on the right, and set other properties as needed.
> Correct 4th Warnings:
1 ). drag "Notification-group" under "smiv2 components" on the right to the "liuzytest" node. In the Name edit box, enter the expected name, for example, "liuzynotificationgroup ", in the child edit box, enter expected OID value 6 and click "objects". In the displayed dialog box, delete "icationication1" in the list box on the right ", add "liuzynotification" in the list box on the left to the list box on the right, and set other properties as needed.

10. Check the correctness again: All OK!

11. Preview The MIB file: click File> export Preview

12. Generate the MIB file: click File> Export

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: info-contact@alibabacloud.com 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.