cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8332
Views
5
Helpful
1
Replies

Different error states when using wrong mib in snmp v1 and v2c?

Hello,

while evaluating snmp access to a catos 8.4 switch I detected the following behaviour:

- snmp v1: set request with correct mib -> response with error status = noError (0)

- snmp v1: set request with wrong mib -> response with error status = noSuchName (2)

- snmp v2c: set request with wrong mib -> response with error status = noCreation (11)

Does anybody know why there are different error states when using wrong mibs with snmp v1 and v2c?

Many thanks in advance,

Thorsten

1 Accepted Solution

Accepted Solutions

Lucien Avramov
Level 10
Level 10

For V1 the states are :

SNMPv1 Error Message

Description

noError(0)

There was no problem performing the request.

tooBig(1)

The response to your request was too big to fit into one response.

noSuchName(2)

An agent was asked to get or set an OID that it can't find; i.e., the OID doesn't exist.

badValue(3)

A read-write or write-only object was set to an inconsistent value.

readOnly(4)

This error is generally not used. The noSuchName error is equivalent to this one.

genErr(5)

This is a catch-all error. If an error occurs for which none of the previous messages is appropriate, a genError is issued.

For V2:

SNMPv2 Error Message

Description

noAccess(6)

A set to an inaccessible variable was attempted. This

typically occurs when the variable has an ACCESS type of not-accessible.

wrongType(7)

An object was set to a type that is different from its definition. This error will occur if you try to set an object that is of type INTEGER to a string, for example.

wrongLength(8)

An object's value was set to something other than what it calls for. For instance, a string can be defined to have a maximum character size. This error occurs if you try to set a string object to a value that exceeds its maximum length.

wrongEncoding(9)

A set operation was attempted using the wrong encoding for the object being set.

wrongValue(10)

A variable was set to a value it doesn't understand. This can occur when a read-write is defined as an enumeration, and you try to set it to a value that is not one of the enumerated types.

noCreation(11)

You tried to set a nonexistent variable or create a variable that doesn't exist in the MIB.

inconsistentValue

A MIB variable is in an inconsistent state, and is not accepting any set requests.

resourceUnavailable(13)

No system resources are available to perform a set.

commitFailed(14)

This is a catch-all error for set failures.

undoFailed(15)

A set failed and the agent was unable to roll back all the previous sets up until the point of failure.

authorizationError(16)

An SNMP command could not be authenticated; in other words, someone has supplied an incorrect community string.

notWritable(17)

A variable will not accept a set, even though it is supposed to.

inconsistentName(18)

You attempted to set a variable, but that attempt failed because the variable was in some kind of inconsistent state.

This is different per RFC hence you see the different outputs.

View solution in original post

1 Reply 1

Lucien Avramov
Level 10
Level 10

For V1 the states are :

SNMPv1 Error Message

Description

noError(0)

There was no problem performing the request.

tooBig(1)

The response to your request was too big to fit into one response.

noSuchName(2)

An agent was asked to get or set an OID that it can't find; i.e., the OID doesn't exist.

badValue(3)

A read-write or write-only object was set to an inconsistent value.

readOnly(4)

This error is generally not used. The noSuchName error is equivalent to this one.

genErr(5)

This is a catch-all error. If an error occurs for which none of the previous messages is appropriate, a genError is issued.

For V2:

SNMPv2 Error Message

Description

noAccess(6)

A set to an inaccessible variable was attempted. This

typically occurs when the variable has an ACCESS type of not-accessible.

wrongType(7)

An object was set to a type that is different from its definition. This error will occur if you try to set an object that is of type INTEGER to a string, for example.

wrongLength(8)

An object's value was set to something other than what it calls for. For instance, a string can be defined to have a maximum character size. This error occurs if you try to set a string object to a value that exceeds its maximum length.

wrongEncoding(9)

A set operation was attempted using the wrong encoding for the object being set.

wrongValue(10)

A variable was set to a value it doesn't understand. This can occur when a read-write is defined as an enumeration, and you try to set it to a value that is not one of the enumerated types.

noCreation(11)

You tried to set a nonexistent variable or create a variable that doesn't exist in the MIB.

inconsistentValue

A MIB variable is in an inconsistent state, and is not accepting any set requests.

resourceUnavailable(13)

No system resources are available to perform a set.

commitFailed(14)

This is a catch-all error for set failures.

undoFailed(15)

A set failed and the agent was unable to roll back all the previous sets up until the point of failure.

authorizationError(16)

An SNMP command could not be authenticated; in other words, someone has supplied an incorrect community string.

notWritable(17)

A variable will not accept a set, even though it is supposed to.

inconsistentName(18)

You attempted to set a variable, but that attempt failed because the variable was in some kind of inconsistent state.

This is different per RFC hence you see the different outputs.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: