cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3340
Views
0
Helpful
4
Replies

Copying configs using SNMP command line

admin_2
Level 3
Level 3

Has anyone managed to copy a configuration to/from an IOS based router using SNMP set commands?

I've used the Cisco document below as a guide for using "Cisco-config-copy-mib-v1smi mib". I can't get the last SNMP set command to work -

"ccCopyEntryRowStatus.<Random number> integer 4".

I get the response "Reason: (badValue) The value given has the wrong type or length." from NET-SNMP 5.2.1 and a similar error from other applications.

After each attempt to snmpset the object, the router gets an SNMP "no such name" error".

I've tried this on a 1701 and 3640 router.

Cisco document describing the process:-

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094aa6.shtml

4 Replies 4

paddyxdoyle
Level 6
Level 6

Hi,

I haven't used this for a while but i have used it from HPOpenview to routers and switches.

From my notes, i have recorded the create and go line as

nmpset -c 1.3.6.1.4.1.9.9.96.1.1.1.1.14.115 integer 1

Although the documentation does say 4, might be worth trying 1.

I'll have a quick look at the MIB when i get a minute to see if 1 exists, if it doesn't then i am not sure how i came up with that!

HTH

Paddy

Hi

Thanks for your comments but I get the same probem using integer 1 as for 4.

Any other suggestions?

Hi,

I just tried it with success using the following syntax:

cd /tftpboot

touch router-config

chmod 777 router-config

snmpset -v 1 -c RW_String *.*.*.*.1.3.6.1.4.1.9.9.96.1.1.1.1.2.115 integer 1

snmpset -v 1 -c RW_String *.*.*.*.1.3.6.1.4.1.9.9.96.1.1.1.1.3.115 integer 4

snmpset -v 1 -c RW_String *.*.*.*.1.3.6.1.4.1.9.9.96.1.1.1.1.4.115 integer 1

snmpset -v 1 -c RW_String *.*.*.*.1.3.6.1.4.1.9.9.96.1.1.1.1.5.115 ipaddress "*.*.*.*"

snmpset -v 1 -c RW_String *.*.*.*.1.3.6.1.4.1.9.9.96.1.1.1.1.6.115 octetstring "router-config"

snmpset -v 1 -c RW_String *.*.*.*.1.3.6.1.4.1.9.9.96.1.1.1.1.14.115 integer 1

$ ls -la route*

-rwxrwxrwx 1 pjdoyle other 1934 Apr 4 13:40 router-config

$ head router-config

!

! No configuration change since last restart

!

version 12.0

service timestamps debug uptime

service timestamps log datetime

service password-encryption

!

I initially tried it using an integer of 4 on the last bit and it didn't work, must be the SNMP version bit thats giving your problems.

Rgds

Paddy

Interestingly, if you try the last line using version 2, it still only works with integer 1

$ snmpset -v 2c -c RW *.*.*.* .1.3.6.1.4.1.9.9.96.1.1.1.1.14.115 intege

r 1

cisco.ciscoMgmt.ciscoConfigCopyMIB.ciscoConfigCopyMIBObjects.ccCopy.ccCopyTable.

ccCopyEntry.ccCopyEntryRowStatus.115 : INTEGER: active

$

Good Luck

Paddy

Review Cisco Networking for a $25 gift card