I currently have troubles using snmpset to get the cisco configuration from a monitoring server.

Here is what I tip:

snmpset -v2c -cvtmYdXVHfo9v38oAbtACikvV calcium \ integer 1 \ integer 4 \ integer 1 \ ipaddress \ octetstring "config" \ integer 4

Following the documentation available at cisco_snmp_doc:

ccCopyProtocol is

The Cisco documentation indicates to specify a random integer (here, 111, as it is in the documentation, but specifying 1 does not change anything)

Here is what I get: Value out of range ( Unknown Object Identifier \
(Sub-id not found: (top) -> config)

Obviously, I can't set the ip address of my server to the related oid. Furthermore, I can't figure out what the second error means.

Can anyone give me some advice ? Any help or clue would be deeply appreciated

Thanks a lot :)


Your initial question stated that you were trying to get the configuration from a monitoring server, but your response to petrus indicates that you want to copy the configuration to the server, and that's what your original example shows, so I assume that's what you're after.

Two things:

1 - This doesn't work for me without a . at the beginning of the numerical OIDS.

2 - It looks like the TYPE values available with your version of snmpget don't match those in the Cisco doc (it says they use the HPOV version of snmpset). Try running 'snmpset' without any parameters and see what you get; if you're using Net-SNMP there should be a section near the bottom that specifies the TYPEs available.


Here are the steps I've used in the past, using Net-SNMP and CISCO-CONFIG-COPY-MIB (apologies for the length):

Step 1: Configure the ccCopyEntryTable with the desired protocol (tftp=1), the source file type (runningConfig=4), the destination file type (networkFile=1), the IP address of your tftp server, and the desired filename on the tftp server. Last, set the RowStatus to "createAndGo" (4).


snmpset -v 2c -c private lab-rtr1 \
. i 1 \
. i 4 \
. i 1 \
. a \
. s "lab-rtr1-confg" \
. i 4

Using the text OIDs from the MIB:

snmpset -O s -m CISCO-CONFIG-COPY-MIB -v 2c -c private lab-rtr1 \
ccCopyProtocol.111 i 1 \
ccCopySourceFileType.111 i 4 \
ccCopyDestFileType.111 i 1 \
ccCopyServerAddress.111 a \
ccCopyFileName.111 s "lab-rtr1-confg" \
ccCopyEntryRowStatus.111 i 4

You should get back something like this:

ccCopyProtocol.111 = INTEGER: tftp(1)
ccCopySourceFileType.111 = INTEGER: runningConfig(4)
ccCopyDestFileType.111 = INTEGER: networkFile(1)
ccCopyServerAddress.111 = IpAddress:
ccCopyFileName.111 = STRING: lab-rtr1-confg
ccCopyEntryRowStatus.111 = INTEGER: createAndGo(4)

Step 2: Check the status:

snmpget -v 2c -c private lab-rtr1 .

Text version:

snmpget -O s -m CISCO-CONFIG-COPY-MIB -v 2c -c private lab-rtr1 ccCopyState.111

You should get back a "3", for success (check the MIB for other possible values):

ccCopyState.111 = INTEGER: successful(3)

Step 3: Destroy the row you created:

snmpset -v 2c -c private lab-rtr1 . i 6

Text version:

snmpset -O s -m CISCO-CONFIG-COPY-MIB -v 2c -c private lab-rtr1 ccCopyEntryRowStatus.111 i 6

You should get back something like this:

ccCopyEntryRowStatus.111 = INTEGER: destroy(6)

Step 4: Go verify it was actually copied over to the tftp server.

snmpset -v 2c -c <community> <router address> OLD-CISCO-SYS-MIB::netConfigSet.<tftp server> s <config-file>

<tftp-server> is dotted decimal.

<config-file> is a path relative to you TFTP root.


snmpset -v 2c -c private OLD-CISCO-SYS-MIB::netConfigSet. s router-confg.txt

Thanks a lot for your answer.

However, according to OLD-CISCO-SYS-MIB

The oid is and the command tipped was

snmpset -v2c -c public s config

which returned

Error in packet.
Reason: commitFailed Failed object: iso.

Did I choose the appropriate OID?

Moreover, it looks like it puts the configuration into the switch, I would like to perform the opposite transfer: from switch to server

Thanks for your help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.