I seem to have a problem with 2851's and copying config files using tftp.
Looks like the IOS may consider OLD-CISCO-SYS-MIB to be legacy, but I'm having no luck with the CISCO-CONFIG-COPY-MIB.
I can walk the device using the RW string.
Have been able to pull back the config using 'writeNet' ie.
snmpset -v1 -c [RW_string] [IP_a.b.c.d] .220.127.116.11.18.104.22.168.1.55.[svr_IPa.b.c.d] s host.cfg
When I try hostConfigSet it is unsuccessful;
snmpset -v1 -c [RW_string] [IP_a.b.c.d] .22.214.171.124.126.96.36.199.1.53.[svr_IPa.b.c.d] s cfg.txt
An snmpwalk reveals no OID for hostConfigSet ie. .53, and the entry under .51 is 0.0.0.0, implying that hostConfigAddr was never previously successful
.iso.188.8.131.52.184.108.40.206.42.0 = 0
.iso.220.127.116.11.18.104.22.168.43.0 = 0
.iso.22.214.171.124.126.96.36.199.44.0 = 0
.iso.188.8.131.52.184.108.40.206.45.0 = 0
.iso.220.127.116.11.18.104.22.168.46.0 = 9
.iso.22.214.171.124.126.96.36.199.47.0 = 0
.iso.188.8.131.52.184.108.40.206.48.0 = IpAddress: 0.0.0.0
.iso.220.127.116.11.18.104.22.168.49.0 = ""
.iso.22.214.171.124.126.96.36.199.51.0 = IpAddress: 0.0.0.0
.iso.188.8.131.52.184.108.40.206.52.0 = ""
.iso.220.127.116.11.18.104.22.168.56.0 = 0
.iso.22.214.171.124.126.96.36.199.57.0 = 0
.iso.188.8.131.52.184.108.40.206.58.0 = 0
I guess what I'm after is simply the OID to use for a hostConfigSet on a c2851
You want to use the CISCO-CONFIG-COPY-MIB. If you follow the tech tip at https://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml what errors do you get?
I'm only a little concerned about the statement in the referred artcile saying
"You must upload complete configurations when you use the snmpset command. Partial configurations erase what is currently stored in non-volatile RAM (NVRAM). This is only needed for startup configurations. When you run a configuration copy it merges the contents. "
I want to merge a couple of commands with the running config, but I obviously don't want to wipe out the rest of the config.
It seems ambiguous, can you please clarify ?
I have managed to get some success but what appears to be happening is the router config is being written back to the tftp server and overwrites the text file which I was using as my source file.
;-} helps if I can read !! I'm using dotted notation and was using the example for copying the running config to the tftp server which is exactly what I was getting
Still having problems with the expected file types for ccCopySourceFileType and/or ccCopyDestFileType.
Have set Dest to an integer of '2' = running-config.
I get an error when following the value of '3' as per the CCO URL previously given.
The CCO SNMP Object Navigator has a reference to 'networkFile' as a value, but I'm not sure how to set it.
" If the ccCopySourceFileType has the value of networkFile, the
ccCopyServerAddress and ccCopyFileName must also be created,
and these 3 objects together
(ccCopySourceFileType, ccCopyServerAddress, ccCopyFileName)
will uniquely identify the source file."
only has possible values of 1 or 2 for the OID.
Any thoughts ?
.220.127.116.11.18.104.22.168.22.214.171.124.1.3.128 s networkFile
Error in packet.
Reason: (badValue) The value given has the wrong type or length.
Failed object: iso.126.96.36.199.188.8.131.52.184.108.40.206.3.128
It seems the CCO article is wrong !!
The fileType possible values are :
This issue is now resolved using the OID values in the last post, from the MIB - do not rely on the content of the CCO snmp object navigator for the values of ccCopySourceFileType (or Destination).
You can use my SNMP Search & Translate tool. It does return the proper values: