how to copy configuration files to and from the cisco ios routers that use SNMP

Unanswered Question
Apr 30th, 2010
User Badges:


I went on the page :

You explain how to get a config file and send it to a tftp server or oppositely.

I face this problem:

id090365:~> snmpset -v2c -c communitystring hostipaddress . i 1
Error in packet.
Reason: noCreation (That table does not support row creation or that object can not ever be created)
Failed object: SNMPv2-SMI::enterprises.

Do you have any idea?



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Joe Clarke Fri, 04/30/2010 - 12:54
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

If you're following step 1, you need to do all those SETs in ONE request.  That is, all on one line:

snmpset -v2c -c private . i 1 . i 4 . i 1 . a "" . s "Router.cfg" . i 4
grnelson Tue, 05/04/2010 - 15:48
User Badges:

I was able to get the example from the following web page to work using numeric OID's.

I am now trying to use object names as shown in the example and having difficulty.

I am using the net-snmp package on Fedora Linux.

I copied the following MIB files from Cisco's web site to $HOME/.snmp/mibs/ .

-rw-r--r-- 1 root root 31618 2010-05-03 20:15

-rw-r--r-- 1 root root 15375 2010-05-03 20:10

-rw-r--r-- 1 root root 10529 2010-05-01 11:34

-rw-r--r-- 1 root root 29165 2010-05-03 20:12

I created a snmp.conf file in $HOME/.snmp/snmp.conf which contains the


mibs +SNMPv2-SMI

mibs +SNMPv2-TC-V1SMI



When I run my procedure I get the following.....

+ snmpset -v2c -c ccCopyProtocol.111 i 1 ccCopySourceFileType.111 i 4 ccCopyDestFileType.111 i ccCopyServerAddress.111 a tftpserver ccCopyFileName.111 s destfile ccCopyEntryRowStatus.111 i 4

Cannot find module (SNMPv2-TC-V1SMI): At line 0 in (none)

Cannot find module (CISCO-SMI-V1SMI): At line 0 in (none)

Cannot find module (SNMPv2-SMI-v1): At line 11 in /root/.snmp/mibs/

Cannot find module (CISCO-ST-TC): At line 40 in /root/.snmp/mibs/

Did not find 'FcNameIdOrZero' in module #-1 (/root/.snmp/mibs/

i: Bad object type: 4

There seems to be a problem with Cisco's MIB files.

Examining the file shows the name of the module it

contains is:


which does not match the file name or the name Cisco uses when referring to the MIB on its web site.

Examining the file shows the name of the module it

contains is:


which does not match the file name or the name Cisco uses when referring to the MIB on its web site.

The web page cited above says the following:

These MIBs are used:





In other words it lists the MIB files, not the actual module names.

If you click the following link in the web page example it takes you to a page where the MIB is referred to as

On this page the MIB is referred to in two places as CISCO-SMI-V1SMI.

This is not the MIB module name.

Cisco should be consistent when referring to MIBs in its documentation. Either use the module name and indicate it is the module name.

Or use the file name and inidcate it is the file name and the module name is needed when using the MIB in a script or program.

grnelson Tue, 05/04/2010 - 16:48
User Badges:

I was finally able to get the example working using Object Names rather than numeric OID's.

I had to download a couple of additional MIB files from Cisco's web site and comment out the ones with inconsistent module names.

Here is the snmp.conf file that worked..

[[email protected] r65]# cat /root/.snmp/snmp.conf
mibs +SNMPv2-SMI
#mibs +SNMPv2-TC-V1SMI
mibs +SNMPv2-TC-v1

Output from the script......

