Configuration Guide Vol. 1


20.1.3 SNMPv1,SNMPv2C operation

For the collection or setting of management data, SNMP provides the following four operations:

Every operation is performed from SNMP Manager to the appliance (SNMP Agents). Each operation is described below.

<Structure of this section>

(1) GetRequest operation

The GetRequest operation is used when an SNMP manager extracts MIB information from a switch (agent functionality). One or more MIBs can be specified for this operation.

If the switch holds the applicable MIB, the GetResponse operation returns the MIB information. If the switch does not hold the applicable MIB, the GetResponse operation returns noSuchName. The following figure illustrates the GetRequest operation.

Figure 20-6 GetRequest operation

[Figure Data]

[Figure Data]

In SNMPv2C, if the switch does not hold the applicable MIB, the GetResponse operation returns noSuchObject as the MIB value. The following figure illustrates the GetRequest operation for SNMPv2C.

Figure 20-7 GetRequest operation (SNMPv2C)

[Figure Data]

(2) GetNextRequest operation

The GetNextRequest operation is similar to the GetRequest operation. Whereas the GetRequest operation is used for reading the specified MIB, the GetNextRequest operation is used to extract the MIB after the specified MIB. One or more MIBs can be specified for this operation.

If the switch holds the MIB following the specified one, the GetResponse operation returns the MIB. If the specified MIB is the last MIB, the GetResponse operation returns noSuchName. The following figure illustrates the GetNextRequest operation.

Figure 20-8 GetNextRequest operation

[Figure Data]

[Figure Data]

In SNMPv2C, if the specified MIB is the last MIB, the GetResponse operation returns endOfMibView as the MIB value. The following figure illustrates the GetNextRequest operation for SNMPv2C.

Figure 20-9 GetNextRequest operation (SNMPv2C)

[Figure Data]

(3) GetBulkRequest operation

The GetBulkRequest operation is an extended GetNextRequest operation. By using the GetNextRequest operation, you can set a number of repetitions. You can extract from the items after the specified MIB as many MIBs as the specified number of repetitions. One or more MIBs can be specified for this operation.

If a switch has many MIBs as the specified number of repetitions from the item after the specified MIB, the GetResponse operation returns the MIB. If the specified MIB is the last MIB, or the last MIB is retrieved before the specified number of repetitions, the GetResponse operation returns endOfMibView as the MIB value. The following figure illustrates the GetBulkRequest operation.

Figure 20-10 GetBulkRequest operation

[Figure Data]

[Figure Data]

(4) SetRequest operation

The SetRequest operation is similar to the GetRequest, GetNextRequest, and GetBulkRequest operations because it is performed for a switch (agent functionality) from the SNMP manager, but the method for setting a value for the SetRequest operation is different from that of the other operations.

The SetRequest operation specifies both a value to be set and a MIB. When a value is specified, the GetResponse operation returns the MIB and the setting value. The following figure illustrates the SetRequest operation.

Figure 20-11 SetRequest operation

[Figure Data]

(a) Answer when MIB cannot be set

The following are three cases when a MIB cannot be configured:

  • The MIB is read-only (includes managers that belong to read-only communities).

  • The setting value is not correct.

  • Configuration cannot be performed because of the status of the switch.

Each case returns a different response. If the MIB is read-only, noSuchName is returned by the GetResponse operation. In SNMPv2C, if the MIB is read-only, the GetResponse operation returns notWritable. The following figure illustrates the SetRequest operation when the MIB is read-only.

Figure 20-12 SetRequest operation when the MIB variable is read only

[Figure Data]

[Figure Data]

If the type of the setting value is not correct, the GetResponse operation returns badValue. In SNMPv2C, if the type of the setting value is not correct, the GetResponse operation returns wrongType. The following figure illustrates the SetRequest operation when the type of the setting value is not correct.

Figure 20-13: Example of SetRequest operation when the settings are not the correct types

[Figure Data]

[Figure Data]

If configuration is not possible because of the status of the switch, genError is returned. For example, when an attempt is made to set a value on a switch, if a setting timeout is detected on the switch, genError is returned. The following figure illustrates the SetRequest operation when configuration is not possible because of the status of the switch.

Figure 20-14: SetRequest operations that cannot be performed depending on the status of the switch

[Figure Data]

(5) Community Operations Restrictions

In SNMPv1 and SNMPv2C, restrictions can be applied to SNMP managers that perform operations under the community concept. A community is the assignment of an SNMP manager that performs operations and an SNMP agent to a group. To perform MIB operations, the SNMP manager and the SNMP agent must belong to the same group (community). The following figure illustrates the operation of a community.

Figure 20-15: Community operations

[Figure Data]

Switch A belongs to the public community and the local network community, but it does not belong to the other network community. In this case, switch A accepts MIB operations requested by SNMP manager A in the public community and SNMP manager B in the local network community, but it does not accept operations requested by SNMP manager C in the other network community.

(6) Restricting Operation by IP Addressing

In consideration of security risks, the Switch can be configured so that they do not accept MIB operations if the combination of community and IP address of the SNMP manager does not match an access list. To use SNMPv1 and SNMPv2C on the Switch, you must register communities by using a configuration command. A community is specified by using a character string. In addition, public is generally used for a community name.

(7) Error status codes for SNMP operation

If an error occurs during an operation, the SNMP agent assigns an error code for the error status and returns a response in the GetResponse operation. The response contains the number of the MIB information where the error occurred set as the error location number. If the result of the operation is normal, a code indicating no errors is set as the error status and a response in the GetResponse operation that contains the MIB information of the operations actually performed is returned. The following table describes the error status codes.

Table 20-1: Error status codes

Error status

Code

Description

noError

0

No error occurred.

tooBig

1

The data size is too large to be set as a value in the PDU.

noSuchName

2

The specified MIB was not found or writing is not allowed.

badValue

3

The setting value is incorrect.

readOnly

4

A write attempt failed (the Switch does not return this status).

genError

5

Another error occurred.

noAccess

6

A set operation was attempted for a MIB that cannot be accessed.

wrongType

7

A type different from the type required for the MIB was specified.

wrongLength

8

A length different from the length required for a MIB was specified.

wrongEncoding

9

The ASN.1 encoding was incorrect.

wrongValue

10

The MIB value was incorrect.

noCreation

11

The applicable MIB does not exist.

inconsistentValue

12

A value cannot be set due to an inconsistency.

resourceUnavailable

13

A resource required for setting a value cannot be used.

commitFailed

14

An attempt to update a value failed.

undoFailed

15

The original value could not be restored when an attempt to update a value failed.

notWritable

17

The set operation cannot be performed.

inconsistentName

18

Creation is not currently possible because the MIB does not exist.