in reply to Re: Re: snmpwalk using net::snmp
in thread snmpwalk using net::snmp

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....