+ snmpset -v2c -c ccCopyProtocol.111 i 1 ccCopySourceFileType.111 i 4 ccCopyDestFileType.111 i 1 ccCopyServerAddress.111 a ccCopyFileName.111 s cfg/r65/gcw-r65-5dwhi.cfg ccCopyEntryRowStatus.111 i 4
CISCO-CONFIG-COPY-MIB::ccCopyProtocol.111 = INTEGER: tftp(1)
CISCO-CONFIG-COPY-MIB::ccCopySourceFileType.111 = INTEGER: runningConfig(4)
CISCO-CONFIG-COPY-MIB::ccCopyDestFileType.111 = INTEGER: networkFile(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddress.111 = IpAddress:
CISCO-CONFIG-COPY-MIB::ccCopyFileName.111 = STRING: cfg/r65/gcw-r65-5dwhi.cfg
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.111 = INTEGER: createAndGo(4)

id090365_warnier Tue, 05/04/2010 - 23:48
User Badges:

Thanks a lot in advance for this example.

I need to get access to my cat /root/.snmp/snmp.conf, then I will try and give feedback.



Cody Hartley Wed, 07/30/2014 - 08:58
User Badges:

I hadn't seen any snmp guides using snmpv3 and scp as transport protocol. For those looking to implement, here is what worked for me.

As with the other snmp config copy guides you will need to download the respective MIBS and load them in the snmp.conf file.

This post will specifically cover the snmpset commands for a v3 setup.

SNMP Environment:

Name        : net-snmp
Version     : 5.7.2
Release     : 17.fc20

snmp conf file in ~/.snmp/snmp.conf


defSecurityName XXX <- replace with v3 username
defContext ""
defAuthType SHA
defPrivType AES
defSecurityLevel authPriv
defAuthPassphrase ***** <-replace with authentication pass
defPrivPassphrase *****  <-replace with encryption pass
defVersion 3
showMibErrors no
mibs ALL

I would verify basic snmpv3 functionality with a snmpwalk of something simple like sysUpTime. When that's good proceed to the CONFIG-COPY snmp commands.


This is my bash script that does the entire copy asking only for a single argument of IP/Hostname of the device being backed up. The 2>/dev/null shown in the script or at the cli below redirects STDERR to null to avoid the MIB modules parsing errors.

DATE=$(date +"%m_%d_%y")

snmpset $DEVICE ccCopyProtocol.$RANNUM i 4 ccCopySourceFileType.$RANNUM i 4 ccCopyDestFileType.$RANNUM i 1 ccCopyServerAddress.$RANNUM a "$SERVER" ccCopyFileName.$RANNUM s "$DEVICE.$DATE" ccCopyUserName.$RANNUM s $USER ccCopyUserPassword.$RANNUM s $PASS ccCopyEntryRowStatus.$RANNUM i 4 2>/dev/null


Once run you can check the status of the copy with the following command.

[[email protected] hlsb]# snmpwalk sbs-tech-switch ciscoConfigCopyMIB 2>/dev/null
CISCO-CONFIG-COPY-MIB::ccCopyProtocol.42 = INTEGER: scp(4)
CISCO-CONFIG-COPY-MIB::ccCopySourceFileType.42 = INTEGER: runningConfig(4)
CISCO-CONFIG-COPY-MIB::ccCopyDestFileType.42 = INTEGER: networkFile(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddress.42 = IpAddress:
CISCO-CONFIG-COPY-MIB::ccCopyFileName.42 = STRING: sbs-tech-switch.07_09_14
CISCO-CONFIG-COPY-MIB::ccCopyNotificationOnCompletion.42 = INTEGER: false(2)
CISCO-CONFIG-COPY-MIB::ccCopyState.42 = INTEGER: successful(3)
CISCO-CONFIG-COPY-MIB::ccCopyTimeStarted.42 = Timeticks: (52270199) 6 days, 1:11:41.99
CISCO-CONFIG-COPY-MIB::ccCopyTimeCompleted.42 = Timeticks: (52270339) 6 days, 1:11:43.39
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 = INTEGER: active(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressType.42 = INTEGER: ipv4(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressRev1.42 = STRING: ""


After the successful copy completes the entry will exist for five minutes allowing for no further requests to be made with that particular random number. To send another request prior to the five minute clearing of the table send a "destroy" snmpset to clear the entry.


[[email protected] hlse]# snmpset sbs-tech-switch CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 i 6 2>/dev/null
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 = INTEGER: destroy(6)


Hope this will save some time for those looking to implement a more secure snmp config copy setup.


Cody Hartley




This Discussion