11-16-2009 05:37 AM
Hi,
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.
Code is
c2800nm-spservicesk9-mz.124-11.T2.bin
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] .1.3.6.1.4.1.9.2.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] .1.3.6.1.4.1.9.2.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.3.6.1.4.1.9.2.1.42.0 = 0
.iso.3.6.1.4.1.9.2.1.43.0 = 0
.iso.3.6.1.4.1.9.2.1.44.0 = 0
.iso.3.6.1.4.1.9.2.1.45.0 = 0
.iso.3.6.1.4.1.9.2.1.46.0 = 9
.iso.3.6.1.4.1.9.2.1.47.0 = 0
.iso.3.6.1.4.1.9.2.1.48.0 = IpAddress: 0.0.0.0
.iso.3.6.1.4.1.9.2.1.49.0 = ""
.iso.3.6.1.4.1.9.2.1.51.0 = IpAddress: 0.0.0.0
.iso.3.6.1.4.1.9.2.1.52.0 = ""
.iso.3.6.1.4.1.9.2.1.56.0 = 0
.iso.3.6.1.4.1.9.2.1.57.0 = 0
.iso.3.6.1.4.1.9.2.1.58.0 = 0
I guess what I'm after is simply the OID to use for a hostConfigSet on a c2851
Ian
11-16-2009 05:41 AM
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?
11-16-2009 05:53 AM
Joe,
Thanks, I'll try the tech tip.
Basically get a timeout, no response from host x.x.x.x.
Ian
11-16-2009 06:01 AM
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 ?
Ian.
11-16-2009 07:53 AM
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
11-16-2009 08:35 AM
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 ?
Ian
11-16-2009 08:41 AM
.1.3.6.1.4.1.9.9.96.1.1.1.1.3.128 s networkFile
Error in packet.
Reason: (badValue) The value given has the wrong type or length.
Failed object: iso.3.6.1.4.1.9.9.96.1.1.1.1.3.128
11-16-2009 09:00 AM
It seems the CCO article is wrong !!
The fileType possible values are :
1: networkFile(1)
2: iosFile(2)
3: startupConfig(3)
4: runningConfig(4)
5: terminal(5)
11-16-2009 09:35 AM
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).
11-16-2009 10:26 AM
You can use my SNMP Search & Translate tool. It does return the proper values:
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: