MIB Example

Figure 3-29 depicts SNMP MIB variable retrieval in action.

Figure 3-29 SNMP MIB Variable Retrieval

— Base format to retrieve the number of errors on an interface iso org dod internet mgmt mib interface ifTable ifEntry ifOutErrors

— Specific format to retrieve the number of errors on first interface iso org dod internet mgmt mib interface ifTable ifEntry ifOutErrors Instance 1 3 6 1 2 1 2 2 1 20 0

Managed Device

Agent

Manager SNMP Get Request a

OBJECT IDENTIFIER = 1.3.6.1.2.1.2.2.1.20.0 SNMP Get Response 1.3.6.1.2.1.2.2.1.20.0 = 11 Port Errors

Host A

In this example, the network manager wants to retrieve the number of errors on the first interface. Starting with interface number 0, the valid range for interface numbers is 0 through the maximum number of ports minus one. The manager creates the SNMP Get Request message with reference to the MIB variable 1.3.6.1.2.1.2.2.1.20.0, which represents interface outgoing errors on interface

0. The agent creates the SNMP Get Response message in response to the manager's request. The response includes the value of the referenced variable. In the example, the agent returned value is 11, indicating that there were 11 outgoing errors on that interface.

Was this article helpful?

0 0

Post a comment