I would have thought that, given a specific OID, an snmpget or snmpset would suffice. However given a specified example from Cisco, it seems that snmpwalk is required. Check out this CCO url and look near the mid to bottom of the page, specifically at steps #3 and #4. i've gone through this procedure, and it seems as though the router won't respond to a snmpget using the show OID. rather, it only responds to a walk.
thanks! -c | [reply] |
Yes you are right!
In this example you really need snmpwalk bacause a whole tree should
be copied. snmpget will not work because you will have lots of
timeouts on all nodes which are not intended to have a value and on
all nodes which do not exist. Setting a small timeout value might
cause loosing values.
Nevertheless a snmpwalk is -- as you said -- nothing else than a
recursive get. Performing a bulkget seems also not possible, bacause
the Cisco seems to use snmp version 1 only where bulkrequests are (I
am not sure but I think so) not implemented.
Therefore you should use the get_next_request() in a loop which takes
the key of the returned hash as an argument for the next request and
puts all OIDS and values in one hash. You
might want to define a start-OID because usually not all values in the
tree are R/W.
Afterwards you set your configuration-values on the other router using
set_request() for each key and voila the configuration is copied.
Regards....
| [reply] |