write mem via SNMP?

Answered Question
Nov 9th, 2009

Is there any way to perform a "write mem" or "copy run start" via SNMP (snmpget) on IOS, CatOS or PIX/ASA?

Correct Answer by Joe Clarke about 7 years 3 months ago

createAndWait lets you perform the set in multiple packets. When using createAndGo, you have to send all the objects in the same packet. You can do either one.


The random number is your choice. It can be anything in the range of 1 to 2^31-1.

Correct Answer by Joe Clarke about 7 years 3 months ago

Sure! Use the CISCO-CONFIG-COPY-MIB to do this:


https://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml


That tech tip details copying the config to and from a TFTP server, but for a write mem, set the destination as startup and the source as running, and you're set.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.
Joe Clarke Mon, 11/09/2009 - 13:02

Oh, this is not possible on the PIX/ASA as config manipulation is not possible using SNMP.

yjdabear Tue, 11/10/2009 - 07:11

Thanks! I thought it wasn't possible, but I should've searched:


http://forums.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=Network%20Management&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline%40%5E1%40%40.1dd9fd99/0#selected_message


In the above thread, Nadim gave an example in which ccCopyEntryRowStatus was set to "5:createAndWait", whereas in the URL you pointed out "createAndGo(4) : Create an entry" and "destroy(6) : Delete an entry" were suggested. Would you know what the differences are between 4 (createAndGo) and 5 (createAndWait), specifically which one would you choose to commit a "write mem"?


Secondly, how is the random number below generated? Is that my choice?


snmpset -v 1 -c private

.1.3.6.1.4.1.9.9.96.1.1.1.1.2. integer 1

.1.3.6.1.4.1.9.9.96.1.1.1.1.3. integer 4

.1.3.6.1.4.1.9.9.96.1.1.1.1.4. integer 1

.1.3.6.1.4.1.9.9.96.1.1.1.1.5. ipaddress ""

.1.3.6.1.4.1.9.9.96.1.1.1.1.6. octetstring ""

.1.3.6.1.4.1.9.9.96.1.1.1.1.14. integer 4

Correct Answer
Joe Clarke Tue, 11/10/2009 - 08:36

createAndWait lets you perform the set in multiple packets. When using createAndGo, you have to send all the objects in the same packet. You can do either one.


The random number is your choice. It can be anything in the range of 1 to 2^31-1.

Actions

This Discussion