Re: SNMP set value

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Wed, 13 Mar 1996 17:35:21 +0100

Hi!

phillj@datel.demon.co.uk (Phillip James) said:

Phillip> I'm trying to set the type of SNMP filter on a CRAY
Phillip> router via scotty but when I click OK I get the
Phillip> following error box;

Phillip> genErr 1 {1.3.6.1.4.1.208.2.11.1.0 INTEGER emergency }

Phillip> I'm trying to change the filter from emergency(0) to
Phillip> warning(4). I can read the current value no
Phillip> problem. This error occurs for all attempts at setting
Phillip> any read-write parameter.

There is good and bad news. The good news first: There is a bug in the
processing of SNMP send events. The effect is that you can't see the
value of the set request because the varbindlist is not normalized
(that is filled up with the correct ASN.1 tag). It is easy to work
around once you know this bug. Below is a patch for the mibtree
script. I guess the patch will make the correct value (e.g. warning)
to appear in the message window.

The bad news is that this bug does no affect the PDU send to your CRAY
router. Here is an excerpt from RFC 1157 (The SetRequest-PDU):

(4) If, for any object named in the variable-bindings field,
the value of the named object cannot be altered for
reasons not covered by any of the foregoing rules, then
the receiving entity sends to the originator of the
received message the GetResponse-PDU of identical form,
except that the value of the error-status field is genErr
and the value of the error-index field is the index of
said object name component in the received message.

This step 4 happens only if the set request was accepted (you would
get a noSuchName error if the object is not writable) - assuming that
the router has read the RFC. :-) So I can't help why it does not work.

Please try another SNMP utility and test if it behaves the same
way. If yes, contact the vendor of the router.

Juergen

*** mibtree.orig Tue Oct 31 02:37:51 1995
--- mibtree Wed Mar 13 17:19:36 1996
***************
*** 778,793 ****
.watch.t insert end "\n$type $id \[$agent\] $error @ $index\n"
set i 0
foreach vb $vbl {
! switch [lindex $vb 1] {
noSuchObject -
noSuchInstance -
endOfMibView {
.watch.t insert end [format "%4d %s ** %s **\n" $i \
! [mib name [lindex $vb 0]] [lindex $vb 1]]
}
default {
.watch.t insert end [format "%4d %s = %s\n" $i \
! [mib name [lindex $vb 0]] [lindex $vb 2]]
}
}
incr i
--- 864,887 ----
.watch.t insert end "\n$type $id \[$agent\] $error @ $index\n"
set i 0
foreach vb $vbl {
! set label [lindex $vb 0]
! if {[llength $vb] == 3} {
! set tag [lindex $vb 1]
! set value [lindex $vb 2]
! } else {
! set tag ""
! set value [lindex $vb 1]
! }
! switch $tag {
noSuchObject -
noSuchInstance -
endOfMibView {
.watch.t insert end [format "%4d %s ** %s **\n" $i \
! [mib name $label] $value]
}
default {
.watch.t insert end [format "%4d %s = %s\n" $i \
! [mib name $label] $value]
}
}
incr i